Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. CREATE TABLE IF NOT EXISTS `countries` (
  2. `id` int(10) NOT NULL AUTO_INCREMENT,
  3. `country` varchar(50) NOT NULL,
  4. `continent` varchar(50) NOT NULL,
  5. `description` longtext NOT NULL,
  6. PRIMARY KEY (`id`)
  7. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
  8.  
  9.  
  10.  
  11. $result = mysql_query("select * FROM $sTable where $sTable.id = $sId");
  12. while($item = mysql_fetch_assoc($result)) {
  13. foreach($item as $key => $val) {
  14. echo '
  15. <tr>
  16. <td>' . ucfirst($key) . '</td><td><input type="text" value="' . $val . '" name="' . $key . '"></td>
  17. </tr>
  18. ';
  19. }
  20. }
  21.  
  22. $result = mysql_query("SHOW COLUMNS FROM $sTable");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement