Help for a beginer ( i will repay in gold)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Milan
Forum Commoner
Posts: 97
Joined: Wed May 17, 2006 6:08 pm

Help for a beginer ( i will repay in gold)

Post by Milan »

I have a code that checks if the verification number matches the number in the database, i now have trouble changing the value of the "active" field in the table from 0 to 1,

So, i need a line of code that will change the value of the field "Active" to 1 (table name is users, database name TESTBASE) for the user specified in the cookie ( i know how to extract this)

any help will be awesome!

thanks!
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

Code: Select all

$query = "UPDATE `users` set `active` = 1 where `user` = '".mysql_escape_string($_COOKIE['user'])."'";
mysql_query($query)
  or die(mysql_error());
Milan
Forum Commoner
Posts: 97
Joined: Wed May 17, 2006 6:08 pm

AWESOME!

Post by Milan »

The force flows strong within you!

As i promised, first time i see you my golden teeth it yours!
Milan
Forum Commoner
Posts: 97
Joined: Wed May 17, 2006 6:08 pm

yup!

Post by Milan »

Yup it works!

( it's not that i doubted...)

Thanks a lot for taking time to help me with this!
Post Reply