Hi
I m unable to insert data into db in mysql.Here is the html code
<form id="geoform" role="form" action="insert.php" method="post">
<input name="show-confirmation" value="true" type="hidden">
<div class="large-7 columns">
<input autocomplete="off" name="address" id="geocomplete" placeholder="Enter Your Street Address" class="black-ph" type="text">
</div>
<div class="large-2 columns">
<input name="unit" id="unit" placeholder="Unit #" type="text">
</div>
<div class="large-3 columns">
<button type="submit" id="b1" class="button prefix"><span class="butlabel">Check Value!</span><span class="spinner"></span></button>
</div>
Here is the php code
<?php
//Establishing Connection with Server
$connection = @mysql_connect("localhost", "root", "");
//Selecting Database from Server
$db = @mysql_select_db("property-calculator", $connection);
if(isset($_POST['submit'])){
//Fetching variables of the form which travels in URL
$address = $_POST['address'];
$unit = $_POST['unit'];
if($address !=''||$unit !=''){
//Insert Query of SQL
$query = @mysql_query("insert into property(add1,un) values ('$address', '$unit')");
echo "<br/><br/><span>Data Inserted successfully...!!</span>";
}
else{
echo "<p>Insertion Failed <br/> Some Fields are Blank....!!</p>";
}
}
//Closing Connection with Server
mysql_close($connection);
?>
Please help me