I can retrieve data from mysql database using php on Apache server, but for some reason, I can't input anything from php while I have no problem putting data within MySql. please help me
Dan
<head>
<title>Input</title>
</head>
<body>
<?php
if(isset($submit)):
$db = mysql_connect("localhost", "root");
mysql_select_db("income", $db);
$sql = "INSERT INTO amount
VALUES(NULL, '$date', '$company', '$hours', '$rate')";
mysql_query($sql);
print("successfully entered!\n");
endif;
?>
<table width="500" border="0" cellspacing="3" cellpadding="3">
<form method="post" action="income_input.php">
<tr>
<td>Date: (year-month-day)</td>
<td>
<input type="text" name="date">
</td>
</tr>
<tr>
<td>Company:</td>
<td>
<input type="text" name="company">
</td>
</tr>
<tr>
<td>Hours:</td>
<td>
<input type="text" name="hours">
</td>
</tr>
<tr>
<td>Rate:</td>
<td>
<input type="text" name="rate">
</td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" name="submit" value="enter!">
</td>
</tr>
</form>
</table>
</body>