php - Page is not loading after some multiple loops -
i working on flight portal. lets assume there 2 pages (search.php, result.php).
in search page select source,destination,date of journey..etc.(now click on search button)
after clicking on search button page redirect result.php , there display results.
here before displaying results on page trying insert result in database below.
$q=0; foreach($array_data['availresponse']['origindestinationoptions']['origindestinationoption'] $main) { $f1=$basefare[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['actualbasefare']; $f10=$octax[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['octax']; $f11=$pcom[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['tpartnercommission']; $f12=$tsdiscount[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['tsdiscount']; $f2=$tax[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['tax']; $f3=$stax[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['stax']; $f4=$tcharge[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['tcharge']; $f5=$scharge[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['scharge']; $f6=$tdiscount[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['tdiscount']; $f7=$tmarkup[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['tmarkup']; $f8=$fid[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['id']; $f9=$fkey[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['key']; $ft=$totalfare[$q]=($basefare[$q]+$tax[$q]+$stax[$q]+$scharge[$q])-$tdiscount[$q]; $a1=$abasefare[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['farebreakup']['fareary']['fare']['basefare']; $a2=$atax[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['farebreakup']['fareary']['fare']['tax']; if($child>0 || $infant>0) { $a1=$abasefare[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['farebreakup']['fareary']['fare'][0]['basefare']; $a2=$atax[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['farebreakup']['fareary']['fare'][0]['tax']; } if($child>0) { $c1=$cbasefare[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['farebreakup']['fareary']['fare'][1]['basefare']; $c2=$ctax[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['farebreakup']['fareary']['fare'][1]['tax']; } if($child>0) { $i1=$ibasefare[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['farebreakup']['fareary']['fare'][2]['basefare']; $i2=$itax[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['farebreakup']['fareary']['fare'][2]['tax']; } if($child==0) { $i1=$ibasefare[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['farebreakup']['fareary']['fare'][1]['basefare']; $i2=$itax[$q]=$array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['faredetails']['farebreakup']['fareary']['fare'][1]['tax']; } $s=0; foreach($array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['onward']['flightsegments']['flightsegment'] $array) { $z1=$flightnumber[$q][$s]=$array['flightnumber']; $z2=$airlinename[$q][$s]=$array['operatingairlinename']; $z3=$airlineflightnumber[$q][$s]=$array['operatingairlineflightnumber']; $z4=$airlinecode[$q][$s]=$array['operatingairlinecode']; $z5=$departureloc[$q][$s]=$array['departureairportname']; $z6=$departurecode[$q][$s]=$array['departureairportcode']; $z7=$arrivalloc[$q][$s]=$array['arrivalairportname']; $z8=$arrivalcode[$q][$s]=$array['arrivalairportcode']; $z9=$departuretime[$q][$s]=$array['departuredatetime']; $z10=$arrivaltime[$q][$s]=$array['arrivaldatetime']; $z11=$airequiptype[$q][$s]=$array['airequiptype']; $z12=$linksell[$q][$s]=$array['linksellagrmnt']; $z13=$conx[$q][$s]=$array['conx']; $z14=$airpchg[$q][$s]=$array['airpchg']; $z15=$insideavailoption[$q][$s]=$array['insideavailoption']; $z16=$gentrafrestriction[$q][$s]=$array['gentrafrestriction']; $z17=$daysoperates[$q][$s]=$array['daysoperates']; $z30=$enddate[$q][$s]=$array['enddt']; $z31=$oaf[$q][$s]=$array['operatingairlineflightnumber']; $z32=$nstops[$q][$s]=$array['numstops']; $z18=$jrnytm[$q][$s]=$array['jrnytm']; $z19=$startterminal[$q][$s]=$array['startterminal']; $z20=$endterminal[$q][$s]=$array['endterminal']; $z21=$flttm[$q][$s]=$array['flttm']; $z22=$lsaind[$q][$s]=$array['lsaind']; $z23=$mile[$q][$s]=$array['mile']; $z24=$avail[$q][$s]=$array['bookingclass']['availability']; $z29=$bic[$q][$s]=$array['bookingclass']['bic']; $z25=$bookingclass[$q][$s]=$array['bookingclassfare']['bookingclass']; $z26=$classtype[$q][$s]=$array['bookingclassfare']['classtype']; $z27=$farecode[$q][$s]=$array['bookingclassfare']['farebasiscode']; $z28=$rule[$q][$s]=mysql_real_escape_string($array['bookingclassfare']['rule']); $mysql_query="insert rviewinternationalflight (q,s,flightnumber,operatingairlinename,operatingairlineflightnumber,operatingairlinecode,departureairportname,departureairportcode,arrivalairportname,arrivalairportcode,departuredatetime,arrivaldatetime,ip,airequiptype,linksell,conx,airpchg,insideavailoption,gentrafrestriction,daysoperates,jrnytm,startterminal,endterminal,flttm,lsaind,mile,availability,bookingclass,classtype,farecode,rule,basefare,tax,stax,tcharge,scharge,tdiscount,tmarkup,fid,fkey,totalfare,adultfare,adulttax,childfare,childtax,infantfare,infanttax,bic,enddate,oaf,octax,numstops,tpc,tsdiscount) values('$q','$s','$z1','$z2','$z3','$z4','$z5','$z6','$z7','$z8','$z9','$z10','$ip','$z11','$z12','$z13','$z14','$z15','$z16','$z17','$z18','$z19','$z20','$z21','$z22','$z23','$z24','$z25','$z26','$z27','$z28','$f1','$f2','$f3','$f4','$f5','$f6','$f7','$f8','$f9','$ft','$a1','$a2','$c1','$c2','$i1','$i2','$z29','$z30','$z31','$f10','$z32','$f11','$f12')"; mysql_query($mysql_query) or die(mysql_error()); $s++; } $count[$q]=$s-1; $r=0; foreach($array_data['availresponse']['origindestinationoptions']['origindestinationoption'][$q]['return']['flightsegments']['flightsegment'] $array) { $z1=$rflightnumber[$q][$r]=$array['flightnumber']; $z2=$rairlinename[$q][$r]=$array['operatingairlinename']; $z3=$rairlineflightnumber[$q][$r]=$array['operatingairlineflightnumber']; $z4=$rairlinecode[$q][$r]=$array['operatingairlinecode']; $z5=$rdepartureloc[$q][$r]=$array['departureairportname']; $z6=$rdeparturecode[$q][$r]=$array['departureairportcode']; $z7=$rarrivalloc[$q][$r]=$array['arrivalairportname']; $z8=$rarrivalcode[$q][$r]=$array['arrivalairportcode']; $z9=$rdeparturetime[$q][$r]=$array['departuredatetime']; $z10=$rarrivaltime[$q][$r]=$array['arrivaldatetime']; $z11=$rairequiptype[$q][$r]=$array['airequiptype']; $z12=$rlinksell[$q][$r]=$array['linksellagrmnt']; $z13=$rconx[$q][$r]=$array['conx']; $z14=$rairpchg[$q][$r]=$array['airpchg']; $z15=$rinsideavailoption[$q][$r]=$array['insideavailoption']; $z16=$rgentrafrestriction[$q][$r]=$array['gentrafrestriction']; $z17=$rdaysoperates[$q][$r]=$array['daysoperates']; $z30=$renddate[$q][$r]=$array['enddt']; $z31=$roaf[$q][$r]=$array['operatingairlineflightnumber']; $z32=$rnstops[$q][$r]=$array['numstops']; $z18=$rjrnytm[$q][$r]=$array['jrnytm']; $z19=$rrtartterminal[$q][$r]=$array['startterminal']; $z20=$rendterminal[$q][$r]=$array['endterminal']; $z21=$rflttm[$q][$r]=$array['flttm']; $z22=$rlsaind[$q][$r]=$array['lsaind']; $z23=$rmile[$q][$r]=$array['mile']; $z24=$ravail[$q][$r]=$array['bookingclass']['availability']; $z29=$rbic[$q][$r]=$array['bookingclass']['bic']; $z25=$rbookingclass[$q][$r]=$array['bookingclassfare']['bookingclass']; $z26=$rclasstype[$q][$r]=$array['bookingclassfare']['classtype']; $z27=$rfarecode[$q][$r]=$array['bookingclassfare']['farebasiscode']; $z28=$rrule[$q][$r]=mysql_real_escape_string($array['bookingclassfare']['rule']); $mysql_query="insert rviewinternationalflight (q,r,flightnumber,operatingairlinename,operatingairlineflightnumber,operatingairlinecode,departureairportname,departureairportcode,arrivalairportname,arrivalairportcode,departuredatetime,arrivaldatetime,ip,airequiptype,linksell,conx,airpchg,insideavailoption,gentrafrestriction,daysoperates,jrnytm,startterminal,endterminal,flttm,lsaind,mile,availability,bookingclass,classtype,farecode,rule,basefare,tax,stax,tcharge,scharge,tdiscount,tmarkup,fid,fkey,totalfare,adultfare,adulttax,childfare,childtax,infantfare,infanttax,bic,enddate,oaf,octax,numstops,tpc,tsdiscount) values('$q','$r','$z1','$z2','$z3','$z4','$z5','$z6','$z7','$z8','$z9','$z10','$ip','$z11','$z12','$z13','$z14','$z15','$z16','$z17','$z18','$z19','$z20','$z21','$z22','$z23','$z24','$z25','$z26','$z27','$z28','$f1','$f2','$f3','$f4','$f5','$f6','$f7','$f8','$f9','$ft','$a1','$a2','$c1','$c2','$i1','$i2','$z29','$z30','$z31','$f10','$z32','$f11','$f12')"; mysql_query($mysql_query) or die(mysql_error()); $r++; } $rcount[$q]=$r-1; $q++; }
the results getting inserted in database.no problem upto here. after inserting results in database page getting stopped there , blank page displaying.
why happening that. because of multiple loops..?? may problem..?
any suggestions..
thanks.
Comments
Post a Comment