Add item to MySql without leaving a webpage

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
User avatar
php-forum GURU
php-forum GURU
Posts: 2192
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Fri May 20, 2011 5:20 am

You'll need to learn a little about AJAX and CSS.

User avatar
php-forum Active User
php-forum Active User
Posts: 277
Joined: Wed Aug 25, 2010 10:42 am

Sun May 22, 2011 10:29 am

You must use some JavaScript ,.. I recommend to use jQuery ( jQuery POST - and jQuery LOAD - )

User avatar
New php-forum User
New php-forum User
Posts: 84
Joined: Sat May 21, 2011 10:26 pm

Thu May 26, 2011 11:24 pm

Here am posted an article called submit a form without refreshing a web page. Hope that it will help you.
Here is the article link ... n-php.html
Am using Ajax to submit the form

Code: Select all

<script type="text/javascript">
                var element = $(this);
                var Id = element.attr("id");
                var loadplacecomment = $("#message");
                var username = $("#username").val();
                var password = $("#password").val();
                var email = $("#email").val();
                var mobile = $("#mobile").val();
                var dataString = 'username='+ username + '&password='+ password + '&email='+ email +'&mobile='+ mobile;
                if(username==''|| password=='' || email=='' || mobile=='')
                alert("Please Enter all the Fields");
                $("#flash").fadeIn(400).html('<img src="ajax-loader.gif" align="absmiddle"> loading.....');
                type: "POST",
                url: "ajaxinsert.php",
                data: dataString,
                cache: false,
                success: function(html){
                return false;});});
Thank You.

Post Reply