Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE IF NOT EXISTS `countries` (
- `id` int(10) NOT NULL AUTO_INCREMENT,
- `country` varchar(50) NOT NULL,
- `continent` varchar(50) NOT NULL,
- `description` longtext NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
- $result = mysql_query("select * FROM $sTable where $sTable.id = $sId");
- while($item = mysql_fetch_assoc($result)) {
- foreach($item as $key => $val) {
- echo '
- <tr>
- <td>' . ucfirst($key) . '</td><td><input type="text" value="' . $val . '" name="' . $key . '"></td>
- </tr>
- ';
- }
- }
- $result = mysql_query("SHOW COLUMNS FROM $sTable");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement