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
Link to comment
Share on other sites



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
Share on other sites

[!--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?
Link to comment
Share on other sites

[!--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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.