i used this code to insert data into database but nothing happening..
<?php
session_start();
if(isset($_POST['submit']))
{
$dbhost="localhost";
$dbuser="root";
$dbpass="";
$tablename="requested_quotes";
$conn=mysql_connect($dbhost, $dbuser, $dbpass)or die("cannot connect");
mysql_select_db('1')or die("cannort select DB");
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$sex=$_POST['sex'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$address1=$_POST['address1'];
$address2=$_POST['address2'];
$country=$_POST['country'];
$city=$_POST['city'];
$state=$_POST['zip'];
$date=$_POST['date'];
$contactme=$_POST['contactme'];
$interest=$_POST['interest'];
$sql="INSERT INTO $tablename(first_name, last_name, sex, email,phone, address1, address2,country, city,zip, respond_date, contact_via,interest)
values('$fname','$lname', $sex,'$mail',$email, $phone,$address1, $address2, $country, $city, $state, $date, $contactme, $interest)";
$result=mysql_query($sql);
if($result)
{
$session['message'] = "successfully inserted into datebase";
}
else
{
$session['message'] = "failed to insert into datebase";
}
}
?>
<form name="signup" action="" method="POST" onsubmit="return validate()"><br/>
First Name:<input type="text" placeholder="First Name" name="fname"><br/>
Last Name:<input type="text" placeholder="Last Name" name="lname"><br/>
gender:</select>
<input type="radio" name="sex" value="male" checked="checked">Male
<input type="radio" name="sex" value="female">Female<br/>
Email:<input type="text" placeholder="Your Email" maxlength="30" size="45" name="email"> <br />
Phone:<input type="text" placeholder="Contact number" name="phone"><br/>
Address1:<input type="text" placeholder="address1" name="address1"><br/>
Address2:<input type="text" placeholder="address2" name="address2"><br/>
Country:<select name="country" size="">
<option value="">select..</option>
<option value="uk">UK</option>
<option value="usa">USA</option>
<option value="spain">Spain</option>
<option value="france">France</option>
<option value="china">China</option>
<option value="japan">Japan</option>
</select><br />
City:<input type="text" placeholder="city" name="city"><br/>
State:<input type="text" placeholder="State" name="state"><br/>
Zip Code:<input type="text" placeholder="zip code" name="zipcode"><br/>
Date Respond required:<input type="text" placeholder="d/m/y " name="date"><br/>
Contact me via:<select name="contactme" size="">
<option value="email">Email</option>
<option value="phone">Phone</option>
<option value="post">Post</option>
</select><br />
servides Interested:</select>
<input type="checkbox" name="interest[]" value="web">Web
<input type="checkbox" name="interest[]" value="database">Database
<input type="checkbox" name="interest[]" value="networkings">Networking
</select><br />
<input type="submit" name="submit" value="Submit" >
</form>
...and my database is as follows