I haven’t used PHP for a while I have set up a form but I am struggling inputting this data to MySQL.
Here is my PHP code:
[code=php]<?php
require ‘connect.inc.php’;
$con = (mysql_connect($mysql_host, $mysql_user, $mysql_pass));
mysql_connect($mysql_host, $mysql_user, $mysql_pass);
mysql_select_db($mysql_db);
$sql=”INSERT INTO ‘1’ VALUES ($_POST[fullname],$_POST[grade],$_POST[joindate])”;
if (!mysql_query($sql,$con))
{
die(‘Error: ‘ . mysql_error());
}
echo “1 record added”;
mysql_close($con)
?>
The part I’m looking for is mainly this line:
[code=php]$sql=”INSERT INTO ‘1’ VALUES ($_POST[fullname],$_POST[grade],$_POST[joindate])”;
As i Say i have not used PHP for a long time and the problem is probably a new update or a simple thing i have forgot.