I'll admit I haven't touched PHP for some time but I am really struggling with passing simple variables in between 2 pages.
Can anyone suggest where I am going wrong.
Here is the first page:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<FORM ACTION="result.php" METHOD="get">
<INPUT TYPE="TEXT" NAME="name" VALUE="">
<INPUT TYPE="PASSWORD" NAME="pass" VALUE="">
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Create Your Account">
</FORM>
</body>
</html>
The code I am using on the next page to print the variables is this:
<?php
echo "$name";
echo "$pass";
?>
When I run this I get the following error:
Notice: Undefined variable: name in d:\apache\apache\htdocs\result.php on line 2
Notice: Undefined variable: pass in d:\apache\apache\htdocs\result.php on line 3
I am totally stumped - any ideas?