Welcome Guest, Not a member yet? Register   Sign In
jQuery with PHP

Hello everyone,

I am trying to create a registration form like facebook has, where the user sees only one error field on the bottom, (for which I guess PHP if statements are nested and are checking for inputs 1 by 1). Anyways, how would I come across this, using jquery and PHP, where the page doesn't reload. I really need help with this, and don't got no idea where to start from. I was struggling on finding such scripts online last couple of days but didn't find anything useful, or anything that could have done implemented with CodeIgniter.

Thanks in advance, any help is appreciated.

you can use ajax with jquery..so that the page doesn't load...

I know I can, how would I make it so when the user clicks signup the code will check in function signup() for validation errors and print them without refreshing?

you can use jQuery ajax form for convert your form into ajax process

if you using ci then the script will be like this:

        // wait for the DOM to be loaded
        $(function() {
            // bind 'myForm' and provide a simple callback function
            $('#myForm').ajaxForm(function() {
                alert("Thank you for your comment!");
    echo form_open('controllerprocess',array('id'=>'myForm'));
    Name: &lt;?php echo form_input('name'); ?&gt;<br />
    Comment: &lt;?php echo form_textarea('comment'); ?&gt;<br />
    &lt;?php echo form_submit('submit','Submit comment'); ?&gt;
    echo form_close();

whoa... I can't write any script tag in this forum, so you have to see the original link to get a clue.

Theme © iAndrew 2016 - Forum software by © MyBB