html - How to not clear input fields in php form? -


i have webpage uses php , has bunch of input fields in user enters data , turn input sql statement query database. parse input fields , put sql statement when click "submit" button, input fields cleared. how can make these input fields don't erase every time user clicks "submit"?

store them in local variables

<?php $name = ''; $last = '';  if(isset($_post['post_me'])) {    $name = $_post['post_me'];    $last = $_post['last'];    //process further } ?> <form method="post">   <input type="text" name="name" value="<?php echo $name; ?>" />   <input type="text" name="last" value="<?php echo $last; ?>" />   <input type="submit" name="post_me" /> </form> 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -