hello guy s,
i have made a form called contact in my database using mysql,and i wrote simple php code to connect my database.also another linked form i called phonebook.php which where i post my index.php using this format:
Code:
<form action="phonebook.php" method="post">
When i save contacts from my webpage i can locate it in the databse but it dosent display in my webpage.
this is my codes index.php
PHP Code:
[SIZE=1]<label for="FirstName" id="ctl01">First Name</label><div class="InputColumn"/>
<input name="FirstName" type="text" maxlength="50" id="FirstName" /><?echo $err01; ?>
<br/>
<label for="LastName" id="ctl04">Last Name</label><div class="InputColumn"/>
<input name="LastName" type="text" maxlength="50" id="LastName" /> <? echo $error2; ?>
<br/>
phone<div class="InputColumn"/>
<input name="phone" type="text" maxlength="50" /><? echo $error3; ?>
<br/>
<label for="Comments" id="ctl25">Comments</label><div class="InputColumn"/>
<textarea name="Comments" rows="6" cols="30" id="Comments"></textarea>
<br/>
favorite:
<input type="checkbox" name="favorite" value="favorite"/>
<br/>
<input type="submit" value="submit" name="submit" />
</fieldset>
</form>
<fieldset>
<table border="1">
<tr>
<th>S.Num</th>
<th>First Name</th>
<th>Last Name</th>
<th>Description</th>
<th>Phone Number</th>
<th>Favorite</th>
</tr>
<?
mysql_connect("localhost","godoke08","FTvmkN51") or die("error: cannot connect database");
mysql_select_db("godoke08");
$qr=mysql_query("INSERT INTO Contact");
{
?>
<tr>
<td>abc</td>
<td>godwin</td>
<td>abc</td>
<td>abc</td>
<td>abc</td>
<td>abc</td>
</tr>
<?
}
?>
</table>
<br/>
</fieldset>
</body>
</html>
[/SIZE]