Id look into Ajax if i was you.
You could so summat like this:
Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
<!--
function senddata() {
var name = document.getElementById('username');
$('#confirmation_div ').load("usersubmit.php?username=" + name);
}
//-->
</script>
Call senddata from your JS validation and put the users data in usersubmit.php?blaa=blaa&moo=moo etc.
Then
in usersubmit.php
do your stuff.
And whatever usersubmit returns it will then populate your div named confirmation_div with it..
For instance, In confirmation_div you could have your registration form.
Once the php script is called and all goes well you could
Echo "Welcome your now registered";
and this will replace the form with the above message ( all without a page reload or anything )
Hope this helps.
Last edited by lynxus; 02-11-2010 at 03:52 PM..
|