address bar variables[SOLVED]
Posted: Sat May 12, 2007 4:22 pm
I'm trying to figure out how functions get information from the address bar, such as when I registered for this forum the web link was posting.php?mode=register&agreed=true .
I have built a simple function to try and replicate that, to an extent, but idk how to do it.
i type in, http://www.mydomain.com/index.php?hello=bob
<?php
//index.php
function hello($hello){
echo $hello;}
hello();
?>
expected output:
bob.
I've tried several variations on both the web address and the coding, i'm just not sure how it works.
I'm trying to do this with javascript, and if there is a way to do it with AJAX (idk any but some have told me that would be a way to do it) i'd be glad to know. Thank you in advance.
I have built a simple function to try and replicate that, to an extent, but idk how to do it.
i type in, http://www.mydomain.com/index.php?hello=bob
<?php
//index.php
function hello($hello){
echo $hello;}
hello();
?>
expected output:
bob.
I've tried several variations on both the web address and the coding, i'm just not sure how it works.
I'm trying to do this with javascript, and if there is a way to do it with AJAX (idk any but some have told me that would be a way to do it) i'd be glad to know. Thank you in advance.