I am trying to post data from a table to a MYSQL database. I am a compete newbie and I am getting stuck. I assume it's an obvious mistake. Any hep would be appreciated
This is the warning I am getting:
Parse error: syntax error, unexpected ',', expecting ']' in /home/infernoc/public_html/postdata4.php on line 14
These are the pages that run the script
<?php
$host="localhost";
$username="infernoc_daniel";
$password="xxxx";
$database="infernoc_customers";
$table="vip";
mysql_connect("$host","$username","$password") or die(mysql_error());
echo"connected";
mysql_select_db("$database") or die(mysql_error());
echo"database found";
$value = $_POST['fname','lname','address','month_birth','mobile','email'];
$sql = "INSERT INTO $table(fname, lname, address, month_birth, mobile, email) VALUES ('$fname',$lname','$address','$month_birth','$mobile','$email')";
$res=mysql_query($sql) or die ("Error: ". mysql_error(). " with query ". $sql);
echo"VIP added to database";
mysql_close();
?>
The form:
<div class="section">
<h2>Register VIP into Database</h2>
<div id="insidebox1">
<form name="form2" method="post" action="postdata4.php">
<table width="552" border="0">
<tr>
<td width="136">First Name:</td>
<td width="173"><input type="text" name="fname" maxlength="50" value=""/></td>
<td width="229"> </td>
</tr>
<tr>
<td>Last Name</td>
<td><input type="text" name="lname" maxlength="50" value=""/></td>
<td> </td>
</tr>
<tr>
<td>Address</td>
<td><input type="text" name="address" maxlength="50" value=""/></td>
<td> </td>
</tr>
<tr>
<td>Birthday Month: </td>
<td><input type="text" name="month_birth" maxlength="15" value=""/></td>
<td> </td>
</tr>
<tr>
<td>Mobile: </td>
<td><input type="text" name="mobile" maxlength="9"/></td>
<td> </td>
</tr>
<tr>
<td>Email: </td>
<td><input type="text" name="email" maxlength="50" value=""/></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> <input name="Register" type="submit" value="Register" /></td>
<td> </td>
</tr>
</table>
</form>
</div>
</div>