Jump to content

PupChow

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

PupChow's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Just a little bit more info, I tried the upload code at PHP manual and got the following result: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] Possible file upload attack! Here is some more debugging info:Array ( [Picture] => Array ( [name] => DrJohnson_Panda5.gif [type] => image/gif [tmp_name] => C:\PHP\uploadtemp\phpCD9D.tmp [error] => 0 [size] => 25752 ) ) Entry successfully added. [/quote] The code is as followed: [code] $uploaddir = '/c:/hosting/webhost4life/member/mychow/uploads/';   //  I tried both /c: and c: // $uploadfile = $uploaddir . basename($_FILES['Picture']['name']); echo '<pre>'; if (move_uploaded_file($_FILES['Picture']['tmp_name'], $uploadfile)) {    echo "File is valid, and was successfully uploaded.\n"; } else {    echo "Possible file upload attack!\n"; } echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; [/code]
  2. Thanks! Unfortunately the file is still not showing up in the uploads folder. The file is definitely being uploaded though (there was a short pause). Is there any way for it to display error msg?
  3. I am having a hard time getting the form upload script to work and I need to once again turned to the gurus for help. Everything seems to be processing, there is a long pause as during the form process as if the file is being uploaded. The problem is when I check the "uploads" folder, the file is simply not there. I made sure the form has: enctype="multipart/form-data" I made sure the "uploads" folder has the necessary permission. The input box is simply: <input name="Picture" type="file"> Is there any thing else that I am missing? [code] // ============== // Configuration // ============== $uploaddir = "uploads"; // Where you want the files to upload to - Important: Make sure this folders permissions (CHMOD) is 0777! // ============== // Upload Part // ============== if(is_uploaded_file($_FILES['Picture']['tmp_name'])) { move_uploaded_file($_FILES['Picture']['tmp_name'],$uploaddir.'/'.$_FILES['Picture']['name']); } print "Your file has been uploaded successfully! Yay!<br />"; [/code]
  4. Perfect, exactly what I needed to know! I will play with this today, thanks a lot!!! :)
  5. As a part of the form, I am hoping to have an Upload Picture section where it lets the user browse his/her computer and upload a file onto the server. At which point the server will resize the image, move it to a sepecific folder, rename it, and write the new name in a MySQL database. The way I have my form setup right nowis that once a form is submitted, the page is reloaded with all the INSERT SQL statements being executed. Is it possible to mix a file upload in the same form? Thanks, I would like to know if this is possible first before investing hours into development!
  6. [!--quoteo(post=355175:date=Mar 14 2006, 08:22 PM:name=hitman6003)--][div class=\'quotetop\']QUOTE(hitman6003 @ Mar 14 2006, 08:22 PM) [snapback]355175[/snapback][/div][div class=\'quotemain\'][!--quotec--] No, you'll have to delete each of them. [/quote] Would I need to do two different SQL queries for insert as well? Sorry, I am pretty new to this.
  7. Gotcha. Is Auto-Increment Number a pretty popular thing (or standard) to use when it comes to unique ID? On a related note, do I also just join the table first if I want to delete a record?
  8. Something about it is hard to manage. I didn't really quite follow thought... What I am trying to do in simple term is 2 tables: Table1: ID, Name, Address, Phone Table2: ID, Salary And I am in the process of building PHP pages that will allow users to enter their own information and be put into the database.
  9. Sorry if this is a very elementary question, but I just cannot seems to find the answer in the books I have (probably because it is very simple?) or online. What is the best way to create a unique ID? This ID will be used to link up a couple tables, and I was adviced to not use Auto-number field. Is there a easy way to generate a unique number in PHP while it is inserting the data into the database?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.