Click to See Complete Forum and Search --> : passing a variable from .htm file to a .php not visible


orascr
10-22-2005, 11:35 PM
I'm new to use php and been tyring to pass the input variable thru a .htm file into a .php file..here is the code..This is most likely php5

contents of .htm
.....

<HTML>
<CENTER>
<FORM ACTION="http://server.com/file2.php" METHOD=POST>
<INPUT TYPE=INPUT NAME="user" maxlength=8>
<INPUT TYPE="submit" VALUE="Search User">
<INPUT TYPE="clear" VALUE="Reset" Reset>
</FORM>
</CENTER>
</HTML>

This variable will be used to fetch some data from Oracle database(9.2.6) like..

select .....from table
where user_name like upper('%$user%')

It basically return all rows frim the table.


when I try to diaplay it in the file2.php, I see NULL value for $user...

print " <FONT SIZE=2><TR><TH>User is $user</TH></FONT></TR>\n";

Any help will be appreciated.

orascr

Weedpacket
10-23-2005, 07:10 AM
If I understand your question right, then it probably has the same answer as Question One in the Newbies forum FAQ.

orascr
10-24-2005, 02:28 PM
If I understand your question right, then it probably has the same answer as Question One in the Newbies forum FAQ.

This one woked before but I made 1 change to the htm ( changed from Input to text) file and it worked..

<INPUT TYPE="text" NAME=username maxlength=8>

Thanks