.location.href = url;
return false;
}
//-->
Click Here
kale wrote:
>This is a javascript?
>Where must I put this lines?
>Thanks for help.
>Kale.
>
>-Original Message-----
>From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, September
I forgot &, the right version:
var tmp,url,separator;
url = 'http://site/script.php?';
while(tmp = myArray.shift()) {
url += separator + 'phparray[]' + escape(tmp);
separator = '&';
}
document.location.href = url;
Marek Kilimajer wrote:
> var tmp,url;
> url = 'http://site/script.php?';
>
var tmp,url;
url = 'http://site/script.php?';
while(tmp = myArray.shift()) {
url += 'phparray[]' + escape(tmp);
}
document.location.href = url;
In script.php, you'll find array named phparray
kale wrote:
>Hy,
>I have an array make with a javascript.
>How can I read values with PHP from it
Hi
To Assign values from an array in PHP to JavaScript,
you could try something like this.
$Array = array( 'one', 'two', 'three' );
Now in your JavaScript:
JSArray = new Array(= sizeof( $Array )?>);
You can't. Javascript happens on the client side AFFTER PHP has happend on
the server side. For PHP to ready variables made with javascrip,t you'd
have to submit those variables/arrays via POST of GET to the PHP file.
Justin
on 05/09/02 9:11 PM, kale ([EMAIL PROTECTED]) wrote:
> Hy,
> I have
STRIPSLASHES();
use single quotes for the array.
add the slashes in front each JS's single quote,
when echoing use :
echo stripslashes($js);
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original
6 matches
Mail list logo