Welcome Guest, Not a member yet? Register   Sign In
Passing a form variable through an ajax updater to a php mysql query!
#1

[eluser]Unknown[/eluser]
Hi All,

I have the following html form:

<form name="input" method="post" action="[removed]ajaxpage('5000function_get_message.php' , 'content');">
<input type="submit" value="go to:">
<input type="text" name="user" size="6" maxlength="6"/>
</form>

When a user enters a number into the "user" field and clicks "got to:" the ajaxpage function updates the 'content' div on the page with the result of 5000function_get_message.php. All of the pieces work independantly, however when the form executes the .php function does not recieve the user data from the form.

How can I pass the number entered by the user to the .php function, but still utilise the ajax updater?

cheers

Dan
#2

[eluser]Jbeasley6651[/eluser]
I am not sure but i think it sounds like you need to get the form data to the query.

You can do this by putting

data: $("form").serialize();

in your ajax.


Post your current ajax code here if you can.




Theme © iAndrew 2016 - Forum software by © MyBB