CREATE TABLE `tablename`
(
`id` int NOT NULL AUTO_INCREMENT,
`fieldname` varchar(300) CHARACTER SET utf8 collate utf8_general_ci ,
`fieldname` varchar(300) CHARACTER SET utf8 collate utf8_general_ci,
PRIMARY KEY (`id`)
)
<?php
$query=mysql_connect("192.168.1.170","user","aipl2014");
mysql_select_db("test",$query);
if(isset($_POST['submit']))
{
$description=$_POST['description'];
$day=$_POST['day'];
$origin=$_POST['origin'];
$destination=$_POST['destination'];
$flightnumber=$_POST['flightnumber'];
$frequency=$_POST['frequency'];
$Departure=$_POST['Departure'];
$arrival=$_POST['arrival'];
$query1=mysql_query("insert into packageoffers(description , days ,origin , destination , flightNumber ,frequency , departure , arrival ) values('$description','$day','$origin','$destination','$flightnumber','$frequency','$Departure','$arrival')");
if($query)
{
echo "Travel Package offers successfully submitted ";// to move to another page use header("location:index.php");
}
else
{
echo "There is a problem in user registration, Please try again ";
}
}
?>
<fieldset style="width:275px;">
<h3>Please submit Package offers </h3>
<form method="post" action="insert.php">
Description: <input type="text" name="description" /><br>
Day: <input type="text" name="day" /><br>
Origin: <input type="text" name="origin" /><br>
Destination: <input type="text" name="destination" /><br>
FlightNumber: <input type="text" name="flightnumber" /><br>
Frequency: <input type="text" name="frequency" /><br>
Departure: <input type="text" name="Departure" /><br>
arrival: <input type="text" name="arrival" /><br>
<input type="submit" name="submit">
</form>
</fieldset>
No comments:
Post a Comment