php - Returning multiple search queries with a single search bar? -


i attempting search using form action. i'd 10 search fields ticket id's return each ticket id in search bar.

form:

<form action="http://-withheld-/adminhelper/-withheld-/ticket.php" method="get">     <input type="text" name="id1" placeholder="search ticketid" required="required"> <br>     <input type="text" name="id2" placeholder="search ticketid" required="required">     <button type="submit">search</button> 

php:

<?php     if(isset($_get['id'])){         $id = $_get['id'];          $url = 'http://-withheld-.com/api/v1/tickets/'.$id.'?api_key=withheld';          //  initiate curl         $ch = curl_init();         // disable ssl verification         curl_setopt($ch, curlopt_ssl_verifypeer, false);         // return response, if false print response         curl_setopt($ch, curlopt_returntransfer, true);         // set url         curl_setopt($ch, curlopt_url,$url);         // execute         $result=curl_exec($ch);         // closing         curl_close($ch);          // dump beauty json :3         $jsonobj = json_decode($result);         ?>         <table border="1">             <tr>                 <th>ticket id</th>                 <th>ticket number</th>                 <th>customer</th>                 <th>subject</th>                 <th>created</th>                 <th>status</th>                 <th>issue type</th>                 <th>updated</th>                 <th>detail</th>             </tr>         <?php          $ticket = $jsonobj->{'ticket'};          $link_addr = 'http://-withheld-/adminhelper/-withheld-/singleticket.php?id='.$ticket->{'id'};          echo '<tr>';         echo '<td>'.$ticket->{'id'}.'</td>';         echo '<td>'.$ticket->{'number'}.'</td>';         echo '<td>'.$ticket->{'customer_business_then_name'}.'</td>';         echo '<td>'.$ticket->{'subject'}.'</td>';         echo '<td>'.$ticket->{'created_at'}.'</td>';         echo '<td>'.$ticket->{'status'}.'</td>';         echo '<td>'.$ticket->{'problem_type'}.'</td>';         echo '<td>'.$ticket->{'updated_at'}.'</td>';         echo '<td><a href="'.$link_addr.'">detail</a></td>';         echo '</tr>';     } ?> </table> 

as can see, using method retrieve data , i've tried create second search field while utilizing single submit "search" button return multiple values whenever search seems use 1 of fields. have experience this? reason want our data entry clerk can search multiple tickets , review them in list without having go each ticket 1 1.

any appreciated. thanks.

oh , yes, using api key here, not connecting directly sql database.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -