Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $conn = mysqli_connect('localhost','administrator','1357','wczasy');
- //Do połączenia lokalnego
- //$conn = mysqli_connect('localhost','root','','wczasy');
- $q = mysqli_query($conn,'SELECT * FROM destinations');
- echo "<select name='selectedDest', id='selectedDest'>";
- for($i=0; $i<mysqli_num_rows($q); $i++)
- {
- $a = mysqli_fetch_array($q);
- echo "<option value='".$a['name']."'>".$a['name']."</option>";
- }
- echo "</select>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement