snapper64 Posted May 31, 2006 Share Posted May 31, 2006 Hi,I have created an activation script for my registration script. It will eventually work by getting the encrypted password and timestamp from the URL. However because i ran into problems i commented out this section and just entered exact values(the same as those entered in the database, but its still failing !!![code]<?php// Include init fileinclude 'init.php';//$md5 = md5($_GET['hash']);//$base = base64_decode($_GET['stamp']);$sql = 'UPDATE `users`' . ' SET `status` = `0`'// . ' WHERE `password` = `$md5` AND `timestamp` = `$base`'; . ' WHERE `password` = `0b78601ab862c0c13becef26327f4f9c` AND `timestamp` = `1149021727`';// And lastly, store the information in the databasemysql_query ($sql) or die(mysql_error()); // ?>[/code]I get this error when i run the script: 'Unknown column '0b78601ab862c0c13becef26327f4f9c' in 'where clause'Any ideas ?Thanks,Charlie Quote Link to comment https://forums.phpfreaks.com/topic/10834-php-error-sql-probs/ Share on other sites More sharing options...
rathfon Posted May 31, 2006 Share Posted May 31, 2006 [code]<?php// Include init fileinclude "init.php";//$md5 = md5($_GET['hash']);//$base = base64_decode($_GET['stamp']);$sql = "UPDATE users SET status='0' WHERE password='0b78601ab862c0c13becef26327f4f9c' AND timestamp='1149021727'";// And lastly, store the information in the databasemysql_query ($sql) or die(mysql_error()); // ?>[/code]Try that and let me know what error it gives. Quote Link to comment https://forums.phpfreaks.com/topic/10834-php-error-sql-probs/#findComment-40485 Share on other sites More sharing options...
snapper64 Posted May 31, 2006 Author Share Posted May 31, 2006 Works perfectly. Thanks a million,Charlie Quote Link to comment https://forums.phpfreaks.com/topic/10834-php-error-sql-probs/#findComment-40489 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.