php - Getting a value from text input field, then displaying on POST -


i'm trying value form, display on posting of form. can value appear in second text field, once have chosen option using ajax auto-select, how value shown stored variable display on posting? have been trying -

if ($_post['action'] == 'getentity') {     $value= $entity;     $content .= '<div>'.$value.' hello</div>';     }  <form method="post" action="?">  <input type="text" name="townid_display" size="50" onkeyup="javascript:ajax_showoptions(this,\'getentitiesbyletters\',event)"> <input type="text" name="townid" id="townid_display_hidden" value="'.$entity.'" /> <input type="hidden" name="action" value="getentity" /> <input type="submit" name="submit"  value="find"/> 

many help.

try

<input type="text" name="townid" id="townid_display_hidden" value="<?php $value = $entity; echo $entity; ?>" /> 

and better use this

if ($_post['action'] == 'getentity') {     $value= $_post['townid'];     $content .= '<div>'.$value.' hello</div>';     } 

it should work.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -