PHP Code: 
<?php
$con 
mysql_connect("localhost","MYSQL USERNAME","MYSQL PASS");
if (!
$con)
  {
  die(
'Could not connect: ' mysql_error());
  }

mysql_select_db("seedvps_whm"$con);

$sql="INSERT INTO tblcustomaddon location, status, username, password, ip);
VALUES
('
$_POST[location]','$_POST[status]','$_POST[username]','$_POST[password]','$_POST[ip]')";

if (!
mysql_query($sql,$con))
  {
  die(
'Error: ' mysql_error());
  }
echo 
"1 record added";

mysql_close($con)
?>
Post
Code: 
<html>

<body>



<form action="insert.php" method="post">

Location: <input type="text" name="location" />

Status: <input type="text" name="status" />

Username: <input type="text" name="username" />

Password: <input type="text" name="password" />

IP: <input type="text" name="ip" />

<input type="submit" />

</form>



</body>

</html>
Error
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'location, status, username, password, ip) VALUES ('fr','jaja','BigBoSs','kaka'' at line 1
EnCiPh3r Reviewed by EnCiPh3r on . MySQL insert using PHP Help <?php $con = mysql_connect("localhost","MYSQL USERNAME","MYSQL PASS"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("seedvps_whm", $con); $sql="INSERT INTO tblcustomaddon location, status, username, password, ip); Rating: 5