Jump to content

argrafic

Members
  • Posts

    39
  • Joined

  • Last visited

    Never

Everything posted by argrafic

  1. well, the people i'm developing for don't want the users to know where all the images are stored, they are afraid someone could steal the images.
  2. hello all. i'm developing a gallery but we want to hide the path where the image is stored. is that possible and how? thanks!!
  3. Hello all, I'm using the script from this site: http://www.theopensurgery.com/29/php-upload-and-resize-image-script/#comment-415 I have it working for jpg and gif, but can't get it to work with png and bmp. Help!! Please!!! Thanks!!! Here's the part of the code that makes the thumbnails: if (isset ($_FILES['gi_imagen'])){ $imagename = $_FILES['gi_imagen']['name'][$i]; $source = $_FILES['gi_imagen']['tmp_name'][$i]; $tipo = $_FILES['gi_imagen']['type'][$i]; echo "<br>Tip: ".$tipo; $target = "../galerias/".$gal."_".$imagename; move_uploaded_file($source, $target); $imagepath = $gal."_".$imagename; $save = "../galerias/".$gal."_"."tn_".$imagename; //thumbnail $file = "../galerias/".$imagepath; //original list($width, $height) = getimagesize($file); $modwidth = 80; $diff = $width / $modwidth; $modheight = $height / $diff; $tn = imagecreatetruecolor($modwidth, $modheight); if($tipo == "image/pjpeg" || $tipo == "image/jpeg" || $tipo == "image/jpeg" || $tipo == "image/JPG" || $tipo == "image/jpg"){ $image = imagecreatefromjpeg($file); } else if($tipo == "image/gif" || $tipo == "image/GIF"){ $image = imagecreatefromgif($file); } else if($tipo == "image/bmp" || $tipo == "image/BMP"){ $image = imagecreatefromwbmp($file); } else if($tipo == "image/X-PNG" || $tipo == "image/PNG" || $tipo == "image/png" || $tipo == "image/x-png"){ $image = imagecreatefrompng($file); } imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height); if($tipo == "image/pjpeg" || $tipo == "image/jpeg" || $tipo == "image/jpeg" || $tipo == "image/JPG"){ imagejpeg($tn, $save, 100); } else if($tipo == "image/gif" || $tipo == "image/GIF"){ imagegif($tn, $save, 100); } else if($tipo == "image/bmp" || $tipo == "image/BMP"){ imagewbmp($tn, $save, 100); } else if($tipo == "image/X-PNG" || $tipo == "image/PNG" || $tipo == "image/png" || $tipo == "image/x-png"){ imagepng($tn, $save, 100); } echo "<br>Img: ".$img = $imagepath; //imagen final echo "<br>Thmb: ".$thb = $gal."_"."tn_".$imagename; //thumbnail final }
  4. Hello all, I use HTML Mime Mail for PHP (http://www.phpguru.org/static/mime.mail.html) to send emails from a website. It works as a regular contact form and when someone answers it the data is stored in the database and it is also emailed to several people. The purpose of the contact form is to work for the FAQs section of the site. So we made an administrator that you could select the data registered by the user and anwer the question. This would send the user an email and store the answer in the database. The people that use it have now found that that way could be inpractical for them, because they sometimes are in such a hurry they just answer the questions directly through their emails and not from the application. Is there a way so that when they send an email the answer gets stored directly in the database? Thanks!!!
  5. Hello, I want to display the records from a table in the database but i don't want all the info printed on screen because there are columns that have long text, so I wanted to know how can I get the first 5-10 words from the column and print those on screen? Thanks!
  6. thanks. another doubt, with this i could also add all the other options to the dropdown?
  7. sorry... i have the regular insert form that has 3 list/menus, one gets the values from the database, the others have "static" content. then i also have a update form for the values stored in the database for the insert form. my issue is that when i load the info to the update form i want to know if there is a way that for the list/menus the option that appears is the one stored in the database and not the first value in the list/menu. i don't know... i hope i explained it better...
  8. Hello all. I have the insert form that has 3 list/menus. When I want to update a record I gather all the information and show it with a form. My problem is with the values the list/menus have, because so far they appear with the default value which if the user doesn't see might overwrite withouth their knowledge the wrong value. How can I get the list/menu to match the value saved in the database? Thanks!
  9. nice, thanks!!! but, now, how should the interphse be constructed? it's suppossed to be shown like the image, all the fields at the same time. and how would the mysql query be like? with a for or a while? thanks!
  10. .xls, most users have up to office 2003
  11. Well, I'm about to start a new project and I face with something I had never faced before. It's a form to input some data that will be registered about projects. The issue here is in the image i post: I'm really lost, I don't know how to do it so it stores all the data. I was thinking of making a table for each column and all will be identified with the main id of the project, but i don't know if that's the best way to do it. Thanks!!!
  12. thanks. the way it's supposed to work is that there are reports i will determine with php but the user can just export to excel the whole database.
  13. I need to export a MySQL database to Excel. How can I do it?
  14. Hello, It seems that I will have to develop an aplication that when an activity is created it sends both emails and SMS. I have no problem with the emails part, but I have never done something that sends SMS. So, how easy is it? Cheap, expensive? Thanks!!!
  15. I don't know if this is the right place to post this. I developed a PHP website that uses HTML Mime Mail for PHP (http://www.phpguru.org/static/mime.mail.html) and it's installed in a Windows 2003 server. But until now they told me they don't have a mail server installed and installing Exchange isn't an option ($$$). So, are there any cheap (or free) mail servers for Windows? Thanks!!!
  16. well, i found the answer to my question!!!! $string = "This is an example"; $arrayOfString = explode(" ", $string); foreach($arrayOfString as $word) { echo '<p>The word is: '. $word . '</p>'; } so i made the tweak to use it for what i needed, this is the code i'm using: $string = $_POST['t_tema']; $arrayOfString = explode(" ", $string); foreach($arrayOfString as $word) { $sql="INSERT INTO blog_tema (t_b_id, t_tema) VALUES ('5', '$word')"; }
  17. ??? ok... then what? i keep getting: Array instead of all the words...
  18. Hello all. I'm building some sort of blog and I have the field for the type of cloud or keywords from the post and I'm having tourble thinking how it works. The way I'm doing it is that you have a textfield and you enter the words separated with a space. Then when I catch the value of the textfield I explode it so I have an array of words I would insert into a table in the database associated with the id of the blog post so then I can find the posts depending on the words. But I have been batteling all morning with the array, how to break each part into a single word and then isert that word into the database. I've tried the serialized and unserialized function and can't seem to make it work!!! I hope someone can help me!! Thanks!!!
  19. Hello all. I'm developing the administrator for a website and there is this module where you can upload a file that can be an image or a swf file. I wanted to know if there is a way to get the width and height with PHP of the uploaded file. Thanks!
  20. Hello all. I am developing a website and I had never done any documentation for a website. Does anyone here have examples to guide myself? Thanks!
  21. Hello. I developed a PHP with MySQL webpage and tested locally and in my server everything works fine. But once the client installed it in their server when entering characters with spanish accents áéíúó and ñ they get the following error: Incorrect string value: '\xEDa de ...' for column 'h_acontecimiento' at row 1 We both have MySQL 5 installed. Why is that error appearing and what can I do to correct that? Thanks!!!
  22. i get the error: connection issues or permission issues?
×
×
  • 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.