SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
-
Oct 8, 2007, 05:42 #1
- Join Date
- Jun 2007
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
upload browse delete photos on server
Hello
I have built a website for a client that contains 3 slideshows built with javascript. The qty of images in the javascript array is fixed -different in each slideshow. I am trying to build a simple CMS with PHP where she can browse in the different slideshow directories - select a photo -delete it and replace it with a new image.
I have basic knowledge of PHP - can upload images etc. On the server there isn't any SQL DB .
Any suggestions or script reccomendations would be greatly appreciated
Katu
-
Oct 8, 2007, 06:41 #2
- Join Date
- May 2006
- Location
- Lancaster University, UK
- Posts
- 7,062
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Most PHP hosting packages out there come with a free mysql DB - contact support on their host, asking if the package came with one (most people don't even know).
If you can't get access to one, there are some alternatives, but none as powerful. One would be an XML database - but again, MySQL and PHP are meant to be used together, hence why they work so efficiently.Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona
-
Oct 8, 2007, 06:55 #3
- Join Date
- Jun 2007
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yeah , thanks , just checked and no there isn't any sql DB with this package. I will check out some tutorials on how to create and use xml files with php. Hopefuly i'll get something working
-
Oct 8, 2007, 07:03 #4
- Join Date
- May 2006
- Location
- Lancaster University, UK
- Posts
- 7,062
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
For about $4 a month, you can buy mysql hosting from a separate host. I found this like on google: http://www.hostdepartment.com/mysqlwebhosting/
It would be worthwhile if you can get mySQL - again, PHP is made for it, and has better ways to add, retrieve and modifty data.Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona
-
Oct 8, 2007, 07:21 #5
- Join Date
- Jun 2007
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanx but am adding a basic CMS for a client who doesen't want to spend any more cash than they have to , so i just want to add this feature and sign off
-
Oct 8, 2007, 07:41 #6
Shouldn't need a DB if you are simply dealing with a photogallery - unless you want extras like text associated with each image. Look at using a simple php file manager to upload,edit and remove images, then all you need to worry about is the front end.
The code below will pull files out of a directory, in ur case you might need to filter abit more to make sure it's an image but i'll leave that up to u.
PHP Code:
if ($dh = opendir(PATH_TO_FOLDER)) { # find all the files here..
while (($file = readdir($dh)) !== false) {
if ($file != '..' && $file != '.') {
if (is_file(PATH_TO_FOLDER.$file)) $filearray[] = $file;
}
}
}
print_r($filearray);
-
Oct 8, 2007, 07:49 #7
Bookmarks