Doesn't give me an error

wxdqz

New Member
this is my code.. I have it in 2 files, one is a html file for the form to get the data and the second is a PHP file which does the db connection and stuff, when I click submit, I get a blank page..

/*form.htm*/


<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="process.php">
<table width="500" border="0" cellspacing="0" cellpadding="1" bgcolor="#000000" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="5" bgcolor="#CCCCFF">
<tr>
<td colspan=2 bgcolor="#9999CC">
<div align="center"><b>Member's Information</b></div>
</td>
</tr>
<tr>
<td><font size="2">FirstName: </font>
<input type="text" name="textfield">
</td>
<td><font size="2">Last Name: </font>
<input type="text" name="textfield2">
</td>
</tr>
<tr>
<td><font size="2">Member No. </font>
<input type="text" name="textfield3">
</td>
<td><font size="2">Status: </font>
<input type="text" name="textfield4">
</td>
</tr>
<tr>
<td colspan=2>
<div align="left"><font size="2">Date:</font>
<input type="text" name="textfield5">
</div>
</td>
</tr>
<tr>
<td colspan=2>
<div align="center">
<input type="submit" name="Submit" value=http://www.phpbuilder.com/board/archive/index.php/"Submit Info">
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>


/*process.php */

<?php

if (isset($submit)) {

$db = mysql_connect("localhost","test","passwd");

mysql_select_db("test",$db);

$Insertquery = "Insert Into tblmember values ('$Fname' , '$Lname' ,'$MemberNo','$status','$date')";

$result = mysql_query ($Insertquery)
or die ("Insert failed");


$query = "SELECT * FROM tblmember";
$result = mysql_query ($query)
or die ("Select Query failed");
$num_results = mysql_num_rows($result);

// printing HTML result


print "<table>\n";
echo "<table border=1>\n";
echo "<tr><th bgcolor=\"#008080\">First Name </td>
<th bgcolor=\"#008080\">last Name </td>
<th bgcolor=\"#008080\">Member Number </td>
<th bgcolor=\"#008080\">Status</td>
<th bgcolor=\"#008080\">Date </td>
<tr>";
print "\n";
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);


echo "<tr><td>";
print ($row["Fname"]);
echo "</td><td>";
print ($row["Lname"] );
echo "</td><td>";
print ($row["Memberno"] );
echo "</td><td>";
print ($row["Status"] );
echo "</td><td>";
print ($row["JoinDate"] );
echo "</td><tr>";

}
echo "</table><br>\n";

}
?>
 
Back
Top