after having sent the variables via a form I try this insert statement with. Result?!!! nothing -
here's the code -
<?php
//connect to the dbase
$dbname='travellerdb';
$host='localhost';
$user='root';
$password='django';
$table_name = "resorts";
$search_field01 = "name";
$search_field02 = "country";
$search_field03 = "state_area";
$search_field04 = "our_id";
$search_field05 = "about";
$search_field06 = "accomodation";
$search_field07 = "location";
$search_field08 = "facilities";
$search_field09 = "product";
$search_field10 = "included";
$search_field11 = "not_included";
$search_field11 = "room_type_01";
$search_field11 = "room_type_02";
$search_field11 = "room_type_03";
$search_field11 = "room_type_04";
$search_field11 = "room_type_05";
$search_string01 = $resort_name;
$search_string02 = $resort_country;
$search_string03 = $resort_identification;
$search_string04 = $resort_about;
$search_string05 = $resort_accomodation;
$search_string06 = $resort_location;
$search_string07 = $resort_facilities;
$search_string08 = $resort_product;
$search_string09 = $resort_included;
$search_string10 = $resort_room_type_01;
$search_string11 = $resort_room_type_02;
$search_string12 = $resort_room_type_03;
$search_string13 = $resort_room_type_04;
$search_string14 = $resort_room_type_05;
//pass the variables on to execute the search
$search_string = $holder_target;
$mysql_link = mysql_connect($host, $user, $password);
mysql_select_db($dbname , $mysql_link)OR DIE( "Unable to connect to database
- Please contact the <a href='mailto://[email protected]'>administrator</a>");
//This function executes the queries
$mysql_link = mysql_connect($host, $user, $password);
//links for the subsequent records
$insert_statement = "INSERT INTO $table_name ($search_field01,
$search_field02, $search_field03,$search_field04, $search_field05,
$search_field06, $search_field07,$search_field08, $search_field09,
$search_field10, $search_field11,$search_field12, $search_field13,
$search_field14) VALUES ('$search_string01', '$search_string02',
'$search_string03', '$search_string04', '$search_string05', '$search_string06',
'$search_string07','$search_string08', '$search_string09', '$search_string10',
'$search_string11', '$search_string12', '$search_string13', '$search_string14')";
mysql_query($insert_statement, $mysql_link);
mysql_close($mysql_link);
?>
here's the code -
<?php
//connect to the dbase
$dbname='travellerdb';
$host='localhost';
$user='root';
$password='django';
$table_name = "resorts";
$search_field01 = "name";
$search_field02 = "country";
$search_field03 = "state_area";
$search_field04 = "our_id";
$search_field05 = "about";
$search_field06 = "accomodation";
$search_field07 = "location";
$search_field08 = "facilities";
$search_field09 = "product";
$search_field10 = "included";
$search_field11 = "not_included";
$search_field11 = "room_type_01";
$search_field11 = "room_type_02";
$search_field11 = "room_type_03";
$search_field11 = "room_type_04";
$search_field11 = "room_type_05";
$search_string01 = $resort_name;
$search_string02 = $resort_country;
$search_string03 = $resort_identification;
$search_string04 = $resort_about;
$search_string05 = $resort_accomodation;
$search_string06 = $resort_location;
$search_string07 = $resort_facilities;
$search_string08 = $resort_product;
$search_string09 = $resort_included;
$search_string10 = $resort_room_type_01;
$search_string11 = $resort_room_type_02;
$search_string12 = $resort_room_type_03;
$search_string13 = $resort_room_type_04;
$search_string14 = $resort_room_type_05;
//pass the variables on to execute the search
$search_string = $holder_target;
$mysql_link = mysql_connect($host, $user, $password);
mysql_select_db($dbname , $mysql_link)OR DIE( "Unable to connect to database
- Please contact the <a href='mailto://[email protected]'>administrator</a>");
//This function executes the queries
$mysql_link = mysql_connect($host, $user, $password);
//links for the subsequent records
$insert_statement = "INSERT INTO $table_name ($search_field01,
$search_field02, $search_field03,$search_field04, $search_field05,
$search_field06, $search_field07,$search_field08, $search_field09,
$search_field10, $search_field11,$search_field12, $search_field13,
$search_field14) VALUES ('$search_string01', '$search_string02',
'$search_string03', '$search_string04', '$search_string05', '$search_string06',
'$search_string07','$search_string08', '$search_string09', '$search_string10',
'$search_string11', '$search_string12', '$search_string13', '$search_string14')";
mysql_query($insert_statement, $mysql_link);
mysql_close($mysql_link);
?>