Use javascript varibles with PHP (This is an emergency)
Posted: Tue Jan 31, 2006 2:51 am
I have to user a varible from javascript with PHP.
Can any one help me?
Can any one help me?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
hey, want someone to help you? wait patiently...i don't need your help if you are asking for exchange.aetoc wrote:What do you want to do?
Give me some help so I can celp you.
Code: Select all
var x = 42;
window.location='some_php_script.php?x='+x;Code: Select all
<?php echo $_GET['x']; ?>It's probably too long a string for a URL, in which case you definitely need AJAX but anyway:aetoc wrote:sorry but I'm little confuse.
I want to save the window.source in a var from the page a and send it to page b.
can this help you.
Code: Select all
window.location = 'some_script.php?source=' + window.source;