Hi,
I have a script with the following in a page called profile.php
<?
include "header.php" ;
include "session.php";
$GetFile = file("../html/member/profile.html") ;
$Content = join("", $GetFile) ;
$id = $memberid;
if($submit)
{
$set = "firstname = '$firstname'," ;
$set .= "lastname = '$lastname'," ;
$set .= "email = '$email'," ;
$set .= "username = '$username'," ;
$set .= "password = '$password'," ;
//$set .= "paypal_email = '$paypal_email'," ;
//$set .= "stormpay_email = '$stormpay_email'" ;
$db->insert("update members set $set where id = '$id'") ;
}
$Title = "Edit Member Profile" ;
$Heading = "Edit Member Details" ;
$GetProd = $db->get_a_line("select * from members where id = '$id'") ;
@extract($GetProd) ;
//$date_joined = $date_joined;
//$Lock = "readonly" ;
$Content = preg_replace($Ptn,"$$1",$Content) ;
echo $Content ;
include "footer.php" ;
?>
I am receiving the following error when I use the update option on the page in the browser:
update members set firstname = 'firstname',lastname = 'surname',email = 'email@myemail.com',username = 'username',password = 'testing', where id = '10' 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where id = '10'' at line 1
Any ideas where the error may be coming from?
Thanks in advance