Jump to content

PHP Header


PHPrp

Recommended Posts

[code]
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 *************************************************
[/code]

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
[code]
$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    
";
[/code]


or this way. Also whats the diffrence.

[code]

$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++;
}
[/code]
your help woud be really appriciated or if you know any other forum then guide me plz.
Link to comment
https://forums.phpfreaks.com/topic/11740-php-header/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.