automatic updating....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Atomic Monkey
Forum Newbie
Posts: 7
Joined: Sun Apr 20, 2003 11:19 am
Location: Arkansas
Contact:

automatic updating....

Post by Atomic Monkey »

I didn't quite know where to put this, but here's my question. I want to have an "admin only" section of my website where I can update the main page, qoute of the day, and upload music/movies through my web browser. I know someone that does this, but he's being a jerk and won't give me a hand. If anyone can help me out, it would be greatly appreciated and maybe I could go into more detail.
User avatar
werlop
Forum Commoner
Posts: 68
Joined: Sat Mar 22, 2003 2:50 am
Location: /dev/null

Post by werlop »

Ok, what have you done so far? Have you written any code for updating your site? How does your site work is it database driven? If you tell us that we can be more help :D

Anyway to create a protected folder on your site (assuming your server is apache) you would use an htaccess file. The following is an example of what one would look like:

AuthUserFile /home/banet/pass/.htpasswd
AuthName admin
AuthType Basic
<Limit GET>
require valid-user
</Limit>

This says is placed in http://www.mysite.com/admin it says to look in the folder /home/banet/pass/.htpasswd for a password file (made using the htpasswd program) it says to use admin as the password prompt, it will accept any valid user from the htpasswd file. For more information see the apache documentation.

I run a system like this on my school website http://www.bearsdenacademy.org/ it works pretty well. btw im only 15 :P (what a geek you all say!) so some of this may be wrong sorry if it is :lol:
Atomic Monkey
Forum Newbie
Posts: 7
Joined: Sun Apr 20, 2003 11:19 am
Location: Arkansas
Contact:

Post by Atomic Monkey »

alright, I'm not spamming here, but this is what I've done with the website.

http://www.atomicmonkeyboner.com

that's the main page. There aren't any php scripts in there. In fact, the only thing that has anything to do with php are the message boards. (Bet they look familiar!) Here's what I'm trying to do with it... Let's say I want to update the links along the left hand side of the page or update the content in the middle or put a qoute of the day in the right hand column. Well, instead of editing the html files by hand, I need a way to go to a special page that only I know about and be able to enter the updated information and then click the submit button and when I go back to the site, the script has automatically updated the page so that it reflects what I've typed in. Is that a better explanation?

By the way, I'm running a remote mysql database.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Post Reply