views:

40

answers:

2

hi guys,

i want to make a registration form, here i want to user to add some inputs to it, when (s)he register a person, i want to submit it, register the person but i want only to give a alert saying registration successful, in the original registration form some fields are cleared and user can use it to register people again, cycle goes like this from the morning to the evening!

can you please help me to achieve this, any tutorial links code to study about this? please post them, it will be really helpful!

regards, Rangana

+1  A: 

You can submit form to the same page if for example you are in index.php then put as form action index.php, at the top make the proper inserts and load again the form. If you need some fields to be filled automatically you can also on the top write them in session and in the form just to use them. like this <input type="text" value="<?php echo $_SESSION['name']; ?>" />

Centurion
+1  A: 

If you want to register users and don't want to refresh the page and alert them there and then, you will have to use the Ajax, see this tutorial:

Sarfraz