Cannot process Form variable

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Cannot process Form variable

Postby qiqbal » 10. March 2008 00:30

I installed XAMPP and created a test.php as following to check if I get the form variables processed. When I submit the form, I dont see any $user and $pword processed.
Any help will be appreciated.
Below is the code of file.
Thanks

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test Page</title>
</head>
<body>
<?php
echo $user;
echo $pword;
?>

<form method="GET" action="index.php">
<input type="text" name="user"><Br>
<input type="password" name="pword"><br>
<input type="submit" name="action" value="Enter">
</form>
</body>
</html>
qiqbal
 
Posts: 1
Joined: 10. March 2008 00:15

Postby Xardas der Dunkle » 10. March 2008 08:23

:x, don't use register_globals. The better way is:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test Page</title>
</head>
<body>
<?php
echo $_GET['user'];
echo $_GET['pword'];
?>

<form method="GET" action="index.php">
<input type="text" name="user"><Br>
<input type="password" name="pword"><br>
<input type="submit" name="action" value="Enter">
</form>
</body>
</html>
User avatar
Xardas der Dunkle
 
Posts: 482
Joined: 09. March 2008 19:40
Location: /var/www


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 43 guests