Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html><body><h1>Records</h1><?
- mysql_connect(localhost,username,password);
- @mysql_select_db(database) or die( "Unable to select database");
- $query="SELECT * FROM contacts";
- $result=mysql_query($query);
- mysql_close();
- $i=0;
- while ($i < mysql_numrows($result)) {
- $name=mysql_result($result,$i,"name");
- $phone=mysql_result($result,$i,"phone");
- echo "<b>$name</b><br>Phone:$phone<br /><br /><hr /><br />";
- $i++;
- }
- ?></body></html>
- ==========================================
- def index():
- return HTML(BODY(H1('Records'), db().select(db.contacts.ALL)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement