Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // echo '<pre>'.$_POST['data_filght'].'<pre>';
- //parse_str($_POST['data_filght'],$result);
- // $array = json_decode($result, true);
- $array = json_decode($_POST['data_filght'], true);
- $search = json_decode($_POST['search'], true);
- $session = $_POST['session'];
- echo $session;
- //print_r ($array['Flight_Detail']);
- echo '<pre>' . print_r($array['Flight_Detail'], true) . '</pre>';
- echo '<pre>' . print_r($search, true) . '</pre>';
- //echo '<pre>' . print_r( $result['Account_Api_Login'], true) . '</pre>';
- $adult = $search['adult'];
- $children = $search['children'];
- $infant = $search['infant'];
- $flight = $array['Flight_Detail'];
- $adl=0;
- $cld=0;
- $ifn=0;
- echo '<form action="book.php" method="post">';
- echo '<table>';
- echo '<tr><td><font size="3" color="red">Pemesasn</font></td></tr>
- <tr><td>Jenis Kelamin</td><td>:</td><td><select name="jk">
- <option value="MR">MR</option>
- <option value="MRS">MRS</option>
- <option value="MISS">MISS</option>
- </option></td></tr>
- <tr><td>First Name</td><td>:</td><td><input type="text" name="fs"></td></tr>
- <tr><td>Last Name</td><td>:</td><td><input type="text" name="ls"></td></tr>
- <tr><td>Phone</td><td>:</td><td><input type="text" name="phone"></td></tr>
- <tr><td>Email</td><td>:</td><td><input type="text" name="email"></td></tr><br/><br/>
- ';
- echo "<textarea name='data_filght'>".$_POST['data_filght']."</textarea>
- <textarea name='search' >".$_POST['search']."</textarea>
- <input type='text' name='session' value='".$session."'>
- ";
- if (!empty($adult)){
- echo '<tr> <td><font size="3" color="red">Adult</font></td></tr>';
- for ($adl=1;$adl<=$adult;$adl++){
- echo '<tr><td>Jenis Kelamin</td><td>:</td><td><select name="jka'.$adl.'">
- <option value="MR">MR</option>
- <option value="MRS">MRS</option>
- <option value="MISS">MISS</option>
- </option></td></tr>
- <tr><td>First Name</td><td>:</td><td><input type="text" name="fsa'.$adl.'"></td></tr>
- <tr><td>Last Name</td><td>:</td><td><input type="text" name="lsa'.$adl.'"></td></tr>
- <tr><td>Phone</td><td>:</td><td><input type="text" name="phonea'.$adl.'"></td></tr>
- <tr><td>Email</td><td>:</td><td><input type="text" name="emaila'.$adl.'"></td></tr><br/><br/>
- ';
- }
- }
- if (!empty($children)){
- echo '<tr> <td><font size="3" color="red">Children</font></td></tr>';
- for ($cld=1;$cld<=$children;$cld++){
- echo '<tr><td>Jenis Kelamin</td><td>:</td><td><select name="jkc'.$cld.'">
- <option value="MR">MR</option>
- <option value="MRS">MRS</option>
- <option value="MISS">MISS</option>
- </option></td></tr>
- <tr><td>First Name</td><td>:</td><td><input type="text" name="fsc'.$cld.'"></td></tr>
- <tr><td>Last Name</td><td>:</td><td><input type="text" name="lsc'.$cld.'"></td></tr>
- <tr><td>Phone</td><td>:</td><td><input type="text" name="phonec'.$cld.'"></td></tr>
- <tr><td>Email</td><td>:</td><td><input type="text" name="emailc'.$cld.'"></td></tr>
- <tr><td>Birth Day</td><td>:</td><td><input type="text" name="birthc'.$cld.'"></td></tr><br/><br/>
- ';
- }
- }
- if (!empty($infant)){
- echo '<tr> <td><font size="3" color="red">Infant</font></td></tr>';
- for ($ifn=1;$ifn<=$infant;$ifn++){
- echo '<tr><td>Jenis Kelamin</td><td>:</td><td><select name="jki'.$ifn.'">
- <option value="MR">MR</option>
- <option value="MRS">MRS</option>
- <option value="MISS">MISS</option>
- </option></td></tr>
- <tr><td>First Name</td><td>:</td><td><input type="text" name="fsi'.$ifn.'"></td></tr>
- <tr><td>Last Name</td><td>:</td><td><input type="text" name="lsi'.$ifn.'"></td></tr>
- <tr><td>Birth Day</td><td>:</td><td><input type="text" name="birthi'.$ifn.'"></td></tr>
- ';
- }
- }
- echo'<tr><td colspan="3"><input type="submit" value="Submit"></td></tr>';
- echo '</table></form>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement