gwolf2u Posted June 5, 2011 Share Posted June 5, 2011 this is my first post here as you might think, I'm new to mysql well now related to my question I have a database created and I want that for each row to output some data in my php page in short my table is named info and has two columns, name and image now I want for each name to output something like this <a href="page/{name}"><img src="images/{image}.jpg" onMouseOver="this.src='images/over.png';" onMouseOut="this.src='images/{image}.jpg';"></a> my mysql database looks like this CREATE TABLE IF NOT EXISTS `info` ( `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'game name', `image` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'image name', PRIMARY KEY (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `info` (`name`, `image`) VALUES ('Name 1', 'image1'), ('Name 2', 'image2'), ('Name 3', 'image3'); now any ideas how can I do this again I'm new to this so no genius here Link to comment https://forums.phpfreaks.com/topic/238471-output-info-from-database-to-layout/ Share on other sites More sharing options...
revraz Posted June 5, 2011 Share Posted June 5, 2011 Google PHP and MySQL Tutorials to start. Link to comment https://forums.phpfreaks.com/topic/238471-output-info-from-database-to-layout/#findComment-1225417 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.