Re: Passing variable from webpage to php (newbie?)
| From: | Bobby Rahman | Date: | Thu, 20 Mar 2003 11:16:38 +0000 |
| Subject: | Re: Passing variable from webpage to php (newbie?) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-140415@lists.php.net to get a copy of this message | ||
Hiya
It could need setting register_globals =on in your php.ini
if after that still problems then you may need to look into sessions and in particular session_start() and $_SESSION['varname'] and make sure the variables are global so that more than one script can use them.
Hope this steers you in right direction
*warning im a newbie too so you may wait for some more replies to confirm what im saying*
Bobster
From: "Joe Kupiszewski" <joe@thekups.com> Reply-To: "Joe Kupiszewski" <joe@thekups.com> To: php-general@lists.php.net Subject: [PHP] Passing variable from webpage to php (newbie?) Date: Wed, 19 Mar 2003 10:57:11 -0500 I think I already tried to post once, so sorry if this is a duplicate, but I don't see my first attempt. I am trying to do what should be a relatively simple and basic task. I've got a php script/page that has a switch/case selection statement in it. Obviously, depending on what value a particular variable takes when passed to the script, the script SHOULD :) do different things. However, when I invoke the script using www.somedomain.com/somephpscript.php?action=1 (substitute one with, 2, 3, 4 or whatever) and then do a check whether any value is passed to my script, it always tells me the value is empty ( if (empty ($action)) - it just always thinks its empty. I'm copying this script from a book, so I do not have any reason to believe there is an error in the code, but obviously something is not happening properly. My thought is that perhaps something needs to be turned on in the php.ini or in the apache httpd.conf file to allow this variable passing to work. Is there some other way to do this? Sorry for the long paragraph sentence. I'll be happy to post the code if needed or provide any additional information or give the actual URL so you can see what is happening. Thanks for any thoughts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php_________________________________________________________________ Overloaded with spam? With MSN 8, you can filter it out http://join.msn.com/?page=features/junkmail&pgmarket=en-gb&XAPID=32&DI=1059