You have an extra semi-colon after the isset checks, then have a missing semi-colon after the mysql_close() call. By way on advice concerning code formatting, I would suggest:
<?php
if (isset($_POST['fname'], $_POST['lname'], $_POST['email'], $_POST['password'], $_POST['rating']))
{
//make connection to database
$con = mysql_connect("localhost","root","******");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("zid", $con);
//variables
$cid = $_POST['cid'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$psswd = $_POST['password'];
$rating = $_POST['rating'];
$sql = sprintf("INSERT INTO userinfo(cid, firstn, lastn, email, psswd, rating)
VALUES ('%s', '%s', '%s', '%s', '%s', '%s')"
mysql_real_escape_string($cid, $con),
mysql_real_escape_string($fname, $con),
mysql_real_escape_string($lname, $con),
mysql_real_escape_string($email, $con),
mysql_real_escape_string($psswd, $con),
mysql_real_escape_string($rating,$con));
if (!mysql_query($sql, $con))
{
die('Error: ' . mysql_error());
}
echo "Registration Sent!";
mysql_close($con);
}
else
{
echo "You need to completly fill out the form before submitting";
}
?>
Note that you do not actually need to assign $POST['cid'] to $cid (and the others) if you never actually change $cid or further validate the incoming data. You could use $POST['cid'] directly.