Jump to content

PHP or Ajax? Sign up form


acctman

Recommended Posts

I'm working on creating a sign up page for my site, but I'm unsure as to how it should be coded.

 

The form has the basic signup fields (name, pass, email, city, state, etc) but there is also a upload image field. I'd like to improve the upload image by adding a crop/resize image script to it. I have all the coding needed for this but I don't know how to save the data on the first page, and send the user to a second page to do image cropping then have a final page where he user submits there registration info.

 

Another option i thought about is just having 1 page and then use an iframe to do all the image crop/resize. But, not every browser likes iframes.

 

So what are my options here, the current registrations scripts processes with a .php script. I would like to keep everything simple. I can't use a popup because it'll probably be blocked. so options seem to be find a way to temporary save the data (without write to the db) while user goes to the image cropping page, then redisplay the data once they're done. Or a more complex way use some type of ajax/javascript/div/etc coding to allow me to insert the cropping/upload image script onto the same page as the registration...

 

if anyone has a idea as to how this can be done please let me know

Link to comment
Share on other sites

Resizing is standard fare, but cropping? I'm not real big on PHP image functions, but I can't find anything concerning cropping. Are you using this term in the same vernacular as cropping within Photoshop? That's where you region a sub-section of the image, then crop to it. I had no idea this was possible in PHP if that's what you mean...

 

Anyways, resizing is a background process, so I don't see the need for anything to require fancy form processing. They upload the image. Your script checks for an acceptable image type, then you do an IF condition whereby if the size > allowed width or height, your script resizes it. So... your form should contain name, pass, email, etc., then a image upload input with a browse button. Seems pretty straightforward unless I'm missing something...

 

PhREEEk

Link to comment
Share on other sites

Resizing is standard fare, but cropping? I'm not real big on PHP image functions, but I can't find anything concerning cropping. Are you using this term in the same vernacular as cropping within Photoshop? That's where you region a sub-section of the image, then crop to it. I had no idea this was possible in PHP if that's what you mean...

 

Anyways, resizing is a background process, so I don't see the need for anything to require fancy form processing. They upload the image. Your script checks for an acceptable image type, then you do an IF condition whereby if the size > allowed width or height, your script resizes it. So... your form should contain name, pass, email, etc., then a image upload input with a browse button. Seems pretty straightforward unless I'm missing something...

 

PhREEEk

 

i'm using this script http://mondaybynoon.com/examples/image_crop_resize/, i would like to incorporate everything on One registration page without a next page.  But before I start asking questions about the image crop script code I want to know if i should be looking more at ajax or can php handle everything

Link to comment
Share on other sites

Do your users really need the crop feature? That's done through Javascript. Although the resize is done through JS for that example, PHP can do the resizing. I guess we need to know what your application for these image manipulations really is. Are these images mainly for a forum type of profile avatar? If so, then resizing is really all you need, just for the sake of uniformity. If you need to go with all the bells and whistles of that example, then you're in for some programming to get that all into one page (you'll need AJAX).

 

PhREEEk

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.