Jump to content

Submit Form to a php script


Recommended Posts

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.