hey all,
I have installed Apache server , PHP and MySQL on my PC. I was then able to excute .php scripts on my PC (127.0.0.1) The problem is that it couldn't get it to work in passing a parameter from a page to another page using POST or GET. u can see the parameter on the URL Address (e.g Name=Adel&Age=21), but the .php scrpit doesn't understand the parameters passed BUT the .php script works on anything else but the parameters passed. The value isthen treated as NULL. like in the example below.
here is the code :
=============
index.html
=============
<HTML>
<HEAD></HEAD>
<BODY>
<FORM METHOD=POST ACTION="text.php">
Who is your favourite author?
<INPUT NAME="Author" TYPE="TEXT">
<BR>
<BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
================
text.php
================
<HTML>
<HEAD></HEAD>
<BODY>
Your favorite author is:
<?php
echo $Author; \\ prints nothing , cause $Author will be NULL
?>
</BODY>
</HTML>
================
However, the case only applies when I am running on my local machine, when I uploaded the files to a webserver that supports PHP, it worked !!!
why ??? What seems to be the problem with my PC ??
I would appreciate ANY help...
this is the site where i uploaded my files :
I have installed Apache server , PHP and MySQL on my PC. I was then able to excute .php scripts on my PC (127.0.0.1) The problem is that it couldn't get it to work in passing a parameter from a page to another page using POST or GET. u can see the parameter on the URL Address (e.g Name=Adel&Age=21), but the .php scrpit doesn't understand the parameters passed BUT the .php script works on anything else but the parameters passed. The value isthen treated as NULL. like in the example below.
here is the code :
=============
index.html
=============
<HTML>
<HEAD></HEAD>
<BODY>
<FORM METHOD=POST ACTION="text.php">
Who is your favourite author?
<INPUT NAME="Author" TYPE="TEXT">
<BR>
<BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
================
text.php
================
<HTML>
<HEAD></HEAD>
<BODY>
Your favorite author is:
<?php
echo $Author; \\ prints nothing , cause $Author will be NULL
?>
</BODY>
</HTML>
================
However, the case only applies when I am running on my local machine, when I uploaded the files to a webserver that supports PHP, it worked !!!
why ??? What seems to be the problem with my PC ??
I would appreciate ANY help...
this is the site where i uploaded my files :