Jump to content

Archived

This topic is now archived and is closed to further replies.

snapper64

PHP Error SQL probs . . .

Recommended Posts

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 file
include '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 database
mysql_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

Share this post


Link to post
Share on other sites
[code]<?php

// Include init file
include "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 database
mysql_query ($sql) or die(mysql_error()); //

?>[/code]

Try that and let me know what error it gives.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.