473,395 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

set a banner through admin like page

66
Hey guys,

im creating a website that will be mostly powered by php. I will start by giving you some backgroound:

I want the website to be totally dependant, so the user can update it all themselves.. upload new images,select which to show etc.!

the first hurdle ive hit is that i want the 'admin' to be able to select what banner is shown on the page depending on what time of year it is.

for instance in the admin section that i will create there will be a section for 'site content' a sub section with here will be banners. through the use of a drop down box filled with details from a table... i want the user to manually select what banner to display on the site.

what ive done so far:

ive created the databas, and a realy basic admin part, ive currently got 2 records in the database, pointing to 2 banners. on the one page ive got the banner showing and on the other ive created a drop down menu which reads the field in the table which describes the banner, so from this drop down menu i want the user to be able to select what banner they want to use, click update, and the banner being used will be changed....

my code for the 2 pages:

admin page (what people can see)
Expand|Select|Wrap|Line Numbers
  1. <?PHP 
  2. // connection to database
  3. include "php/constants/dbcnx.php"; 
  4. ?>
  5. </head>
  6.  
  7. <body>
  8. <?PHP
  9. include ("php/library/listboxfromfield.php");
  10. ?>
  11.  
  12. <table border = 1>
  13. <tr>
  14. <td><p> you are currenty using the<b> <?PHP echo $value;?></b> banner</p>
  15.  
  16. </td>
  17. </tr>
  18. </table>
  19.  
process page (to put records into list box)

Expand|Select|Wrap|Line Numbers
  1. <?PHP
  2. $query = "SELECT Img_season FROM sitecontent";
  3. $result = mysql_query($query);
  4.  
  5. print  "<SELECT name=item>";
  6. while ($line = mysql_fetch_array($result))
  7. {    
  8. foreach ($line as $value)
  9. {
  10. print "<option value = '$value'";
  11. }
  12. print "> $value </option>";
  13. }
  14. print "</SELECT>";
  15. ?>
  16.  
Nov 30 '07 #1
0 1164

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Derek | last post by:
I have some third party sponsor banners on my website and since installing the entire page pauses loading then displays the whole page. It seems that the page is waiting on the banners. Is there a...
4
by: Patrick Rouse | last post by:
Please point me to the correct newsgroup if this is the wrong place to post this question. My website is written in simple HTML and hosted on a windows server at secureserver.net (via GoDaddy). ...
3
by: | last post by:
I want a banner to appear at the bottom of each page of a web app. I created a user control that describes the banner and have it placed in all my pages. For the most part it functions as needed....
13
Death Slaught
by: Death Slaught | last post by:
I have my entire page in my "main" div. div.main { width: 100%; height: 100%; border: 1px solid gray; } on the left of the page I have a banner.
1
by: AR123 | last post by:
Hi I want to set up a rotating banner. Not sure how to incorporate my rotating banner code into the code below. I want the rotating banner to be the main feature image? This is set up in...
10
by: Yohann L. | last post by:
Hello. I would like to have an horizontal banner which autoadjust its width to 100% of the page width. So, I've sliced the image banner in three parts, but don't find a way to do the middle one...
1
by: Aaron Gray | last post by:
Hi, I have a banner for a web page that I cannot figure out how to get the alignment right. Hi, I have a banner for a web page that I cannot figure out how to get the alignment right.
24
by: GloStix | last post by:
I'm trying to center this banner, it's in a div that has the same width so it's not exactly "centering" but it's screwed up, It works in safari but in Firefox it's messed up. I uploaded a Video to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.