A
Anonymous
Guest
sorry about this but i have been trying to spot mistakes and i dont kno where i have gone wrong! I have been trying to follow an online help manual but its crap!
Im trying to add into a database using a HTML form. Below is the code i am using. I dont get any errors but when i check the database nothing is added.
The code for the HTML page is:
The included insert.php page is:
Once agian any help would be great!
Im trying to add into a database using a HTML form. Below is the code i am using. I dont get any errors but when i check the database nothing is added.
The code for the HTML page is:
Code:
<title>Clubboss - Add a Member</title><form action="insert.php" method="post">
First Name: <input type="text" name="first name"><br>
Last Name: <input type="text" name="second name"><br>
Forum Name: <input type="text" name="forum name"><br>
Phone: <input type="text" name="phone number"><br>
Mobile: <input type="text" name="mobile number"><br>
Email: <input type="text" name="email address"><br>
Expire: <input type="text" name="membership expire"><br>
Insurance provider:
<select name="select" size="1">
<option selected>please select</option>
<option>BBC</option>
<option>BKSA</option>
</select>
<br>
insurance number: <input type="text" name="insurance number"><br>
Insurance expire: <input type="text" name="insurance expire"><br>
<input type="Submit">
</form>
The included insert.php page is:
Code:
<?
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO 'members' VALUES ('','$first name','$second name','$forum name','$phone number','$mobile number','$email address','$membership expire','$insurance provider','$insurance number','$insurance expire')";
mysql_query($query);
mysql_close();
?>
Once agian any help would be great!