My HTML
<html>
<head>
<h1>
User Registration
</h1>
<form method=post action="create_entry.php">
</head>
<body bgcolor="green">
<b>
<br>
Username
<br>
</b>
<input type=text size=15 name=username>
<br>
<b>
UserPassword
</b>
<br>
<input type=password size=15 name=password>
<br>
<input type=submit name=submit value="Register">
<input type=reset name=reset value="Clear">
</form>
</body>
</html>
This is My PHP create_entry.php script
<?php
mysql_connect("localhost", "root", "root" or
die ("Could not connect to database"
mysql_select_db("user" or
dir ("Could not select database"
if ($submit == "Register"
{
$query = "insert into users (username, password) values ('$username', '$password')";
mysql_query($query) or
die (mysql_error());
}
?>
<h3>You are now registered</h3>
<a href="login.html">Go back to main page</a>
user is my database
users is my table inside the database.
But when I enter some username and password nothing is updated in to the database.
where is the problem..
regards
MP
<html>
<head>
<h1>
User Registration
</h1>
<form method=post action="create_entry.php">
</head>
<body bgcolor="green">
<b>
<br>
Username
<br>
</b>
<input type=text size=15 name=username>
<br>
<b>
UserPassword
</b>
<br>
<input type=password size=15 name=password>
<br>
<input type=submit name=submit value="Register">
<input type=reset name=reset value="Clear">
</form>
</body>
</html>
This is My PHP create_entry.php script
<?php
mysql_connect("localhost", "root", "root" or
die ("Could not connect to database"
mysql_select_db("user" or
dir ("Could not select database"
if ($submit == "Register"
{
$query = "insert into users (username, password) values ('$username', '$password')";
mysql_query($query) or
die (mysql_error());
}
?>
<h3>You are now registered</h3>
<a href="login.html">Go back to main page</a>
user is my database
users is my table inside the database.
But when I enter some username and password nothing is updated in to the database.
where is the problem..
regards
MP