Jump to content


Photo

Why is passing varables through url not working?


  • Please log in to reply
8 replies to this topic

#1 smith.james0

smith.james0
  • Members
  • PipPipPip
  • Advanced Member
  • 122 posts

Posted 06 March 2006 - 07:45 PM

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

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 06 March 2006 - 07:48 PM

Please post the code.

Ken

#3 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 06 March 2006 - 07:48 PM

Little code would help :)

Ray

#4 smith.james0

smith.james0
  • Members
  • PipPipPip
  • Advanced Member
  • 122 posts

Posted 06 March 2006 - 09:12 PM



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

#5 XenoPhage

XenoPhage
  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts

Posted 06 March 2006 - 09:19 PM

[!--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) View Post[/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?
--
[a href=\"http://blog.godshell.com\" target=\"_blank\"]XenoPhage[/a]
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Something mysterious is formed, born in the silent void. Waiting alone and unmoving, it is at once still and yet in constant motion. It is the source of all programs. I do not know its name, so I will call it the Tao of Programming.[/quote]

#6 smith.james0

smith.james0
  • Members
  • PipPipPip
  • Advanced Member
  • 122 posts

Posted 06 March 2006 - 09:46 PM

I will have to change the &.


I am running it on IE, latest one!


James

#7 XenoPhage

XenoPhage
  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts

Posted 06 March 2006 - 10:02 PM

[!--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) View Post[/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...
--
[a href=\"http://blog.godshell.com\" target=\"_blank\"]XenoPhage[/a]
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Something mysterious is formed, born in the silent void. Waiting alone and unmoving, it is at once still and yet in constant motion. It is the source of all programs. I do not know its name, so I will call it the Tao of Programming.[/quote]

#8 Gaia

Gaia
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts
  • LocationCanada

Posted 06 March 2006 - 10:08 PM

I think register_globals would have something to do with that, not sure though.

#9 smith.james0

smith.james0
  • Members
  • PipPipPip
  • Advanced Member
  • 122 posts

Posted 06 March 2006 - 10:15 PM

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) View Post[/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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users