Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <select>
- <?php
- $db = pg_connect('host=localhost dbname=test user=myusername password=mypassword') or die ("Could not connect to DB");
- $sql = pg_query(sprintf("SELECT City FROM Cities"));
- while ($row = pg_fetch_assoc($sql))
- {
- echo "<option value=$row[City]>$row[City]</option>";
- }
- pg_close($db);
- ?>
- </select>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement