| 5:28 pm on Jul 2, 2004 (gmt 0)|
You can use Get variables like this:
hope this helps
| 5:29 pm on Jul 2, 2004 (gmt 0)|
Access them like
(Would print "that")
| 5:30 pm on Jul 2, 2004 (gmt 0)|
Welcome to WebmasterWorld, Chadaw!
In it's simplest form, you are referring to a GET request. You would format the link in such a format...
http://www.mysite.com/myscript.php?picture=mypic and in the myscript.php processing script you would retrieve the variable via the $_GET [php.net] superglobal...
$picture = (isset($_GET['picture']))? $_GET['picture']) : '';
Ternary operators [php.net]
<edit>Lots of help today!</edit>
| 5:36 pm on Jul 2, 2004 (gmt 0)|
Thanks so much, for the very very speedy responses. I will try it and get back with you.
| 6:16 pm on Jul 2, 2004 (gmt 0)|
Still having a problem, when I try the last post it says Parse error: parse error, unexpected ')' in /home/prodshow.php on line 20 but I clearly seen the proper value in the url, this is line 20.
$ShowNum = (isset($_GET['p_id'])? $_GET['p_id']) : '';
Thanks again for your help.
| 6:27 pm on Jul 2, 2004 (gmt 0)|
I solved it with this code using part of yours and [webmasterworld.com...]
My Code: (Please tell me if you think there is any thing I need to know about it)
if (isset($_GET['p_id']) and $_GET['p_id']!= "")
$ShowNum = $_GET['p_id'];
Thanks for your help :)
| 6:36 pm on Jul 2, 2004 (gmt 0)|
The reason for the parse error is that you were missing a parentheses as the error message explained. It's all part of learning the PHP syntax. Compare the line given earlier with the way you typed it, you'll spot the missing parentheses...
Yeah, you sure will, I gave it to you with invalid syntax! hehe, sorry ;)
$picture = (isset($_GET['picture']))? $_GET['picture'] : '';