Jump to content

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
Link to comment
https://forums.phpfreaks.com/topic/10834-php-error-sql-probs/
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.
Link to comment
https://forums.phpfreaks.com/topic/10834-php-error-sql-probs/#findComment-40485
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.