View Full Version : Changing Pictures

10-20-2006, 03:26 PM
I'm building a website for a client who wants to be able to change the pictures themselves on a daily basis. It was suggested to me that I use either PHP or ASP and I don't have any real experience with either. I use Dreamweaver 8 and I'm not sure how to go about doing this :confused: Can someone please explain this to me?

10-20-2006, 07:58 PM
1. Use PHP.... not Microsoft proprietary, can be installed on any server (not just windows), and more widely used, so more help is available.

Dreamweaver 8.... not related. You can edit php (and asp too) with dreamweaver, so... fine. Just get used to the code view.

These languages are serverside programming. The scripts are run on the server and output as JUST html. It dynamically generates a webpage, basically.

The question isn't how you should do this, but how you want the client to be able to change a picture.

Easy way:
In your pages, use the image "image.jpg"... each day, have them replace that in the FTP. Done.

Another way: Using php* you can create an upload form and have them upload a file (the image) that will be saved in place of the existing image and/or links could be changed and/or a value in a database/file could be changed that relates to the src= of the images on the page(s).
(*probably possible in asp too... dunno. I do php, not asp.)

There are more options too.

If you need security, which you should have, look into passwords and such. If you're just using a form, a security code/password would do.
Something like:
if ($_POST['code'] != "secret") {
die ('Code wrong.')
//the script "dies" there if the code was wrong.
//otherwise, other stuff below will be output.
//if it dies, EVEN HTML won't be output below this line.

Should give you a general idea.
Perhaps take a look at php.net