Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 29. Mar 2024, 09:04

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 19. Jan 2011, 05:08 
Offline

Joined: 19. Jan 2011, 05:05
Posts: 1
Location: United States
Hi,

This is probably a simple question, however I am finding it difficult to accomplish.

<?php
$upload = new upload();
$upload->upload_file();
?>

so in a test page it would be like so:

<?php
$upload = new upload();
$upload->upload_file();
?>


<form action="" method="post" enctype="multipart/form-data">
<input type="file" id="real_upload" class="hide" name="file" />
<input type="submit" id="real_submit" class="hide" value="Upload" />
</form>

The problem is I'm using this upload system for parts of the website, what I want is to have this class upload the file once it has gone through the "gallery upload" segment:

<?php

$mysql_link = mysql_connect("localhost", "", "");
mysql_select_db("") or die("Could not select database");

while($counter <= count($photos_uploaded)) {
if($photos_uploaded['size'][$counter] > 0) {
if(!array_key_exists($photos_uploaded['type'][$counter], $known_photo_types)) {
$result_final .= "File ".($counter+1)." is not a photo<br />";
}
else {
mysql_query( "INSERT INTO gallery_photos(`photo_filename`, `photo_caption`, `photo_category`) VALUES('0', '".addslashes($photo_caption[$counter])."', '".addslashes($_POST['category'])."')" );
$new_id = mysql_insert_id();
$filetype = $photos_uploaded['type'][$counter];
$extention = $known_photo_types[$filetype];
$filename = $new_id.".".$extention;

mysql_query( "UPDATE gallery_photos SET photo_filename='".addslashes($filename)."' WHERE photo_id='".addslashes($new_id)."'" );
}

?>
How would I approach this PHP Image Gallery (Upload Problem)?

Thanks


Top
 Profile  
 
PostPosted: 19. Jan 2011, 08:57 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
How is this related to TWG?

- Michael


Top
 Profile  
 
PostPosted: 25. Jan 2011, 03:13 
Offline

Joined: 25. Jan 2011, 03:08
Posts: 1
I cannot understand your question. After I search and find some scripts about php image gallery listed on the page!
Hopefully can help you!


Top
 Profile  
 
PostPosted: 25. Jan 2011, 10:46 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Please only post questions about TinyWebGallery and don't post urls to unrelated content. I will delete this.

- Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy