Code: Select all
<?php
$msg = "";
$user = "myurl.com";
$password = "";
$db = "whatever";
$link = mysql_connect("localhost", $user, $password);
if (!$link) die ("cant connect to mysql");
mysql_select_db($db, $link) or die ("cannot connect");
$query = "SELECT entry_password where rec_id='$rec_id'";
mysql_query($query, $link) or die (mysql_error());
($myrow = mysql_fetch_row($result));
$gotpassword = $myrowї0];
if ($gotpassword == $the_password){
$query = "UPDATE mailinglist set confirmed=$confirmed where rec_id='$rec_id' ";
echo "&message=You're in there like under wear, mango.";
echo "&loading=NO";
}
else{
echo "&message=Your password was lame, kid.";
}
mysql_query($query, $link) or die (mysql_error());
mysql_close($link);
?>