Jump to content

Parse Error on my script.


biohazard35

Recommended Posts

I'm just now learning how to do PHP and I'm having trouble with a script I'm making. The script is:

 

<?php
$username="username";
$password="password";
$database="database";

$CoordX=$_POST['CoordX'];
$CoordY=$_POST['CoordY'];
$TypePlane=$_POST['TypePlane'];
$Area=$_POST['Area'];

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$query = "INSERT INTO tablename VALUES
('','$CoordX','$CoordY','$TypePlane','$Area');

mysql_query($query);

mysql_close();
?>

 

When ever I try to submit the form that goes with it I get this error:

 

Parse error: syntax error, unexpected $end in /home/zacsblog/public_html/insert.php on line 29

 

What is the problem?? Please help. Line 29 is the very end of the script.

Link to comment
https://forums.phpfreaks.com/topic/207991-parse-error-on-my-script/
Share on other sites

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.