In my html file, I am using:
<html>
<head>
</head>
<body>
<form action="get.php" method="get">
<input type="text" name="Username" size="20">
<input type="Password" name="password" size="20">
<input type="submit" value="Submit">
</form>
</body>
</html>
and the get.php file is as follows:
<?php
$db_user = "jskoba";
$db_pass = "******";
$db_name = "jskoba";
$link = mysql_connect( "localhost", $db_user, $db_pass );
if (!$link){
die ("Cant Connect To The DATABASE");
} else {
mysql_select_db($db_name,$link) or die ("Couldn't open ".$db_name.": ".mysql_error());
}
if (isset($username,$password))
{
$query = "INSERT INTO password VALUES('".$username."','".$password."')";
$insert = mysql_query($query,$link) or die ("Couldn't add data to table: ".mysql_error() );
}
if($insert)
echo "Connecting To site"
?>
and in mySQL I used:
CREATE TABLE password( Username TEXT, Password TEXT);
Now, when I log in and click on "password" in the nav bar, shouldnt it display the username and password in the table? What's going on here?
By the way, this is how my table looks:
