Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working on a website.
#21
No, I mean when you typed it into the form. Did you use method="post"?
Reply
#22
Yes. Here's my upload page code:
Code:
<?php
if ($_POST["name"]=="ADMINUSERNAME") {
    if ($_POST["pass"]=="YeahrightImnotgonnaletyouseemyadminpass") {

    echo "<form action=\"image_upload_file.php\" method=\"post\"";
    echo "enctype=\"multipart/form-data\">";
    echo "<label for=\"file\">Graphic:</label>";
    echo " <input type=\"file\" name=\"file\" id=\"file\" />";
    echo "<br />";
    echo "<input type=\"submit\" name=\"submit\" value=\"Submit\" />";
    echo "</form>";


    
    }
    else echo "<p style=\"color:red;size:20px\"> Incorrect Password </p>";
}
else echo "<p style=\"color:red;size:50px\"> You do not have the credentials to access this page </p>"; ?>
Reply
#23
Updated report: I forgot to add the slash in front of upload/. -.- Anyway, here's the new code:

Code:
<?php
if (((strchr($_FILES["file"]["type"],"image/")))
&& ($_FILES["file"]["size"] < 200000))
  {
   if ($_FILES["file"]["error"] > 0)
     {
     echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
     }
   else
     {
     echo "Upload: " . $_FILES["file"]["name"] . "<br />";
     echo "Type: " . $_FILES["file"]["type"] . "<br />";
     echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
     echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

    if (file_exists("/upload/" . $_FILES["file"]["name"]))
       {
       echo $_FILES["file"]["name"] . " already exists. ";
       }
     else
       {
       if (move_uploaded_file($_FILES["file"]["tmp_name"],
       "/upload/" . $_FILES["file"]["name"])) {
       echo "Stored in: " . "admin/upload/" . $_FILES["file"]["name"];
    }
       else {
       echo "Upload error: " . $_FILES["file"]["name"] . " not uploaded.";
       }
       }
     }
   }
else
   {
   echo "Invalid file; file type was " . $_FILES["file"]["type"];
   }
?>

And the new output:
Quote:Upload: 1.TIF
Type: image/tiff
Size: 2.642578125 Kb
Temp file: /www/99k.org/k/e/y/keybored/htdocs/php5421lV

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to access /upload/1.TIF in /www/99k.org/k/e/y/keybored/htdocs/admin/image_upload_file.php on line 30
Upload error: 1.TIF not uploaded.

I think it has to do with the host -.- So, anybody got suggestions other than 000webhost for a free host so that I can put up my site?
Reply
#24
(07-19-2011, 10:31 PM)Qwertygiy Wrote: Updated report: I forgot to add the slash in front of upload/. -.- Anyway, here's the new code:

Code:
<?php
if (((strchr($_FILES["file"]["type"],"image/")))
&& ($_FILES["file"]["size"] < 200000))
  {
   if ($_FILES["file"]["error"] > 0)
     {
     echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
     }
   else
     {
     echo "Upload: " . $_FILES["file"]["name"] . "<br />";
     echo "Type: " . $_FILES["file"]["type"] . "<br />";
     echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
     echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

    if (file_exists("/upload/" . $_FILES["file"]["name"]))
       {
       echo $_FILES["file"]["name"] . " already exists. ";
       }
     else
       {
       if (move_uploaded_file($_FILES["file"]["tmp_name"],
       "/upload/" . $_FILES["file"]["name"])) {
       echo "Stored in: " . "admin/upload/" . $_FILES["file"]["name"];
    }
       else {
       echo "Upload error: " . $_FILES["file"]["name"] . " not uploaded.";
       }
       }
     }
   }
else
   {
   echo "Invalid file; file type was " . $_FILES["file"]["type"];
   }
?>

And the new output:
Quote:Upload: 1.TIF
Type: image/tiff
Size: 2.642578125 Kb
Temp file: /www/99k.org/k/e/y/keybored/htdocs/php5421lV

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to access /upload/1.TIF in /www/99k.org/k/e/y/keybored/htdocs/admin/image_upload_file.php on line 30
Upload error: 1.TIF not uploaded.

I think it has to do with the host -.- So, anybody got suggestions other than 000webhost for a free host so that I can put up my site?

000webhost is terrible .-. They don't allow file uploads Wink

http://x10hosting.com/

[Image: AmZJnA9.png]
Reply
#25
(07-19-2011, 11:35 PM)Glome Wrote: 000webhost is terrible .-. They don't allow file uploads Wink

http://x10hosting.com/

And the max filesize is 5 M, and the free space is only 1500 M... Yeah, that's why I don't want to host there. But Zymic doesn't seem to be good enough. I'll try x10.
Their captcha is a Sprint ad? Now that's something I haven't seen before XD
Reply
#26
Looks wise, I suggest using something to smooth the edges of your buttons and probably make a cool logo. I've never made a website from scratch so gj. Smile
[Image: siggggg.gif?t=1312782506]

[Image: signature.png?t=1312081740]
Reply
#27
[Image: 2lb2nb6.jpg] Your image didn't show! Sad So I hope you like this one! Colors of the Keybored! Big Grin
Reply
#28
Cool... But like I said, I'd prefer something similar to what I've got. Does this version load?

[Image: KBILogoSimple.PNG]

If not, it's like the first level of this game, but with green and red edges to the circle.
Reply
#29
Big Grin OK!
Reply
#30
YES! Changing the webhost fixed my uploading issue Big Grin Big Grin Big Grin

Now I can work on displaying the stuff!

Here's the new site link: http://keybored.x10.mx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)