I need some help with submitting form data to a db. I have tried so many ways to do this and it seems for what ever reason If I have any success I get a blank record inserted. Here is the code to my form. If anyone could write up an sql connection script with an insert statement and possibly verification to be sure no fields were left empty, it would be truely a huge help.
[code=php]<form name=”step1″ method=”post” action=”basic2.php”>
<table border=”0″ cellpadding=”2″ cellspacing=”0″ width=”100%”>
<tbody><tr>
<td colspan=”2″><b>Please enter a valid e-mail address. You will need to confirm your e-mail address to activate your account.</b>
</td>
</tr>
<tr>
<td class=”required”>Company Name</td>
<td class=”required”><input type=”text” name=”comp_name” size=”20″ maxlength=”15″ /></td>
</tr>
<tr>
<td class=”required”>Establishment Type</td>
<td class=”required”>
<select name=”comp_type”>
<option selected>- Select One -</option>
<option value=”bars”>Bar</option>
<option value=”clubs”>Club</option>
<option value=”coffee_shops”>Coffee Shop</option>
<option value=”resturants”>Resturant</option>
</select>
</td>
</tr>
<tr>
<td class=”required”>Address</td>
<td class=”required”><input type=”text” name=”comp_address” size=”30″ maxlength=”30″ /></td>
</tr>
<tr>
<td class=”required”>Phone Number</td>
<td><input type=”text” name=”comp_phone” size=”20″ maxlength=”40″ /></td>
</tr>
<tr>
<td class=”required”>Email Address</td>
<td><input type=”text” name=”comp_email” size=”30″ maxlength=”20″ /></td>
</tr>
<tr>
<td class=”required”>Website Address</td>
<td><input type=”text” name=”comp_web” size=”30″ maxlength=”20″ /></td>
</tr>
<tr>
<td class=”required”>Description</td>
<td><textarea name=”comp_desc” cols=”30″ rows=”12″></textarea></td>
</tr>
<tr>
<td class=”verdana11″ align=”right” width=”125″><p></td>
<td><input onClick=”basic2.php” type=”submit” name=”submit” value=”Go to step 2″ /></td>
</tr>
</tbody>
</table>
</form>
Thanks alot for the help