Hi,
What this script is supposed to do is get the variable $confirm from a url (ie: http://mywebsite.com/confirm.php?confirm=12345)
Then look for $confirm in the MySQL database and if it finds it i want it to say "It worked" and if it doesn't find it i want it to say "Didnt work" ... The problem is that when it finds it, it does just about the opposite of what i want it to do. If it finds $ confirm in the database it says "Didn't work" and if it doesn't find it, it just shows a blank screen and doesn't do nothing at all!! π
Heres the code:
<?php
$host = "localhost";
$user = "";
$password = "";
$databasename = "";
$tablename = "";
$link = mysql_connect ($host, $user, $password);
$query = "SELECT * from $tablename where (cryptaddress='$confirm')";
$result = mysql_db_query ($databasename, $query, $link);
while ($row = mysql_fetch_array ($result)) {
If ($Row[cryptaddress] == $confirm) {
print ("It worked");
} Else {
print ("Didnt work");
}
}
mysql_close ($link);
?>
Thanks if you can help me