MySQL script for posting values from a field to a DB

akhandal96

Right off the assembly line
I couldn't find any specific section related to web development so I am posting it here,hoping to get answers :-?
Code of my contact form is ~

<form name="contact-form" id="contact-form" action="database.php" method="post">

<fieldset>

<div class="field">
<label for="name">Name</label>
<input type="text" id="name" name="name" autofocus required="required"
title="First and last name">
</div>

<div class="field">
<label for="email">Email</label>
<input type="email" id="email" name="email" title="">
</div>

<div class="field">
<label for="phone">Phone</label>
<input type="text" id="phone" name="phone" required="required" title="If you prefer a phone call">
</div>

<div class="field">
<label for="time">Time</label>
<input type="text" style="width: 70px;" id="timepicker.[1]" value="" />
<script type="text/javascript">
$(document).ready(function() {
$('#timepicker\\.\\[1\\]').timepicker( {
showAnim: 'blind'
} );
});
</script>
</div>

<div class="field">
<label for="date">Date</label>
<input id="datepick" />
</div>

<div class="field">
<label for="trip_type">Trip type</label>
<select id="trip_type" name="trip_type" required="required"
title="Tell us how we can we help you">
<option>Point</option>
<option>Round</option>
<option>Other</option>
</select>
</div>

<div class="field">
<label for="pickup">location</label>
<input type="text" id="pickup" name="pickup" required="required" title="Your pickup location">
</div>


<div class="field">
<label for="destination">blah blah</label>
<input type="text" id="destination" name="destination" required="required" title="Your destination point">
</select>
</div>
<div class="field">
<label for="message">Message</label>
<textarea id="message" name="message" cols="15" rows="5" title="Want to tell us something more?" placeholder="Want to tell us something more?"></textarea>
</div>

<div class="field submit">
<input type="submit" value="Submit"/>
</div>
</fieldset>
</form>

I want the code for database.php,or whatever,I need a tutorial page or the code file by which I could modify to make it work with this form,I need to post all the values in these fields to a database and store there,and should store each time when a new user fill a form.
I googled about it but couldn't find how to code the script to connect to the DB,and post the values there.
Hoping for answers,and code too. :|
 
Top Bottom