Hai
I've been following a tutorial
http://www.youtube.com/watch?v=kEvVl...eature=channel
And these are my codes:
Loginforms.php
And this is my loginforms_handler.phpPHP Code:
<?
include(prehtml.php);
?>
<html>
<head>
<title>
Login
</title>
</head>
<body>
<!-- Login form -->
<form action="loginforms_handler.php" method="post">
Username <input type="text" name="username" value="username">
Password <input type="password" name="password" value="password">
<input type="submit" value="Login">
</form>
</body>
</html>
I get this error:PHP Code:
<?
$username = $_post=[username];
$password = $_post=[password];
$con = mysql_connect ('localhost', 'denning_test', 'test');
mysql_select_db('denning_test', $con);
$query = "SELECT * FROM users WHERE username='" . $username . "' AND password='" . $password . "'";
$run = mysql_query($query);
$results = mysql_affected_rows();
echo $results;
?>
Warning: include(prehtmlphp) [function.include]: failed to open stream: No such file or directory in /home/denning/public_html/test/loginforms.php on line 2
Warning: include(prehtmlphp) [function.include]: failed to open stream: No such file or directory in /home/denning/public_html/test/loginforms.php on line 2
Warning: include() [function.include]: Failed opening 'prehtmlphp' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/denning/public_html/test/loginforms.php on line 2
Whats wrong with it? All help appreciated