Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $warehouse = @$_POST['wh'];
- switch($button){
- case 'Submit':
- if(@$_POST['wh']){
- $warehouse = @$_POST['wh'];
- $length = count($warehouse);
- for ($i = 0; $i < $length; $i++){
- //echo '<br>'.$warehouse[$i];
- }
- $consult = "SELECT * FROM contact_info WHERE ";
- for ($i = 0; $i < $length; $i++){
- $consult = $consult . "warehouse='$warehouse[$i]'";
- if(!$i+1 == $length){
- $consult = $consult . " OR ";
- }
- }
- echo '<br>'.$length.'<br>';
- print_r ($consult);
- $response = mysqli_query($connection, $consult);
- if($response){
- $registry = mysqli_affected_rows($connection);
- if($registry > 1){
- echo '<br><table width="800" align="center" border="2" cellspacing="1" cellpadding="1">
- <form action="index.php" method="post" >
- <tr>
- <td align="center"><strong>Warehouse</strong></td>
- <td align="center"><strong>Name</strong></td>
- <td align="center"><strong>Lastname</strong></td>
- <td align="center"><strong>Phone</strong></td>
- <td align="center"><strong>I-net</strong></td>
- <td align="center"><strong>E-mail</strong></td>
- </tr>';
- while($registry = mysqli_fetch_array($response, MYSQLI_ASSOC)){
- echo '<form action="index.php" method=post >
- <tr>
- <td div align="center">'.$registry['warehouse'].'
- <td div align="center">'.$registry['name'].'
- <td div align="center">'.$registry['lastname'].'
- <td div align="center">'.$registry['phone'].'
- <td div align="center">'.$registry['inet'].'
- <td div align="center">'.$registry['email'].'
- </tr>';
- }
- echo '</form>';
- echo '
- </form>
- </table>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement