Jump to content

The Eagle

Members
  • Posts

    132
  • Joined

  • Last visited

    Never

Everything posted by The Eagle

  1. In FileZilla, right click the file you're moving them too (up directory?) then go to Permissions, type in 0777 and it will be writable for the script.
  2. Mattal999, you beat me too it! Yes give CHMOD 0777 to that directory where you're moving them, and it will work. Good luck.
  3. $newname = md5_file($file['file']['tmp_name']).'.'.$matches[1]; Is how I worked out doing tmp_name on my image upload script.
  4. Well I thought I noticed an error. Replace your code with this below and test it out. <?php $allowedExtensions = array("png","jpg","jpeg","gif"); foreach ($_FILES as $file){ if($file['tmp_name'] > ''){ if(!in_array(end(explode(".",strtolower($file['name']))),$allowedExtensions)){ die($file['name'].' has an invalid file type...<br/>'); }else{ if($file == 'logo'){ $target_path = "images/logos/"; $target_path = $target_path . basename($file['name']); move_uploaded_file($file['tmp_name'], $target_path); }elseif(($file == 'image1') || ($file == 'image2')){ $target_path2 = "images/hotels/"; $target_path2 = $target_path . basename($file['name']); move_uploaded_file($file['tmp_name'], $target_path2); } } } } ?>
  5. Along with what ChemicalBliss has above, <form action="test.php"> <select name="time"> <option value="5">5</option> <option value="10">10</option> <option value="15">15</option> </select> <input type="submit"> </form> Then I guess you can use PHP to grab that data retrieved from the dropdown box, $int = $_REQUEST['time']; header("http://genuinesounds.mine.nu/getmyip.php?time="\.$int."\'"> Although I am second-guessing the above, you can also do it differently.
  6. dark_destroyer, My reply was "Text file database" so you can easily access it from your mobile device and read it easily. I don't really think I do understand your question though, what type of raw data are you trying to receive?
  7. Honestly, I cannot answer what makes it output, it was a bug I thought http://bugs.php.net/bug.php?id=25863
  8. You asked how can you take a raw image and do imagecreatefromjpeg() to it? Well, what I posted are bits of virtually what imagecreatefromjpeg() can do. If you'd like a better imagecreatefromjpeg() example then read below, <?php function LoadJpeg($imgname) { /* Attempt to open */ $im = @imagecreatefromjpeg($imgname); /* See if it failed */ if(!$im) { /* Create a black image */ $im = imagecreatetruecolor(150, 30); $bgc = imagecolorallocate($im, 255, 255, 255); $tc = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 150, 30, $bgc); /* Output an error message */ imagestring($im, 1, 5, 5, 'Error loading ' . $imgname, $tc); } return $im; } header('Content-Type: image/jpeg'); $img = LoadJpeg('bogus.image'); imagejpeg($img); imagedestroy($img); ?>
  9. Don't understand why you used two different variables, one that was not even defined earlier. $d_username = $row['username']; $d_password = $row['password']; if($d_username == $username && $d_password == $password) {
  10. This is just some of what I remember, $img_number = imagecreate(275,25); And then where I see, imagefill($img_number,0,0,$backcolor); Then displayed, imagejpeg($img_number);
  11. Shouldn't $topic be at least $subject? Do not know what $detail is, will presume a message. mail( "email", "$topic", $message, "From: $email" );
  12. I was going to post about SElinux. If your question is resolved, please set this topic to solved... thank you.
  13. A variable, yes is $foo = ''; $this may be a reserved variable. But I'm not certain. Surely enough, it's used for classes, virtually objects. $this = new Class();
  14. No problem, if you have any more questions don't hesitate to ask. If you may, can you please mark this topic as solved. Thanks.
  15. I remember that happening or something in like PHPBB. Make sure you don't have headers already set in your main index (and or) .. maybe you have them set twice.
  16. Something must be wrong with your PHP installation. There aren't any syntax errors in that PHP script and infact it just sucessfully worked for me. http://vazzer.net/phpfreaks/work/notaprogrammer
  17. Just add some more $fileatt, and you're good.... shouldn't be that difficult.
  18. You're able to change it in MySQL. Anyways, try removing %.
  19. var request:URLRequest = new URLRequest("http://www.yourserver.com/se.php"); request.method = URLRequestMethod.GET;
  20. Can I see "h0237" ?
  21. I don't see a single part in this script where it is sending the collected data to an "se.php".
  22. If you want a 2 digit number of the date, you're going to have to make that capital M lowercased. If not it'll display 3 letters of that month. Do not think you need them "%" either.
  23. What is the name of your PHP file, (the one you put in your first post)?
  24. Make sure the variables on your HTML form match up with your PHP-side. Also $contact_subject isn't being grabbed.
×
×
  • 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.