turkman Posted June 28, 2008 Share Posted June 28, 2008 Hey i keep getting this error Parse error: syntax error, unexpected $end with this script. Basically its just a php file called when someone enters into and preses the add contact button. All the info is passed using post <?php include 'includes/tpl_vtop.html'; include 'includes/tpl_header.html'; include 'includes/tpl_lcol.html'; ?> <div id="ccol"> <div id="ccolhdr"><div class="hdrtxt"></div></div> <div id="allcol"> <?php include'usephp/conf.php'; include 'usephp/opendb.php'; $jname = $_POST["lname"]; $jemail = $_POST["lemail"]; $jphone = $_POST["lphone"]; $jinfo = $_POST["linfo"]; $query = "INSERT INTO contacts (cname,cemail,cphone,cinfo) values ('$jname', '$jemail', '$jphone', '$jinfo'); echo $query; mysql_query($query); include 'usephp/closedb.php'; ?> </div> </div> <?php include 'includes/tpl_footer.html'; include 'includes/tpl_copyw.html'; include 'includes/tpl_vbottom.html'; ?> Link to comment https://forums.phpfreaks.com/topic/112351-noob-question-keep-getting-parse-error-syntax-error-unexpected-end-error/ Share on other sites More sharing options...
cdog5000 Posted June 28, 2008 Share Posted June 28, 2008 <?php include 'includes/tpl_vtop.html'; include 'includes/tpl_header.html'; include 'includes/tpl_lcol.html'; ?> <div id="ccol"> <div id="ccolhdr"><div class="hdrtxt"></div></div> <div id="allcol"> <?php include'usephp/conf.php'; include 'usephp/opendb.php'; $jname = $_POST["lname"]; $jemail = $_POST["lemail"]; $jphone = $_POST["lphone"]; $jinfo = $_POST["linfo"]; $query = "INSERT INTO contacts (cname,cemail,cphone,cinfo) values ('$jname', '$jemail', '$jphone', '$jinfo')"; echo $query; mysql_query($query); include 'usephp/closedb.php'; ?> </div> </div> <?php include 'includes/tpl_footer.html'; include 'includes/tpl_copyw.html'; include 'includes/tpl_vbottom.html'; ?> you forgot to put another " at the end of your query Link to comment https://forums.phpfreaks.com/topic/112351-noob-question-keep-getting-parse-error-syntax-error-unexpected-end-error/#findComment-576834 Share on other sites More sharing options...
MasterACE14 Posted June 28, 2008 Share Posted June 28, 2008 The php file hasn't been completely uploaded to your webhost. Link to comment https://forums.phpfreaks.com/topic/112351-noob-question-keep-getting-parse-error-syntax-error-unexpected-end-error/#findComment-576987 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.