TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
Advertisement
Associates
Associates
techtuts Darkmindz
CSS Tutorials Tutorialsphere.com - Free Online Tutorials
Boston PHP SurfnLearn
Reply
 
LinkBack Thread Tools Display Modes
Old 03-29-2008, 05:14 PM   #1 (permalink)
The Wanderer
 
Join Date: Mar 2008
Posts: 7
Thanks: 2
subman is on a distinguished road
Default Update

Im having trouble updating a table...

The query

PHP Code:
$sql "UPDATE username password email accesslevel FROM users WHERE username = '$user' AND password = '$md5' AND email = '$email' AND accesslevel = '$access' LIMIT 1;";
    
$query mysql_query($sql) or die(mysql_error()); 

Any ideas?
subman is offline  
Reply With Quote
Old 03-29-2008, 05:17 PM   #2 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 701
Thanks: 2
Salathe is on a distinguished road
Default

The column names need to be comma-separated: UPDATE username, password, email, accesslevel ...
__________________
Salathe is offline  
Reply With Quote
Old 03-29-2008, 05:21 PM   #3 (permalink)
The Wanderer
 
Join Date: Mar 2008
Posts: 7
Thanks: 2
subman is on a distinguished road
Default

EDIT: Fixed it...
Thanks.

Last edited by subman : 03-29-2008 at 05:55 PM.
subman is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:50 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0