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] Link to comment https://forums.phpfreaks.com/topic/21424-passing-value-with-session/ 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"; Link to comment https://forums.phpfreaks.com/topic/21424-passing-value-with-session/#findComment-95409 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.