Apache and PHP POST Variable
Posted: 17. August 2006 18:47
I created a simple form to use to install a script I made on my localhost's mysql server. When I run the script the variables from the form aren't forewarded to the php script. Here are the two scripts stripped down.:
The Form: installform.html
Here is the php scirpt: install.php
When I run the form and click sumbit, the php script says $db_user has no value
Thanks for your time...
The Form: installform.html
- Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Install Login</title>
<style type="text/css">
<!--
.style1 {
font-size: 36px;
color: #FF0000;
}
.style2 {
font-size: 36;
color: #FF0000;
}
-->
</style>
</head>
<body>
<div align="center" class="style1">Install Login!</div>
<form method="post" action="install.php">
<p>Database Username <input name="db_user" type="text" value="root" />
<input type="submit" name="sumbit" value="Install" />
</form>
</body>
</html>
Here is the php scirpt: install.php
- Code: Select all
<html>
<head>
<title>Install Login!</title>
</head>
<body>
<?
echo "Database User = $db_user<Br>";
?>
</body>
</html>
When I run the form and click sumbit, the php script says $db_user has no value
Thanks for your time...