ckdoublenecks Posted August 24, 2010 Share Posted August 24, 2010 Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\hofiles\mschginsert.php on line 12 <?php $dep=$_POST['dep']; $name=$_POST['name']; $apt=$_POST['apt']; $amtpaid=$_POST['amtpaid']; $damage=$_POST['damage']; $month=$_POST['month']; $courtcost=$_POST['courtcost']; $nsf=$_POST['nsf']; $latechg=$_POST['latechg']; mysql_connect(localhost,root,""); mysql_select_db(mschgdb) or die "Unable to select database"); $query = "INSERT INTO miscdata VALUES ('','$dep','$name','$apt','$amtpaid','$damage','$month','$courtcost','$nsf','$latechg')"; mysql_query($query); mysql_close(); ?> Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted August 24, 2010 Share Posted August 24, 2010 Missing the opening parenthesis on the or die() statement. Quote Link to comment Share on other sites More sharing options...
pengu Posted August 24, 2010 Share Posted August 24, 2010 As Pikachu said. Change mysql_select_db(mschgdb) or die "Unable to select database"); To mysql_select_db(mschgdb) or die ("Unable to select database"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.