luvburn Posted September 20, 2006 Share Posted September 20, 2006 I got this page simptom.php that when i click the submit button the page diagnos.php will appear. But i want the values from simptom.php can be viewed in another page called list.php. How do i do that by using session? Here is the code for simptom.php and i created a session for this page.[code]<?php session_name ('diagnos'); session_start();?> <form name="form1" method="get" action="diagnos.php" > <table><tr> <td width="89" align="right" class="tbody2">Umur :</td> <td width="107" class="tbody"><input type="radio" name="age" value="1"> < 1 tahun</td> <td width="124" class="tbody"><input type="radio" name="age" value="2"> 1 - 10 tahun</td> <td width="131" class="tbody"><input type="radio" name="age" value="3"> 11 - 19 tahun</td> <td width="110" class="tbody"><input type="radio" name="age" value="4"> > 19 tahun</td> </tr> <tr> <td class="tbody"><input type="radio" name="jantina" value="m"> Male</td> <td class="tbody"><input type="radio" name="jantina" value="f"> Female</td> </tr> </table> <input type="submit" name="submit" value="Next"></form>[/code] Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted September 20, 2006 Share Posted September 20, 2006 You need to run session_start() first, then just set the variables like: $_SESSION['key'] = "value"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.