Hi,
I am having difficulties passing query strings from one file to another. I really don't see any problems with the code, but it just doesn't work. This is the link I query string information:
echo "<tr><td><a href=\"comments.php?user=".$valid_user."\">File</a></td></tr>";
this is what shows up on the browser, with the correct information. But when I try to access $valid_user in the "comments.php" page it doesn't show the output.
http://www.foo.com/goo/comments.php?user=adnan1983
Adnan.
That's because the value of $valid_user is in $HTTP_GET_VARS["user"]
With ?user=".$valid_user." you assing the value of $valid_user to the get var "user".
thank you, so much. I didn't know that. Really appreciate it.
Is it possible that I can send multiple information with the same query string? Like
echo "<tr><td><a href=\"comments.php?user=".$valid_user."+file".$file."\">File</a></td></tr>";
Of course you can.
generally, querystrings would be like:
?name1=value1&name2=value2&name3=value3
of course when coding with html you would replace '&' with '&', but the idea of name/value pairs separated by ampersands is there.
Yes:
<a href=\"comments.php?user=$valid_user&file=$file\">File</a>
Hehe,
Laserlight: you must be on a faster connection then me!
Hehe
J.
🙂
but I think Pilly from http://www.phpbuilder.com/board/showthread.php?s=&postid=10355539 must have an even faster connection "I think ive answered my own question..."
lol
lol 🙂