SHARE
TWEET

Untitled

a guest Jun 15th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <tr><td>Brand:  </td><td>   <select style='width:205px' name="BrandBox" onchange='otherbrand(this.val)'>
  2.  
  3. <?php
  4.  
  5. $qry = "Select BrandName from Brand";
  6. $populate = mysqli_query($conn, $qry);
  7.  
  8. while ($run = mysqli_fetch_assoc($populate)){
  9. echo "<option value="'.$run['BrandName'].">'".$run['BrandName']."</option>";
  10. }
  11.  
  12. ?>
  13. <option value="Other">Other</option></td>
  14.  
  15.  
  16. <script type="text/javascript">
  17. function otherbrand(val){
  18. var element = document.getElementById('otherb');
  19. if(val == 'Other')
  20. element.style.display='block';
  21. else
  22. element.style.display='none';
  23. }
  24. </script>
  25.  
  26. <td><input type="text" name="BrandBox" id="otherb" style='display:none'/></td>
  27. </select></tr>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top