Vovex Technology
New member
Ok so today I am working on making my form data be imported into my mysql database that I setup. Yet when I run the addrequest.php I get the following error.
Here is the code for addrequest.php
You can view the form by visiting:
http://www.aatechnical.com/?pid=request
Please help. I need to finish this peice of code before I can start working on the next. Thanks in advance.
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/aatechni/public_html/addrequest.php on line 3
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/aatechni/public_html/addrequest.php on line 4
Parse error: parse error in /home/aatechni/public_html/addrequest.php on line 4
Here is the code for addrequest.php
PHP:
<?
$username="******";
$password="******";
$database="******";
$firstname=addslashes($_POST['firstname']);
$lastname=addslashes($_POST['lastname']);
$company=addslashes($_POST['company']);
$phonenumber=addslashes($_POST['phonenumber']);
$address1=addslashes($_POST['address1']);
$address2=addslashes($_POST['address2']);
$city=addslashes($_POST['city']);
$state=addslashes($_POST['state']);
$zipcode=addslashes($_POST['zipcode']);
$brand=addslashes($_POST['brand']);
$model=addslashes($_POST['model']);
$description=addslashes($_POST['description']);
$os=addslashes($_POST['os']);
$urgency=addslashes($_POST['urgency']);
$regdate = date('m d, Y');
$status="new";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query("INSERT INTO users (firstname, lastname, company, phonenumber, address1, address2, city, state, zipcode, brand, model, os, urgency, regdate, status) VALUES ('$firstname[0]','$lastname[1]','$company[2]','$phonenumber[3]','$address1[4]','$address2[5]','$city[6]','$state[7]','$zipcode[8]','$brand[9]','$model[10]','$description[11]','$os[12]','$urgency[13]','$regdate[14]','$status[15]')");
mysql_close();
?>
You can view the form by visiting:
http://www.aatechnical.com/?pid=request
Please help. I need to finish this peice of code before I can start working on the next. Thanks in advance.