Cannot display vars in php which was called form shtml
Posted: Wed Mar 02, 2005 7:32 am
I have 2 very very simple scripts, 1. is the shtml file and the other is a php file. The index.shtml was huge. for the sake of debugging, I tore it down to a simple form and 2 fields (username and password). on a click of the submit button, I call displayalues.php which is nothing but 3 lines to display the value of username and password which were entered in entered in index.php. How can i get the variable to display or to be transferred to displayvalues.php.... code follows:
index.shtml
displayvalues.php
it only displays the strings 1- 2- with empty values
Any suggestions?
TIA
--
feyd |
Moved to PHP - Code
index.shtml
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<TITLE>Home</TITLE>
</HEAD>
<BODY>
<TABLE>
<TR>
<FORM NAME="Login" ACTION="./authlib/displayvalues.php" METHOD="POST"
>
<input type=text name=username2 value="2222">
<input type=hidden name=mode value=in>
<br>Username :<input type=text name=username value=wwww>
<br>Password :<input type=password name=password>
<p><input type=submit value=Login name=submit>
</form>
</TR>
</TABLE>
</BODY>
</HTML>Code: Select all
<?
//require("backend.php");
$jack = $_serverї"username"];
print "1- = $jack";
print "2- = $username";
print $_SERVERї"username"];
?>Any suggestions?
TIA
--
feyd |