Hi, I am trying to insert three fields from my form into a mysql db but for some reason It dosn't give my errors and yet it dosn't insert it into the db, any suggestions please?
<?php require_once('Connections/Connection.php'); ?>
<?php
$submit = $_POST['submit'];
$destination = $_POST['destination_name'];
$AdultPrice = $_POST['Adult_price'];
$ChildrenPrice = $_POST['Children_price'];
if(isset($submit)) {
$Connection = mysql_pconnect($hostname_Connection, $username_Connection, $password_Connection) or die(mysql_error());
mysql_select_db($database_Connection, $Connection);
$query = ("INSERT INTO destination (destination_name, destination_adult_price, destination_children_price) VALUES ('$destination', '$AdultPrice', '$ChildrenPrice')");
$Recordset1 = mysql_query($query, $Connection) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_close();
}
else {
echo '<p><font color="990000" size="+2">OOPS!! The EMAIL AND OR, USERNAME you entered are not valid registered user detail</font></p>';
echo '<p> Please either re-enter the correct email and a matching username, or Register an Account using the link on this page!</p>';
echo '<b><hr color="990000">';
}
?>
<?php require_once('Connections/Connection.php'); ?>
<?php
$submit = $_POST['submit'];
$destination = $_POST['destination_name'];
$AdultPrice = $_POST['Adult_price'];
$ChildrenPrice = $_POST['Children_price'];
if(isset($submit)) {
$Connection = mysql_pconnect($hostname_Connection, $username_Connection, $password_Connection) or die(mysql_error());
mysql_select_db($database_Connection, $Connection);
$query = ("INSERT INTO destination (destination_name, destination_adult_price, destination_children_price) VALUES ('$destination', '$AdultPrice', '$ChildrenPrice')");
$Recordset1 = mysql_query($query, $Connection) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_close();
}
else {
echo '<p><font color="990000" size="+2">OOPS!! The EMAIL AND OR, USERNAME you entered are not valid registered user detail</font></p>';
echo '<p> Please either re-enter the correct email and a matching username, or Register an Account using the link on this page!</p>';
echo '<b><hr color="990000">';
}
?>