Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. I have seen Thank you for submitting the form ... Redirecting Or Thank you for submitting the form ... Redirecting in 5 (4, 3, 2, 1, 0, redirect) So..., how do I do that. I know how to redirect, it's just I don't know how to do it like that. I have noticed lately, that when I do a form you are able to submit over, and over, and over again, which causes problems, and I finally found a client who pointed that out. I do that all the time, I need a way to do it, to where when the form actually submits, something happens to prevent it from submitting again. So the redirect idea came to mind, how do I get that to work, and what other options do I have to prevent the continual re-submittal of the information.
  2. After re looking over my question, I can tell already it was a stupid question. In essence it would just be overkill, and useless, because I only really need one thing for ajax, and I can build on functionality as needed. Thanks for the feedback, and pointing me in the right direction.
  3. This is an uninformational post. You are going to have to detail out your problem, if the mail is not sending it could be multiple things. If it's not properly setting the from header, it could be multiple things. You are going to have to be more specific as far as what is "actually" not happening, or is happening incorrectly.
  4. I also noticed this has gotten severely off topic with no relation to PHP, I apologize. If someone wants go ahead and move it to a more suitable area of the forum's.
  5. Ok, thanks for all the feedback so far. Here are the 2 situations I am thinking. I was thinking a drag/drop interface from desktop to web application (is this even possible). I looked over drag drop on the web, that's fine. However I was thinking them dragging something from there computer, over into a form, and it uploading it into the form. Sort of like the relay link you showed me (I love that functionality). THe main thing is however, I don't want to step into the drag/drop realm yet. I have used an ajax framework, but I want to step back to gain an understanding of the "xml request object". all the tutorials you showed me, and everyone I found online utilize a try/catch method (which I don't like). I am trying to get a rough idea on the 3 basic functions 1. The create an object function 2. The send a request function 3. The callback function for once the data come's back. This is the primary theory behind the Ajax concepts, but I am having trouble understanding the general structure needed for this. Any tutorials on that would be greatly appreciated. I had a book on it at one point, that pointed it out perfectly, but I don't remember the name. I have been digging through on line tutorials not (literally the first 15 pages in google, under every search term I could imagine". I searched and everything else I could think of, thanks for any forthcoming feedback.
  6. Well right now I had scriptalacious, rico, prototype.js, and moogoo. However I didn't need "all" of them, and they would end up conflicting anyway. So now I have rico (it's dependent which is prototype). If I get scriptalacious then will it conflict with either of the above.
  7. Ah perfect, thanks. Now I can see why Code Igniter has the cache system. I was wondering how that worked, where they cache some information into the system to make it skip a bunch of processes. Thanks for the tutorial.
  8. Is OpenRico and Prototype.js going to be all I will never need to really handle advanced ajax. Or should I grab some other frameworks along with it.
  9. 1. What is serialize, de-serialize and do I need to worry about getting into those? 2. I finally found out what output buffering is for, and how it works. Is it worth using for anything?
  10. Thanks for this advice, I have moo goo tools, and thanks for the tutorial, I am working with it now. Thanks again for all the advice.
  11. That was almost it, except this method utilizes the try/catch method. There was another method I have seen where I had some great examples in a book, but I lost the book. So I was trying to find an alternative, the general if/else if statement when initializing the check for the xmlHTTP request object. Do you know of any tutorials that would explain that.
  12. What has always pissed me off, is I could never find straight out ajax tutorials that explain JUST about the request object. I want to learn how to make the xml request object based on browsers, and then how to pass/recieve ajax data. Anyone know of good tutorials for that.
  13. I want something I can setup to allow people to login to a website, and connect to an FTP system. That will allow them to drag/drop file's in for uploading. I know it might require some Ajax, but the bulk will be PHP. What would I search for to find something similar, or where do I need to start, to set something like that up. I tried googling various terms, but what are they called exactly. It's where they login, and click a link and it'll do something like launch a mini-explorer or something and from there they can upload there file's via ftp into the system. There is a client of mine who want's that functionality on there website.
  14. Hmm. i didn't know you could pass get variable's via the src attribute. Thanks.
  15. Ok, I understand how the GD library works now, it's creating an image over the entire file. That makes sense, now I am left with another problem. These images are done dynamically, so adding in <img src="image.php" alt="Image" /> Won't allow me to pass the file information to the image page, how do I get the information over to that page. I can't pass a get query via src="" so I need to find a way to get that over there somehow.
  16. I also just changed that to resampled, like you suggested.
  17. I currently do, it's right before the image resizing starts. This is a jpg, but later there might be gif, or other types, I Have to be able to account for those once I get this working. However for now it's outputting this strange error, I have the content header sent. <?php $select = "SELECT * FROM proofs WHERE userid = '" . $_SESSION['id'] . "';"; $query = mysql_query($select); echo "<hr />\n"; while ($row = mysql_fetch_array($query)) { $pn = $row['id']; $height = "height=\"100px\""; $width = "width=\"100px\""; echo "<br />"; if (function_exists(getimagesize)) { $filename = "proofs/" . $row['imagename']; $percent = 0.5; header('Content-type: image/jpeg'); // Get new sizes list($width, $height) = getimagesize($filename); $newwidth = $width * $percent; $newheight = $height * $percent; // Load $thumb = imagecreatetruecolor($newwidth, $newheight); $source = imagecreatefromjpeg($filename); // Resize imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); // Output imagejpeg($thumb); } echo "<br />"; echo "<a href=\"proofs/" . $row['pdfname'] . "\" title=\"{$row[pdfname]}\">{$row[pdfname]}</a>"; echo "<br />"; echo $row['comments']; echo "<br />"; echo "<hr />\n"; } ?>
  18. Well I found a few issues witht he way I was doing it, so I went ahead and changed what needing changes. So instead of outputting what it did above, it started throwing out. Which seems to be roughly the same thing just with a few character's different. I know it obviously has something to do with encoding, but why is it not decoding the image correctly. I checked to make sure the GD library was installed, and even put ni the safeguard just to double test before the library was accessed. I don't understand this strange error. I am also sure it's pointing to the image correctly, when I feed it an improper file location it say's it's an improper file location. So it's correctly accessing the image, it's just not decoding it/resizing it right. The idea of this was to take the original image, and display a "thumbnail" version of it. I was starting off with half the size to see what it looked like, and just get it successfully resizing, then I was going to edit it, to dynamically create thumbnails of a specific size. It current resizes in the code, and it's distorted, so I wanted the GD library to do it correctly. Any ideas on why this error is happening.
  19. This is very disturbing. Based on some studying I did, plus a few examples off of php.net I came up with this <?php if (function_exists(getimagesize)) { $filename = "proofs/" . $row['imagename']; $percent = 0.5; // Get new sizes list($width, $height) = getimagesize($filename); $newwidth = $width * $percent; $newheight = $height * $percent; // Load $thumb = imagecreatetruecolor($newwidth, $newheight); $source = imagecreatefromjpeg($filename); // Resize imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); // Output imagejpeg($thumb); } ?> This is great and all, but it came out with this. This was really not-cool. I wasn't expecting this, it probably has to do with something, but I can't see what. This code was almost replicated exactly from php.net, except a few additions.
  20. Does anyone know of a really good graphics class. I went though php-classes.com but didn't find anything really decent. Does anyone know something major out there that they have heard of, or use. One that hopefully supports GD, GD2, Magick, or whatever else. Atleast GD related libraries.
  21. Thanks for all the advice. Right now what I was thinking is I dumped my framework for the public until I am A LOT better at OOP and MVC. The thing I am trying to do now was create a simple include file (Not a framework). Your right, I could just use Code Igniter. For now however I wanted to just get some classes together, but I found out why I was having problems. The reason is, because I am trying to get something more lightweight. Something where I can get associated with JUST classes, and modifying classes without a framework. I wanted to get good with OOP then go ahead and get into code igniter, and use it for a few projects to understand MVC. I can't understand MVC without OOP (that I knew of). Thanks for all the feedback.
  22. <?php $imagelib = new CI_Image_lib(); $config['image_library'] = 'GD'; $config['source_image'] = "proofs/" . $row['imagename'] . "\""; $config['create_thumb'] = TRUE; $config['maintain_ratio'] = TRUE; $config['width'] = 75; $config['height'] = 50; $image_lib->initialize($config); $image_lib->resize(); ?> After using this I know for a fact everything below the loading is correct. There is something wrong with the way I am trying to load the class. I know it's also instantiating it properly because when I try one that isn't there it comes back as (cannot load non-instantiated class). well when I load the right one which is as above, it returns. Which let's me know it's actually instantiating the class, but not allowing me to call the function. What am I doing wrong?
  23. Did some more learning. I saw now how to go ahead and set variables in OOP, and how to call functions. So I restructed my code to <?php $imagelib = new CI_Image_lib(); $imagelib->$image_library = 'GD'; $imagelib->source_image = "proofs/" . $row['imagename'] . "\""; $imagelib->create_thumb = TRUE; $imagelib->maintain_ratio = TRUE; $imagelib->width = 75; $imagelib->height = 50; $image_lib->initialize($config); $image_lib->resize(); ?> However it's still throwing that same error. Line 76 is the line that reads $image_lib->initialize();
  24. Sorry, here is my other code <?php $imagelib = new CI_Image_lib(); $config['image_library'] = 'GD'; $config['source_image'] = "proofs/" . $row['imagename'] . "\""; $config['create_thumb'] = TRUE; $config['maintain_ratio'] = TRUE; $config['width'] = 75; $config['height'] = 50; $this->image_lib->initialize($config); $this->image_lib->resize(); ?> I am now getting
  25. I did some more looking into the files, and found the loader. I don't want to move into using a loader in my framework yet (I took it off mainstream the site is down and everything. I want to learn the standard way and later build up to using a loader class. Right now I have $imagelib = new CI_Image_lib() config['image_library'] = 'GD'; config['source_image'] = "proofs/" . $row['imagename'] . "\""; config['create_thumb'] = TRUE; config['maintain_ratio'] = TRUE; config['width'] = 75; config['height'] = 50; $this->image_lib->initialize($config); $this->image_lib->resize(); But it's throwing me this
×
×
  • 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.