and I think I'm soooooo close to having it work but I'm getting this one error when i try and run it
Code: Select all
Fatal error: Function name must be a string in /home/a2778613/public_html/add.php on line 3anyway here's my code:
Code: Select all
<?php
$stid = $_POST('stid');
$fname = $_POST('fname');
$sname = $_POST('sname');
$crs = $_POST('crs');
$sch = $_POST('sch');
$yos = $_POST('yos');
$con = mysql_connect("[i]dbhost[/i]", "[i]username[/i]", "[i]password[/i]");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("[i]dbname[/i]", $con);
mysql_query("INSERT INTO students VALUES($stid, $fname, $sname, $crs, $sch, $yos)");
mysql_close($con);
?>