Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <tr><td>Brand: </td><td> <select style='width:205px' name="BrandBox" onchange='otherbrand(this.val)'>
- <?php
- $qry = "Select BrandName from Brand";
- $populate = mysqli_query($conn, $qry);
- while ($run = mysqli_fetch_assoc($populate)){
- echo "<option value="'.$run['BrandName'].">'".$run['BrandName']."</option>";
- }
- ?>
- <option value="Other">Other</option></td>
- <script type="text/javascript">
- function otherbrand(val){
- var element = document.getElementById('otherb');
- if(val == 'Other')
- element.style.display='block';
- else
- element.style.display='none';
- }
- </script>
- <td><input type="text" name="BrandBox" id="otherb" style='display:none'/></td>
- </select></tr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement