View Full Version : Passing Variables To Webpages
Sharaya
08-26-2009, 05:52 PM
Hello. If I type something like
http://x.com/y.php?name=Sharaya
then the variable "name" is not set to the value "Sharaya". It seems like bluehost makes it impossible to pass data using parameters in the URL. Could somebody please tell me what's going on?
farcaster
08-26-2009, 06:09 PM
It's not BH that enables (or disables) this. It's a matter of you writing the proper code.
Here's a screencast (http://blog.themeforest.net/screencasts/diving-into-php-day-3/) that shows one method. There are many out there.
Sharaya
08-26-2009, 06:14 PM
You know, about 10 minutes after I posted that question, I found my problem was not with passing the parameter. It was with my method of receiving the data. I was using PHP. In the past, I was able to just use a variable name like $name to read the value. Now I have to use $_GET["name"] to do it.
I was going to see if I could unpost the question before somebody tried to figure it out but I see you guys are fast. Anyway my sad face is a happy face now.
farcaster
08-26-2009, 06:26 PM
Been there :(, done that :)
Own the t-shirt. Glad you got it fixed!
felgall
08-26-2009, 08:02 PM
I was able to just use a variable name like $name to read the value.
That was the way things used to be before it was realised what sort of problems that created for security so it was partly fixed in PHP 4.2 by changing the default to disallow that. The full fix is in PHP 6 where it will no longer be possible at all.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.