Ajax/php Form

Ajax/php Form
I need a form that does the following:

$var1 = ‘x’;
$var2 = ‘y’;
$var3 = ‘z’;
$varn = ‘n’;

if(thescript is posted for the first time || script should be reloaded) {

ajax: post var1 to n to: input.php, do something
get output from input (ie $number1 and $number2}

<div=myform>

echo $number1 echo $number2 (or more)
echo <inputfield>
</div=myform>

ajax.onclick.post inputfield to output.php

if (isempty(inputfield) then display $message under <input field>
if(!isempty(inputfield) –>2 options
if(error) then display <div error>;
if(no-error)then display for 0,2 seconds <div correct> AND after that the form should be reloaded by running input.php again. So the user can start with a fresh form. The form loops itself, but has to be reloaded with randomly generated numbers from input.

The most important thing for me is to get a working structure.

Leave a Reply

Your email address will not be published. Required fields are marked *