Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $sql_host = '*********';
- $sql_user = '*********';
- $sql_pass = '*********';
- $db = new mysqli($sql_host, $sql_user, $sql_pass, $sql_db);
- function printEntry($db)
- {
- $query = "select * from wishlist_bd_2010";
- $result = $db->query($query);
- $row = $result->fetch_assoc();
- $url = $row['url'];
- $desc = $row['desc'];
- $price = $row['price'];
- echo("<tr><td><a href=\"$url\" title=\"$desc\">$desc</a></td><td>$price SEK</td></tr>");
- }
- echo('
- <html>
- <head>
- <title>Test</title>
- </head>
- <body>
- <table style="border-width: 2px; border-color: #000000;">
- <tr>
- <th>Namn och länk till sida</th>
- <th>Pris</th>
- </tr>');
- printEntry($db);
- echo('</table>
- </body>
- </html>');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement