I've used the technique of passing PHP variables in a URL many times without experiencing any problems, but for some reason I've just run into difficulties.
I'm creating an interactive events calender and need to pass two variables into a script on the URL.
I'm using:
The above code is on the page 'caldisplay.php', so the script is sending the variables back to itself ( again something I've done many times before without problems ).
When the page loads and I click the link the URL dispalys correctly in my address bar e.g:
but for some reason I'm not able to access the variables.
To try and isolate the problem I made a small test script that contains nothing but the variables and the link. When I click the link on the test script it passes the variables back to itself and they are accesible ( I echoed them to the page ).
What's more the test script worked whether or not I used $year=$_GET['year'] e.t.c. (I think this has something to do with register_globals being on right?)
So I just need to know any possible explanations as to why a correctly written link that contains variables, that displays correctly in the address bar of a browser would not allow me to access those variables?
Any possible soloutions would be greatly appreciated. I think it must be something simple but I'm tearing my hair out with this one.
Cheers.
I'm creating an interactive events calender and need to pass two variables into a script on the URL.
I'm using:
Code:
echo "<a href='caldisplay.php?mon=".$month."&year=".$year."'>";
When the page loads and I click the link the URL dispalys correctly in my address bar e.g:
Code:
[URL unfurl="true"]http://www.mysite/caldisplay.php?mon=8&year=2005[/URL]
To try and isolate the problem I made a small test script that contains nothing but the variables and the link. When I click the link on the test script it passes the variables back to itself and they are accesible ( I echoed them to the page ).
What's more the test script worked whether or not I used $year=$_GET['year'] e.t.c. (I think this has something to do with register_globals being on right?)
So I just need to know any possible explanations as to why a correctly written link that contains variables, that displays correctly in the address bar of a browser would not allow me to access those variables?
Any possible soloutions would be greatly appreciated. I think it must be something simple but I'm tearing my hair out with this one.
Cheers.