javascript - How I can send value in PHP from one page to another using other than session? -
i have multistep form in on second step have date input field , next , previous button.i want fetch values database in 3 step using date input field clicking on next button not submit button.
this second step.
<input type="date" name="date" id="date"> <input type="button" name="previous" class="previous action-button" value="previous" /> <input type="button" name="nextnew" id="nextnew" class="next action-button" value="next" />
i have used ajax.
<script> $("#nextnew").click(function() { var name2 = $("#date").val(); //alert(name2); $.ajax({ url:"getuser.php", type:"get", data:{ id2: name2}, success:function(data){ $("#detail").html(data); } }); }); </script>
this getuser.php
<div class="container-fluid" style="margin-top:30px;" id="detail"> <?php include('config.php'); session_start(); if(isset($_request['id2'])) { $_session['new22']=$_get['id2']; echo "your date selected :-"; echo $_get['id2']; } ?> </div>
i setting value in session value fetch value in third step.but problem have same value set once , fetching same value always.is there way send value getuser.php page.
i think should value in hidden fields.
Comments
Post a Comment