Jump to content

Why is passing varables through url not working?


smith.james0

Recommended Posts

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


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
[!--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 &amp;

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?
[!--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...
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.