Forum Moderators: coopster

Message Too Old, No Replies

Activation email

         

nshack31

10:47 pm on Feb 2, 2005 (gmt 0)

10+ Year Member



upon registering ,my users are sent and activation email. The user clicks on the link and the following page is called

<?php
ob_start();
include 'open.php';

$me=$_GET['me'];
$rand=$_GET['rand'];

$query="UPDATE users SET activated = 'Yes' WHERE username = $me AND random = $rand";
mysql_query($query) or die('Error, update query failed');

header ('location: registered.php');
include 'close.php';
ob_end_flush();
?>

I have printed the values 'me' and 'rand' and they are correct. But the update quesry will not work, I receive the Error - update query failed. Is there any reason for this?

Thanks

olwen

11:02 pm on Feb 2, 2005 (gmt 0)

10+ Year Member



Try
$query="UPDATE users SET activated = 'Yes' WHERE username = '$me' AND random = '$rand'";

and print the sql, and run it and see what error it gives.

nshack31

11:08 pm on Feb 2, 2005 (gmt 0)

10+ Year Member



yes that worked - thanks very much!