After I tried upgrading my php version from 3 to 4, all my code which passes
parameters between web pages have stopped working. Not sure what the problem
is. Have tried defining the parameters in the accepting php page with a
'$_GET["parameter_name "]; and also a $_REQUEST["parameter_name "]; but with
no luck. Even tried Globals without any luck.
Below is an eg. of what I am trying to do..
------------------------
From an html page, - 'eg1.html', I am attempting to call a php page via an
<a href> link. Below is the code for it..
<a href="DirDisp.p hp?dirName=Tria l&year=2003">Tr ial</a>
In the DirDisp.php file, - I normally just have
$dirName = addslashes($dir Name);
$year = addslashes($yea r);
but since this didnt work in php4, tried..
$_GET["dirName"];
also tried ..
$_REQUEST["dirName"];
but nothing worked.
------------------------
Before the upgrade this code and all others used to work fine. Even now,
when I go back to php 3, this code works just fine. But the moment I modify
the apache file httpd.conf to point to php4 and not php3, this code ceases
to work.
On trying to print out the value for the parameter, (in this case 'dirName'
& 'year'), I get nothing. What am I doing wrong? Any help on this issue will
be greatly appreciated.
Thanks
Ravi
parameters between web pages have stopped working. Not sure what the problem
is. Have tried defining the parameters in the accepting php page with a
'$_GET["parameter_name "]; and also a $_REQUEST["parameter_name "]; but with
no luck. Even tried Globals without any luck.
Below is an eg. of what I am trying to do..
------------------------
From an html page, - 'eg1.html', I am attempting to call a php page via an
<a href> link. Below is the code for it..
<a href="DirDisp.p hp?dirName=Tria l&year=2003">Tr ial</a>
In the DirDisp.php file, - I normally just have
$dirName = addslashes($dir Name);
$year = addslashes($yea r);
but since this didnt work in php4, tried..
$_GET["dirName"];
also tried ..
$_REQUEST["dirName"];
but nothing worked.
------------------------
Before the upgrade this code and all others used to work fine. Even now,
when I go back to php 3, this code works just fine. But the moment I modify
the apache file httpd.conf to point to php4 and not php3, this code ceases
to work.
On trying to print out the value for the parameter, (in this case 'dirName'
& 'year'), I get nothing. What am I doing wrong? Any help on this issue will
be greatly appreciated.
Thanks
Ravi
Comment