I have written a login form, in this I have used, form and method is post and action is(PHP self) <?php $_PHP_SELF ?>
(am using php in the form itself). In php i have written if the login is success then 'welcome' and if it fails then 'sorry'.
But those results are coming in a new page. I want to get those results in the same page when i click the submit button. How can I do this?
PHP is a server-side language, so after submitting the login data, a new page is generated by the server, if you want the welcome || sorry
message to be returned without refreshing the page, you'll need to use ajax. I gather you're rather new to all this, so google some javascript Tuts on ajax, or use a JavaScript lib if you need to have this up and running fast. The easiest imho is jQuery, as it is the most documented of the lot