What is the best way to create a banner ad using information stored in a database? I have the information I was to use and already pulled from the database using PHP. How can I put this into a 460x80 banner in .gif or .png? I want to banner to shower something different from the database everytime the page is refreshed. Is this a pretty easy thing to do or require a lot of work?
sfrider0
6
Junior Poster
Recommended Answers
Jump to Posti recommend you use .png.... about the banner will it's not really hard... because you use database...all you do is some mysql query and PHP predefined function rand();
here ill show you the code
lets assume you had these tablebanner
…
banner_id - int (primary)(autoincrement)
src = varchar
Jump to PostDo you have images or urls in your DB - or just string info? If you need to create images on the fly - use GD2.
Like VD says - you can use a randomizer to display a different image each time. Over time, the number of displays should pan …
All 8 Replies
vaultdweller123
32
Posting Pro
diafol
vaultdweller123
32
Posting Pro
diafol
ShawnCplus
456
Code Monkey
Team Colleague
sfrider0
6
Junior Poster
diafol
vaultdweller123
32
Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.