Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
adding pictures to each item in a <ul>
Old 08-23-2004, 06:23 PM adding pictures to each item in a <ul>
Junior Talker

Posts: 2
Trades: 0
Hello, I am curently trying to get the upload picture script to work on the online store I am setting up ( i am using mycart) here is the script that uploads the pictures can anyone help figure out why it wont upload the picture. I got it to work once and now it wont work anymore. The site with the working script is onhttp://www.pcparadise4u.com/cart.

PHP Code:
 <?
require( "../Cart.php");
Brand();
DBInfo();
commonHeader"$Company""Picture Addition");

blueFont"Arial""<b>You can now upload a picture...</b><br><br>");
echo  
"<FORM ENCTYPE=\"multipart/form-data\" ACTION=\"./uploadItem.php\" METHOD=\"POST\">";
echo  
"<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"200000\">";
echo  
"<INPUT TYPE=\"hidden\" name=\"ItemID\" value=\"$II\">";
blueFont"Arial""Send this file: ");
echo  
"<INPUT NAME=\"image\" TYPE=\"file\">";
echo  
"<INPUT TYPE=\"submit\" VALUE=\"Send File\"></FORM>";

blueFont"Arial""<p><b>This file MUST be a JPEG (jpg) image.</b>");

adminFooter($Relative);
?>
then this is the script form uploaditem.php

PHP Code:
<?
require("../Cart.php");
Root();
exec("mv $image '$WebRoot/images/".$ItemID.".jpg'");
Header("Location: $Relative/admin/index.php");
?>
thanks for any help I basically know nothing when it comes to php I am jsut starting to learn asp but unfortunately my hosting isnt on a windows server. Thanks again if you can help out at all
cullie140 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-23-2004, 06:48 PM
j0e
Average Talker

Posts: 23
Location: UK
Trades: 0
Hi,

Are you getting any errors? What changes have you made since it used to work?

I can't say that I understand the code - I have never used mycart. However, I can suggest that you make sure the folders have sufficient permissions (eg, you are allowed to read/write to/from them). You may have to use the $_FILES predefined variable: http://www.php.net/manual/en/reserve...ariables.files

I am a little confused as to the relevence of the title of your post...!

Regards and good luck,
Joe.

PS, I wouldn't bother with ASP!
j0e is offline
Reply With Quote
View Public Profile
 
Old 08-24-2004, 05:37 AM
webwoRRks's Avatar
Ultra Talker

Posts: 426
Location: I hope so
Trades: 0
that certainly won't work unless your website is specially set up, or you're not showing us all of the scripts. When uploaded, any file is stored in your servers temporary directory, and given a name like "94385oufgwe098f.tmp". You then need to rename it / remove it from the temp directory. Check your $HTTP_POST_FILES['image'] to see whats set, and where the file is.
__________________
Theres 10 types of people; those who understand binary, and those who don't.
webmaster and webdeveloper resources,
Please login or register to view this content. Registration is FREE
webwoRRks is offline
Reply With Quote
View Public Profile Visit webwoRRks's homepage!
 
Reply     « Reply to adding pictures to each item in a <ul>
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29607 seconds with 12 queries