IlaminiAyebatonyeDagogo Posted March 16, 2014 Share Posted March 16, 2014 I have a form, that is a chat apps am building for project. Now everything seems to be working fine to the best of my ability. I want to submit the data from the form into my php script without any form of reload. That means i don't want redirection, to the action page and back to the chat page. What i want is for the page to submit the form at the background. And i know i need ajax to this bt i cnt get it right. Here is my form <form method="post" id='chatbox' action="reply.php"> <input type="text" id="text" name="adchat"/> <input type='hidden' id='user_id' name='id' value='1'> <input type='hidden' id='user_name' name='id' value='Ben'> <input type='submit' id='submit' name='chat' value='send'></form> What i need is an ajax code to submit d variable to the reply.php scrit and maybe a message to display when the form it been submitted say something like (sending...). Thanks for assiting. Pls i don't know anything when it comes to AJAX. Please forgive me and help me. Don't borther about displaying the user input just make it submit it to the php script. Thank you once again. Quote Link to comment https://forums.phpfreaks.com/topic/287007-submit-form-to-a-php-script/ Share on other sites More sharing options...
trq Posted March 16, 2014 Share Posted March 16, 2014 Sounds like you need to read some basic ajax tutorials. Were not going to write one for you, there are plenty already out there. Quote Link to comment https://forums.phpfreaks.com/topic/287007-submit-form-to-a-php-script/#findComment-1472764 Share on other sites More sharing options...
IlaminiAyebatonyeDagogo Posted March 16, 2014 Author Share Posted March 16, 2014 could you please point me to web page where i get tutorials for ajax beginers Quote Link to comment https://forums.phpfreaks.com/topic/287007-submit-form-to-a-php-script/#findComment-1472780 Share on other sites More sharing options...
trq Posted March 16, 2014 Share Posted March 16, 2014 http://google.com Quote Link to comment https://forums.phpfreaks.com/topic/287007-submit-form-to-a-php-script/#findComment-1472781 Share on other sites More sharing options...
ginerjm Posted March 16, 2014 Share Posted March 16, 2014 google.com ?? Quote Link to comment https://forums.phpfreaks.com/topic/287007-submit-form-to-a-php-script/#findComment-1472782 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.