im at a complete loss here...reinstalled everything...now im using a WAMP bundle...cant seem to figure out whats going on...here's my latest code
<html>
<head>
<title>add info into sql</title>
</head>
<body>
<?php
include 'dbconnect.php';
{
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$age = $_POST['age'];
$query = "INSERT INTO Person('FirstName', 'LastName', 'Age');
mysql_query($query) or die('Error, Insert query failed');
mysql_Close($conn)
echo 'new data added';
}
else
{
?>
<form method="post">
<table width="400" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="100">Firstname</td>
<td><input name="Firstname" type="text" id="firstname"></td>
</tr>
<tr>
<td width="100">lastname</td>
<td><input name="lastname" type="text" id="lastname"></td>
</tr>
<tr>
<td width="100">age</td>
<td><input name="age" type="text" id="age"></td>
</tr>
<tr>
<td width="100"> </td>
<td> </td>
</tr>
<tr>
<td width="100"> </td>
<td><input name="add" type="submit" id="add" value="Add New Info"></td>
</tr>
</table>
</form>
<?php
}
?>
</body>
</html>
and the dbconnect.php is:
<?php
// Connect to the database
$host = "127.0.0.1:3307"; // db host
$user = "root"; // db username
$pass = "ind34dol"; // db password
$db = "testing"; // db name
$connection = mysql_connect ($host, $user, $pass) or die ("Unable to connect");
mysql_select_db ($db) or die ("Unable to select database");
?>
what am i missing here? where am i screwing up? im not getting ANY output, not even the form that i created..NOTHING