Jump to content

Q695

Members
  • Posts

    783
  • Joined

  • Last visited

Everything posted by Q695

  1. The server I'm using is WAMP, and it does upload the image every time without error, but I'm recieving this error: Warning: getimagesize(C:\wamp\tmp\php11AC.tmp) [function.getimagesize]: failed to open stream: No such file or directory in C:\........................... on line 15 the code is as follows $name = $_FILES['creature_image']['name']; $temp = $_FILES['creature_image']['tmp_name']; $type = $_FILES['creature_image']['type']; $size = $_FILES['creature_image']['size']; print_r($_FILES); $img_size = getimagesize( $temp ); //size of uploaded image echo "<br>"; print_r($img_size); $width= $img_size[0]; $height= $img_size[1]; the print_r dumps are: Array ( [creature_image] => Array ( [name] => hare-rabbit-notes-and-que-006[1].jpg [type] => image/jpeg [tmp_name] => C:\wamp\tmp\phpF25E.tmp [error] => 0 => 35343 ) ) Array ( [0] => 460 [1] => 276 [2] => 2 [3] => width="460" height="276" [bits] => 8 [channels] => 3 [mime] => image/jpeg ) Array ( [creature_image] => Array ( [name] => hare-rabbit-notes-and-que-006[1].jpg [type] => image/jpeg [tmp_name] => C:\wamp\tmp\phpF25E.tmp [error] => 0 => 35343 ) ) Why am I getting the error when data is there?
  2. I'm trying to reduce the chance of repeating more than 62^64.
  3. Does anyone know what charicters would be outerrored by PHP/MySQL I so far have 'abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ';
  4. Is there anything in the data field on that spot of the table?
  5. Oh, it's posting as a $_FILES, not a $_POST.
  6. Copy the text from phpmyadmin, then put in variables where appropriate.
  7. Learn Programmable Logic Controlers, or Assembly. That's next
  8. This guys video was helpful for me when I couldn't get helpful replies on here: http://www.youtube.com/watch?v=T0Uv3VeTMR8
  9. Try print_r(Recordset1); to see what the variable name is you want to access then put it in the location.
  10. Any variable not declaired to be internal to the form needs to be called a global as its not a local variable. See: function Sum() { global $a, $b; $b = $a + $b; }
  11. Why would the following: <form id="creature_add" enctype="multipart/form-data" action="?page=105" method="post" name="FormName"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" align="center">Creature Add</td> </tr> <tr> <td colspan="2">Creature Name: <input type="text" name="creature_name" size="24" /></td> </tr> <tr> <td colspan="2" align="center">Creature Picture: <p><input type="file" name="creature_image" size="16" /></p> </td> </tr> <tr> <td>Defense Rate <input type="text" name="def_rate" size="24" /> </td> <td>Defense Rate Range <input type="text" name="def_rate_range" size="24" /> </td> </tr> <tr> <td>Attack Rate <input type="text" name="att_rate" size="24" /> </td> <td>Attack Rate Range <input type="text" name="att_rate_range" size="24" /> </td> </tr> <tr> <td>Defense <input type="text" name="def" size="24" /> </td> <td>Defense Range <input type="text" name="def_range" size="24" /> </td> </tr> <tr> <td>Attack <input type="text" name="att" size="24" /> </td> <td>Attack Range <input type="text" name="att_range" size="24" /> </td> </tr> <tr> <td>Health <input type="text" name="health" size="24" /> </td> <td>Health Range <input type="text" name="health_range" size="24" /> </td> </tr> <tr> <td align="center" colspan="2"><input type="submit" name="submit" value="Submit" /></td> </tr> </table> </form> print_r this string: Array ( [creature_name] => dog [def_rate] => 1 [def_rate_range] => 2 [att_rate] => 3 [att_rate_range] => 4 [def] => 5 [def_range] => 6 [att] => 7 [att_range] => 8 [health] => 9 [health_range] => 10 [submit] => Submit ) As you can see the form isn't passing the file input type.
  12. The name is appearing random, and inside the md5 you're generating a random name. It would be nice if the mt_rand could do letters, and numbers.
  13. POF does it with: <div style="float:left;margin-bottom: 15px;padding-left:24px;"> <a href="javascript: B('http://pics.pof.com/dating/168/51/13rv1hbww3d1ndg3vgx4zpomx289470751.2.jpg','')"> <img border="0" alt="" onmouseout="hidetrail();" onmouseover="showtrail('http://pics.plentyoffish.com/dating/168/51/13rv1hbww3d1ndg3vgx4zpomx289470751.2.jpg',225);" src="http://pics.pof.com/thumbnails/168/51/13rv1hbww3d1ndg3vgx4zpomx289470751.2.jpg"> </a> </div> It's similar to AngularJS
  14. Try applying a grid to an image. I did this as a basic HTML project years ago. You can also use anchor name with an on mouse over to slide out a menu somewhere on the screen.
  15. I do it by functionality. i.e.: part one: the shopping cart part two: the list of items part three: the search engine part four: ...
  16. Is there a way to create a larger range of random numbers than this code will create, if so how? $path= "$path" . md5(mt_rand(0, mt_getrandmax())). '.jpg';
  17. Thanks, I forgot if everything is in the base directory it plays on the base directory.
  18. Error: Warning: move_uploaded_file(..\xxxxxxx\ttttttttt\ cfcd208495d565ef66e7dff9f98764da.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in mmmmmm\sssssss\used_item.php on line 25 Objective: Have a script in: C:\wamp\www\mmmmmm\sssssssss Upload to: C:\wamp\www\mmmmmm\xxxxxxx\tttttttttttttttttt I just need to get the addressing scheme corrected by down one, and up two I believe.
  19. Any advice on how to do an uploader like I'm describing for the purpose described above??
  20. Just put some sort of echo inside the if statement
  21. Think of how users can upload images on facebook.
  22. So you want to add a score number column to each table, and have it total all the rows, and average it out for a grade on the teachers submissions to the network? I would look up the total score based on log in id, the average it based upon number of submissions.
  23. The random unique naming convention of actual images 200x200 Not anything they decide to upload as an image Not allowing users to overwrite images of each other
  24. So you see the image, because I found that tricky when I first started out with the captcha?
  25. hand code is a good assembeler. on WAMP I use PHPmyadmin . very good for database compairing, and you can test atabase scripts in it.
×
×
  • 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.