Topic: Parameters from javascript gotten incorrectly (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=30331" title="Pages that link to Topic: Parameters from javascript gotten incorrectly (Page 1 of 1)" rel="nofollow" >Topic: Parameters from javascript gotten incorrectly <span class="small">(Page 1 of 1)</span>\

 
ruffy
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jun 2008

posted posted 06-15-2008 23:37

I want to pass from javascript to a new php page some parameters.
A viable solution seems to be:
location.href="stats.php?totsales=results[0]&totinvoices=resultsnt";

Only my stats.php file,
which uses
$value1 = $_GET["totsales"];
etc.
is not receiving the values correctly.

Would appreciate your diagnosis.

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 06-15-2008 23:42

Certainly, what you want is something like : location.href="stats.php?totsales="+encodeURI(results[0])+"&totinvoices=results";



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu