Please help me. I’ve got this script and I keep getting errors every time it tries to execute. I would really appreciate your help.
Here is the error:Error: 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 ‘’ at line 10
Here is the script:
<?php include('dbconnect.php'); ?> <?php $membername=$_POST['membername']; if(isset($_POST['username']) and $_POST['username']!=""){ $sponsorid=$_SESSION['memberid_for_sp']; }else{ $sponsorid=0; } $dateofjoining=date("Y-m-d");; $address=$_POST['address']; $city=$_POST['city']; $state=$_POST['state']; $country=$_POST['country']; $mobileno=$_POST['mobileno']; $countrycode=$_POST['countrycode']; $dateofbirth=$_POST['dateofbirth']; $emailid=$_POST['emailid']; $myid=$_SESSION['memberid']; $sql="UPDATE personal SET membername='$membername', sponsorid='$sponsorid', dateofjoining='$dateofjoining', address='$address', city='$city', state='$state', country='$country', mobileno='$mobileno', countrycode='$countrycode', dateofbirth='$dateofbirth', emailid='$emailid' WHERE memberid=$myid"; if (!mysql_query($sql)) { die('Error: ' . mysql_error()); } echo "1 record added"; header('Location: coapp.php?msg=1'); //return $frmdetail.php; ?>Thank you so much for all of your help!
Eric