This is a discussion on Php Links + images form Mysql db. within the Programming Articles forums, part of the Webmaster Articles/Tutorials category; I know i was having troubles with this a while ago but as i found a way in a php ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| | #1 (permalink) |
| WMT Addict | I know i was having troubles with this a while ago but as i found a way in a php book on how to solve it i thought i will share it. lets say your db has a coloumn for websites and another for images and you want to make a list that displays all the info in the db including the website as a link and an image. well here is how to do it: PHP Code: As you see in part 1 we got the data from the database. this is all what we need for now. In Part 2 we print the data out that we stored before as variables. so it will view a block containing id,name,email,website,brief discription and an image. For the link i used: PHP Code: the same with the image image tag with a variable for the acctual image. so it looks like this: PHP Code: I hope that helps someone. |
| | |
| Tags |
| form, images, links, mysql, php |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How would I make my images links? | ShaunBurden | Php and MySQL | 1 | 12-03-2007 15:48 |
| Form to Mail | HostYorkshire | Php and MySQL | 0 | 08-01-2007 19:20 |
| Form help | JsPLACEwebby | Programming / Scripting / Coding | 2 | 05-12-2005 11:25 |
| Clickable Images and links as smilies | asgsoft | Programming Articles | 0 | 01-06-2005 23:42 |
| Contact Us Form? | Departed | Programming Articles | 0 | 22-04-2005 00:31 |