Here's my index.php page:
<?php
require 'connect.php';
?>
<html>
<body>
<form action="action.php" method="post">
Username: <input type="text" name="uname">
Password: <input type="password" name="pword">
<input type="submit" name="submit1" />
</form>
</body>
</html>
Here's my connect.php page:
<?php
$connect = mysql_connect("localhost", "root", "");
if (!$connect)
{
die ('Could not connect: ' . mysql_error ());
}
mysql_select_db("users", $connect);
?>
Here's my action.php page:
</php
require 'connect.php';
$username = $_POST ['uname'];
$password = $_POST ['pword'];
mysql_query("INSERT INTO userlogin ($username, $password)
VALUES ('$username', '$password')");
?>
Here's the problem:
Every time I try to register a username and password into the table in my database, It doesn't work.
Nothing happens. I'm trying to register a username and password into my table userlogin, but nothing happens!
Please help! I'll choose a best answer.