It's me again
I just don't get what's wrong with this script...
When registering there will be made an 'id' (auto_increment) and an MD5 of the username. There will an e-mail been send: http://www.frome.frih.net/activate.php?key=$key&id=$id. But it doesn't work. He does send the e-mail, but if you click on the link in the e-mail he says this:
PS: Later on I will change the MD5 to generate_key or something.
Last edited by fromegame on Wed Nov 29, 2006 7:50 pm; edited 1 time in total
I just don't get what's wrong with this script...
When registering there will be made an 'id' (auto_increment) and an MD5 of the username. There will an e-mail been send: http://www.frome.frih.net/activate.php?key=$key&id=$id. But it doesn't work. He does send the e-mail, but if you click on the link in the e-mail he says this:
| Code: |
| Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fromegam/domains/frome.frih.net/public_html/activate.php on line 24 |
PS: Later on I will change the MD5 to generate_key or something.
| Code: |
|
$host="localhost"; // Host name $username="xxx"; // Mysql username $password="xxx"; // Mysql password $db_name="xxx"; // Database name $tbl_name="xxx"; // Table name mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $id = $_GET['id']; $key = $_GET['key']; $sql="SELECT * FROM $tbl_name WHERE id='$id' AND key='$key'"; $result=mysql_query($sql); $count=mysql_num_rows($result); if($count==1){ echo "good"; } else { echo "bad"; } |
Last edited by fromegame on Wed Nov 29, 2006 7:50 pm; edited 1 time in total
