Jump to content

Noob question keep getting Parse error: syntax error, unexpected $end Error


turkman

Recommended Posts

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';
?>

<?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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.