Jump to content


MySQL UPDATE for a booleon

  • Please log in to reply
No replies to this topic

#1 russia5

  • Members
  • PipPipPip
  • Advanced Member
  • 94 posts

Posted 14 September 2006 - 08:39 PM

Hello, Hope everone is well!  I am coding a confirmation letter.  The signup is a email address only.  I have a database with these parameters:  email md5hash timestamp stutus(booleon)

There are two files (participating in this question): subscribe.php and confirm.php

Subscribe takes the posting from the form (the email) and inserts the email address, a time stamp, the md5 hashmark, and sets a status (booleon) to zero.  It works fine.

A email is then sent to the subscriber, asking the subscrber to hit a link.  It also works.  An example of the email is:


Upon hitting the URL, the confirm code is suppose to update the record associated with the md5(and email of course) with a status bit of 1.

It does not work.

Here is the confirm.php code:


$id = ($_GET['id']);

include_once ("config.php");

$result = mysql_query('UPDATE db_tbl
SET status = '1'
WHERE id = $id');
if (!$result) {
   die('Invalid query: ' . mysql_error());


$id = md5
$status = '1' or '0'

$status is suppose to go from 0 to 1.

It does not.

Here is the error.

Parse error: parse error, unexpected T_LNUMBER in /home/russia5/public_html/confirm.php on line 11

Line 11 is SET status = '1'

Thankyou to all that consider the question!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users