...

View Full Version : problem with mysql connection



sirborder
02-22-2007, 12:41 AM
I have a form that my users fill out to get my services. The form places whatever the user filled in into a database. I get this error when i try to connect to the database
Parse error: parse error, unexpected T_STRING in /homepages/0/d176381271/htdocs/kylecaleb/packages/insert.php on line 43


<?php
$user="username";
$password="pass";
$database="databasen";
$host="localhost";

$first=$_POST['firstname'];
$last=$_POST['lastname'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$mobile=$_POST['mobile'];
$address=$_POST['address'];
$city=$_POST['city'];
$state=$_POST['state'];
$zip=$_POST['zip'];
$package=$_POST['package']

mysql_connect($host,$user,$password) or die( "Unable to connect to database"); <----line 43
mysql_select_db($database) or die( "Unable to select database");

$query= "INSERT INTO contacts VALUES('','$first','$last','$email','$phone','$mobile','$address','$city','$state','$zip','$package' )";
mysql_query($query);

echo("Thank you for signing up. You will recieve an email when your submision is reviewed.");

mysql_close();
?>

I have no clue what it could be. Thanks in advance for any help.

Nightfire
02-22-2007, 12:53 AM
Missing semi-colon

$package=$_POST['package'];

sirborder
02-22-2007, 12:58 AM
ya?

(who is that????)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum