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(); ?> Link to comment https://forums.phpfreaks.com/topic/211578-dont-understand-error/ 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. Link to comment https://forums.phpfreaks.com/topic/211578-dont-understand-error/#findComment-1102985 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"); Link to comment https://forums.phpfreaks.com/topic/211578-dont-understand-error/#findComment-1103006 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.