Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Web Technology Web Design Tools Photoshop,Dreamweaver,Flash,Etc.Tutorials , References , Examples.

Web Technology Thread, SQL insert in Programming , WebDesign & Development; Is there anything wrong with this syntax? PHP: --------- $sql = "INSERT INTO USER_ACCOUNTS ('username','password','email','realname','postcod e','gender')... Is there anything wrong ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=19034


Reply
 
 
Senior Member

Reply With Quote
 
Join Date: Dec 2008
Posts: 18,122
20-01-2009, 12:50 AM
 
Is there anything wrong with this syntax? PHP: --------- $sql = "INSERT INTO USER_ACCOUNTS ('username','password','email','realname','postcod e','gender')...

Is there anything wrong with this syntax?

PHP Code:
$sql = "INSERT INTO USER_ACCOUNTS ('username','password','email','realname','postcod e','gender') VALUES('$reg_username','$reg_password','$reg_email ','$reg_realname','$reg_postcode','$reg_gender')";
$result = mysql_query($sql);
closedb();
if(
$result == true)
{
$_SESSION['user'] = $reg_username;
header('Location: user.php?regester');
exit;
}
else
{
$_SESSION['error'] = 'An unknown error accured, please try again.
'
;
header('Location: user.php?regester');
exit;
}


I keep getting 'An unknown error accured, please try again.'

Any help would be great ... I have a login script on the same page accessing the same database which works fine, so its not the connection.
 
 
 
Reply

Web Technology Thread, SQL insert in Programming , WebDesign & Development; Is there anything wrong with this syntax? PHP: --------- $sql = "INSERT INTO USER_ACCOUNTS ('username','password','email','realname','postcod e','gender')... Is there anything wrong ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=19034


Bookmarks

Tags
insert, sql


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump