Jump to content


Photo

PHP Header


  • Please log in to reply
No replies to this topic

#1 PHPrp

PHPrp
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 11 June 2006 - 08:22 PM

header="HDR    BH2    01    000001        $ramesys_user    $ramesys_pass    $user_ref    $reply_format    $err_desc    $status_msg    $search_type
";
$holiday_search=$header."JNY    0100    $start_rec    $er    $fnum_adults    $fnum_child    $fnum_infant    $depart_date    $search_fwithin    $min_nights    $search_max_nights    $flight_type    $dest    $dep    $dep2    $dep3        $mp    $max_p    $rating    $tour_op    $tour_op2    $tour_op3    $tour_op4    $dep_uk_time    $arr_uk_time    $arr_uk_date    $arr_uk_point    $arr_dest_time    $dep_dest_time    $flight_no_out    $flight_no_ret    $travel_code    $top_insurance    $insurance_co    
";
$holiday_search.="ACC    $resort_code    $resort_name    $hotel_code    $hotel_name    $board_basis    $resort_features    $accom_features    $holiday_code    $transport_code
";

if($child_max_age<=0){
    $child_max_age=10;
}
if($debug){
    view_array2($_SESSION["final_room_selection"],"session final_room_selection");
}
$i=0;
while (list($key, $value) = each ($_SESSION["final_room_selection"]))
{
    $room_desc[$i]=$key;
    $i++;
}
//$room_group_number=1;


//**************************************** NME Record ****************************************************
$i=0;
if($debug){
    view_array2($pass_first_name,"pass_first_name");
}

while (list($key, $value) = each ($pass_first_name))
{
    $room_group_number=$room_allocation[$key];
    //$holiday_search.="NME    ".$_SESSION["pass_title"][$i]."    ".$_SESSION["pass_first_name"][$i]."    ".$_SESSION["pass_surname"][$i]."    ".$_SESSION["pass_day"][$i].$_SESSION["pass_month"][$i].$_SESSION["pass_year"][$i]."    ".stripslashes($room_allocation[$i])."    ".$room_group_number."
    $holiday_search.="NME    ".$_SESSION["pass_title"][$key]."    ".$_SESSION["pass_first_name"][$key]."    ".$_SESSION["pass_surname"][$key]."    ".$_SESSION["pass_day"][$key].$_SESSION["pass_month"][$key].$_SESSION["pass_year"][$key]."    ".stripslashes($final_room_description[$room_allocation[$key]])."    ".$room_group_number."
";
$i++;
}
//**************************************** End NME Record *************************************************

//**************************************** ROM Record *****************************************************
// ROM record
$room_allocation2=array();
reset($room_allocation);
if($debug){
    view_array2($_SESSION["room_selection"],"room_selection");
    view_array2($_SESSION["room_description"],"room_description");
    view_array2($_SESSION["final_room_description"],"final_room_description");
}
reset($final_room_selection);

while (list($key, $value) = each ($_SESSION["room_selection"]))
{
    //echo "<br>key=".$key." value=".$value;
    //$room_no=$_SESSION["final_room_description"][$value];
    if($value>0){
    $holiday_search.="ROM    ".$_SESSION["room_description"][$key]."    ".$_SESSION["room_min_cost"][$key]."    ".$_SESSION["room_max_cost"][$key]."    ".$value."
";
    }
}

//**************************************** End ROM Record *************************************************

Below is a PHP script where i am trying to send information to MySQL database to get result from there. However, i am not doing this thing directley i am working with one protocol between them. but that does not make any diffrence as per my understanding.

Now i want to send 2 other record. i do not understand that how do add them like this
$holiday_search=$header."JNY    0100    $start_rec    $er    $fnum_adults    $fnum_child    $fnum_infant    $depart_date    $search_fwithin    $min_nights    $search_max_nights    $flight_type    $dest    $dep    $dep2    $dep3        $mp    $max_p    $rating    $tour_op    $tour_op2    $tour_op3    $tour_op4    $dep_uk_time    $arr_uk_time    $arr_uk_date    $arr_uk_point    $arr_dest_time    $dep_dest_time    $flight_no_out    $flight_no_ret    $travel_code    $top_insurance    $insurance_co    
";


or this way. Also whats the diffrence.


$i=0;
if($debug){
    view_array2($pass_first_name,"pass_first_name");
}

while (list($key, $value) = each ($pass_first_name))
{
    $room_group_number=$room_allocation[$key];
    //$holiday_search.="NME    ".$_SESSION["pass_title"][$i]."    ".$_SESSION["pass_first_name"][$i]."    ".$_SESSION["pass_surname"][$i]."    ".$_SESSION["pass_day"][$i].$_SESSION["pass_month"][$i].$_SESSION["pass_year"][$i]."    ".stripslashes($room_allocation[$i])."    ".$room_group_number."
    $holiday_search.="NME    ".$_SESSION["pass_title"][$key]."    ".$_SESSION["pass_first_name"][$key]."    ".$_SESSION["pass_surname"][$key]."    ".$_SESSION["pass_day"][$key].$_SESSION["pass_month"][$key].$_SESSION["pass_year"][$key]."    ".stripslashes($final_room_description[$room_allocation[$key]])."    ".$room_group_number."
";
$i++;
}
your help woud be really appriciated or if you know any other forum then guide me plz.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users