General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 21st, 2003, 10:13 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Yet again upload images

k ive solved the whole upload and display image...im just wondering how to display the picture in a different place and if i do it that way that i can show different pictures instead of just the one that was previously uploaded...

PHP Code:
<html>
 <
head>
 <
title>Listing file upload script</title>
 </
head>
 <?
php
 $file_dir 
"../cgi-bin/";
 
$file_url "http://bruski.recongamer.com/cgi-bin/";
 
 foreach( 
$HTTP_POST_FILES as $file_name => $file_array ) {
   print 
"path: ".$file_array['tmp_name']."<br>\n";
   print 
"name: ".$file_array['name']."<br>\n";
   print 
"type: ".$file_array['type']."<br>\n";
   print 
"size: ".$file_array['size']."<br>\n";
 
   if ( 
is_uploaded_file$file_array['tmp_name'] ) 
     && 
$file_array['type'] == "image/gif" ) {
     
move_uploaded_file$file_array['tmp_name'], "$file_dir/$file_name"
       or die (
"Couldn't copy");
     
 }
}
 
?>
<body>
<form enctype="multipart/form-data" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="51200">
 <input type="file" name="fupload"><br>
<input type="submit" value="Send file!">
</form>
</body>
</html>
<?php
print "<img src=\"$file_url/$file_name\"><p>\n\n";?> 


thx again

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Yet again upload images


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT