Jump to content

Lateralus138

New Members
  • Posts

    8
  • Joined

  • Last visited

About Lateralus138

  • Birthday 10/12/1977

Contact Methods

  • MSN
    faithnomoread@hotmail.com
  • Website URL
    http://www.newpridegrafix.com/gfx/
  • Yahoo
    faithnomoread

Profile Information

  • Gender
    Male
  • Location
    Decatur, Il.

Lateralus138's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you, that is much easier!
  2. uM.. OK. Do I put this code before my code? I imagine it is checking for the time zone first?
  3. Hello, I have page a friend of mine uses as a personal homepage for her browser that I made and I have recently added a time thing with this code: <?php $name=("Gerfel"); $d=date("D"); $t="Have a nice day" . " " . $_POST["name"] ."!"; ?> <form action="index.php" method="post"> Name: <input type="text" name="name" /> <input style="position:relative;top:6px;" type="image" src="images/submit.png" alt="sub" /> </form> <?php echo "<table><tr><td>"; echo date("m/d/Y"); echo "</td></tr></table>"; ?> <?php echo "Today is $d!" ?> <br /> <?php if ($d=="Fri") echo "Have a nice weekend" . " " . $name ."!"; elseif ($d=="Sat") echo "Have a nice Saturday!" . " " . $name ."!"; elseif ($d=="Sun") echo "Have a nice Sunday!" . " " . $name ."!"; elseif ($d=="Mon") echo $t; elseif ($d=="Tue") echo $t; elseif ($d=="Wed") echo $t; elseif ($d=="Thu") echo $t; ?> <br /> <br /> She lives in the Philippines and I want to be able to set the time 14 hours ahead, is there a way to just add 14 hours to what is here. I don't want to go through the trouble of having to have her sign in. I am new to this so please don't laugh if my code is amateur and messed up, lol.
  4. Lol, hey thanx man, I'm sort if learning at irregular intervals so I'll be here off and on...
  5. Alright, thanks for leading me in the right direction... much appreciated.
  6. While I have an idea of what you're trying to explain to me (meaning it's not all lost on me, lol), I am not sure what part is the "['type'] checking" that you are referring to. I imagine you are talking about before it actually starts the upload to the temp folder and returns the file information? I would appreciate a more thorough explanation if it's no trouble. If it is too much trouble then thank you for your time already to this point and thank you for letting me know that code is flawed.
  7. Lol, at the very site I am learning the basics from. I should have know there'd be something there, but it's a big site. Thanx again.
  8. That pjpeg was from a small list at W3C and so I threw it in to be safe, but thank you for informing me. Thank you for your help... I googled, but I am not sure I used the right key-phrases and didn't come up with a list of what to use. Do you know of a list of types anywhere (application/octet-stream, images/jpeg etc...). Some sort of quick guide? Thank you for your help.
  9. Hey all, I am learning PHP and I am writing a script from the W3C Schools tutorials for uploading files to my server. I want to be able to use it for a friend to upload files to my server (I know to be careful). I only want it to be able to allow those images, exe, rar and zip files, no ISO's, .IMG's etc... I understand how the code works and have added and extra image file extension, but how would I add .exe, .zip and .rar? I thought maybe app/exe etc... and tried it, but I don't think it worked, files aren't being uploaded other than the images. All my permissions are set right and my test files sizes are ok. What I am is asking is what is the code to allow those 3 file types to be uploaded? Here is my code: <?php if (((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/pjpeg"))) && ($_FILES["file"]["size"] < 8000000)) { 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 { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } } } else { echo "Invalid file"; } ?>
  10. Hello all, I am learning PHP. I know HTML/CSS fluently and understand how all coding works, software and web. I hope to get some help here and just thought I'd stop in say hello...
×
×
  • 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.