smith.james0 Posted March 6, 2006 Share Posted March 6, 2006 I have a page which passes varables through a url to another page to make an image, it works fine on the web, but when i try it on my local machine which php on it doesn't. The problem is it's not passing the varable. Is there a setting in php.ini? I am using xampp on windows 98!Thanks James Link to comment https://forums.phpfreaks.com/topic/4246-why-is-passing-varables-through-url-not-working/ Share on other sites More sharing options...
kenrbnsn Posted March 6, 2006 Share Posted March 6, 2006 Please post the code.Ken Link to comment https://forums.phpfreaks.com/topic/4246-why-is-passing-varables-through-url-not-working/#findComment-14745 Share on other sites More sharing options...
craygo Posted March 6, 2006 Share Posted March 6, 2006 Little code would help :)Ray Link to comment https://forums.phpfreaks.com/topic/4246-why-is-passing-varables-through-url-not-working/#findComment-14746 Share on other sites More sharing options...
smith.james0 Posted March 6, 2006 Author Share Posted March 6, 2006 echo "<img src=\"week.php?one=$insanswersun&two=$insanswermon&three=$insanswertue&four=$insanswerwed&five=$insanswerthu&six=$insanswerfri&seven=$insanswersat&y=Pounds&x=Week-$week-$year&title=Total insurance sales this week&colour=FF66FF\" border=\"0\">";At the top of the page week.php $answersun = $_GET['one']; $answermon = $_GET['two']; $answertue = $_GET['three']; $answerwed = $_GET['four']; $answerthu = $_GET['five']; $answerfri = $_GET['six']; $answersat = $_GET['seven']; $colour = $_GET['colour']; $y = $_GET['y']; $x = $_GET['x']; $title = $_GET['title']; $vCht4 = array($answersun,$answermon,$answertue,$answerwed,$answerthu,$answerfri,$answersat);It works on the web just not on my local machine.Thanks James Link to comment https://forums.phpfreaks.com/topic/4246-why-is-passing-varables-through-url-not-working/#findComment-14780 Share on other sites More sharing options...
XenoPhage Posted March 6, 2006 Share Posted March 6, 2006 [!--quoteo(post=352225:date=Mar 6 2006, 04:12 PM:name=smith.james0)--][div class=\'quotetop\']QUOTE(smith.james0 @ Mar 6 2006, 04:12 PM) [snapback]352225[/snapback][/div][div class=\'quotemain\'][!--quotec--]It works on the web just not on my local machine.[/quote]Ok, 2 things. First, you should not be using a straight & in your image tag. These should always be entered using the HTML entity code of &Second, I don't think I understand your question. You say it doesn't work on your local machine. Are you running it via a web browser on your local machine, or just via commandline? Link to comment https://forums.phpfreaks.com/topic/4246-why-is-passing-varables-through-url-not-working/#findComment-14782 Share on other sites More sharing options...
smith.james0 Posted March 6, 2006 Author Share Posted March 6, 2006 I will have to change the &.I am running it on IE, latest one!James Link to comment https://forums.phpfreaks.com/topic/4246-why-is-passing-varables-through-url-not-working/#findComment-14797 Share on other sites More sharing options...
XenoPhage Posted March 6, 2006 Share Posted March 6, 2006 [!--quoteo(post=352242:date=Mar 6 2006, 04:46 PM:name=smith.james0)--][div class=\'quotetop\']QUOTE(smith.james0 @ Mar 6 2006, 04:46 PM) [snapback]352242[/snapback][/div][div class=\'quotemain\'][!--quotec--]I will have to change the &.I am running it on IE, latest one!James[/quote]ok... But are you using apache or iis on the local machine? If you're using IE, I expect that IIS is running on the local machine with some form of PHP installed.. There should be no difference between that and on the web at large. I don't remember any php.ini settings that handle whether or not you can handle GET requests... Link to comment https://forums.phpfreaks.com/topic/4246-why-is-passing-varables-through-url-not-working/#findComment-14815 Share on other sites More sharing options...
Gaia Posted March 6, 2006 Share Posted March 6, 2006 I think register_globals would have something to do with that, not sure though. Link to comment https://forums.phpfreaks.com/topic/4246-why-is-passing-varables-through-url-not-working/#findComment-14820 Share on other sites More sharing options...
smith.james0 Posted March 6, 2006 Author Share Posted March 6, 2006 apache, xampp installs all that. I have had a look on google and i carn't find anything.Thanks James[!--quoteo(post=352265:date=Mar 6 2006, 10:08 PM:name=Gaia)--][div class=\'quotetop\']QUOTE(Gaia @ Mar 6 2006, 10:08 PM) [snapback]352265[/snapback][/div][div class=\'quotemain\'][!--quotec--]I think register_globals would have something to do with that, not sure though.[/quote]Register_globals is switched of on my web host, plus i am using $_GET Link to comment https://forums.phpfreaks.com/topic/4246-why-is-passing-varables-through-url-not-working/#findComment-14821 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.