Store input values in session variable and get them back (PHP related) -


i have form in there 10 fields, of them drop downs. halfway through there 1 drop down list mandatory , next link adding new item drop down. add new link goes form entry can made , entry reflected in drop down. want when form comes original form values in fields prior drop down must retained. remember link element data not getting posted values cannot taken session without pressing submit button. tried session not working because said without pressing button values not posted no question of getting them in session. or hint appreciated. problem happens on social networking sites. when start filling profile somewhere in between asked upload image. link takes page after loading photo come original form , values still retained. form still not complete , not submitted filled values there. here code drop down list think code not of help. scenario important in case:

<tr>     <td>         dealer name     </td>     <td>         <?php         if(isset($_get['new_id']))         {       $new_id = $_get['new_id'];     ?>         <select class="field" name="dealer">             <option>--select--</option>             <?php             $result = "select name, id dealer order name asc";             $data5 = mysqli_query($link, $result);             while ($rec5 = mysqli_fetch_array($data5))             {             ?>                 <option value="<?php echo $rec5['id']; ?>" <?php if($rec5['id'] == $new_id) { echo 'selected'; } ?>><?php echo $rec5['name']; ?></option>             <?php             }             ?>         </select>     <?php     }     else     {     ?>         <select class="field" name="dealer">             <option>--select--</option>             <?php             $result = "select name, id dealer order name asc";             $data5 = mysqli_query($link, $result);             while ($rec5 = mysqli_fetch_array($data5)) {                 ?>                 <option value="<?php echo $rec5['id']; ?>"><?php echo $rec5['name']; ?></option>             <?php } ?>         </select>     <?php     }     ?> </td> <td>     <div style="width:68px;">         <a href="dealer_add.php&amp;action=add_new_dealer" class="button alignright" style="text-decoration:none;">             add new         </a>     </div> </td> <td></td> 

@ashish, i'm not sending value through drop down. there link next this.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -