CODE
<?php
$mysql_link = mysql_connect("server", "users", "pass");
mysql_select_db($db, $mysql_link);
if (($username) AND ($password)) {
// you should inspect these variables before passing off to mySQL
$query = "SELECT email, wachtwoord FROM shop ";
$query .= "WHERE email='$username' AND wachtwoord='$password'";
$result = mysql_query($query, $mysql_link);
if(mysql_num_rows($result)) {
// we have at least one result, so update the logged in datetime
$query = "UPDATE from login SET logged=SYSDATE()";
$query .= "WHERE email='$username' AND wachtwoord='$password' ";
mysql_query($query,$mysql_link);
} else {
print("Sorry, this login is invalid.");
exit;
}
} else {
print ("<form action=\"$PHP_SELF\" method=\"POST\">");
# print ("Gebruikersnaam / E-mail: <input type="text" name="username">");
# print ("Wachtwoord: <input type="password" name="password">");
# print ("<input type="submit" value="Submit"></form>");
}
?>
$mysql_link = mysql_connect("server", "users", "pass");
mysql_select_db($db, $mysql_link);
if (($username) AND ($password)) {
// you should inspect these variables before passing off to mySQL
$query = "SELECT email, wachtwoord FROM shop ";
$query .= "WHERE email='$username' AND wachtwoord='$password'";
$result = mysql_query($query, $mysql_link);
if(mysql_num_rows($result)) {
// we have at least one result, so update the logged in datetime
$query = "UPDATE from login SET logged=SYSDATE()";
$query .= "WHERE email='$username' AND wachtwoord='$password' ";
mysql_query($query,$mysql_link);
} else {
print("Sorry, this login is invalid.");
exit;
}
} else {
print ("<form action=\"$PHP_SELF\" method=\"POST\">");
# print ("Gebruikersnaam / E-mail: <input type="text" name="username">");
# print ("Wachtwoord: <input type="password" name="password">");
# print ("<input type="submit" value="Submit"></form>");
}
?>
well i get a error @ the lines that i placed a # infront
any suggestion on how to fix this?
yet i have totally no idea what could be wrong atm...