javascript - PHP not able to echo form input while using Ajax -


my php file echo's statement cannot echo actual value given user.

i using ajax , on left hand side there form asks email id. when email id entered , form submitted, results need show on right hand side.

on submitting form though, php able echo statement "you have entered :" cannot echo actual email id entered.

pls help

this form:-

<form action="javascript:ajaxpage('files/search2.php', 'columntwo')" method="post">                         email :<input type="text" name="email" value=""/>                         <input type="submit" value="submit">` </form> 

this php file:-

<?php $email = $_post['email']; echo "the email id :"; echo $email; ?> <html> <body> <h1>hello world</h1> </body> </html> 

only message "the email id :" displayed

$email not displayed

first : use eventhandlers, not action="javascript:blah()"; second : in javascript ajax function values form inputs , send them php file using post method.you can make own ajax, there libraries that, prototype.js or jquery easy use. read little, it's quite easy, , return here if have problems implementing it.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -