yolop Posted July 21, 2008 Share Posted July 21, 2008 I put what cod <?php session_start(); $_SESSION['s']='FF'; echo"<input type='text' name='subject' value='<?php echo $_SESSION['s'];?>' size='40'>"; ?> and I got a error syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in why?? Link to comment https://forums.phpfreaks.com/topic/115810-i-have-a-problem-with-session/ Share on other sites More sharing options...
samshel Posted July 21, 2008 Share Posted July 21, 2008 <?php session_start(); $_SESSION['s']='FF'; echo "<input type='text' name='subject' value='". $_SESSION['s']."' size='40'>"; ?> Link to comment https://forums.phpfreaks.com/topic/115810-i-have-a-problem-with-session/#findComment-595344 Share on other sites More sharing options...
yolop Posted July 21, 2008 Author Share Posted July 21, 2008 <?php session_start(); $_SESSION['s']='FF'; echo "<input type='text' name='subject' value='". $_SESSION['s']."' size='40'>"; ?> OHH thank but I have another one problem is there a security problem to save a password in session? is there a situation that someone can stole or see the session?? thank. Link to comment https://forums.phpfreaks.com/topic/115810-i-have-a-problem-with-session/#findComment-595345 Share on other sites More sharing options...
samshel Posted July 21, 2008 Share Posted July 21, 2008 I dont think so that some one else can see the sesssion contents unless your code compromises it some where... although i would never store a password in session...generally account checking is done using password only once at the start, then you set the session is password is correct. on other pages you can check if session is set, no need to check password thre again.. hth Link to comment https://forums.phpfreaks.com/topic/115810-i-have-a-problem-with-session/#findComment-595346 Share on other sites More sharing options...
yolop Posted July 21, 2008 Author Share Posted July 21, 2008 I dont think so that some one else can see the sesssion contents unless your code compromises it some where... although i would never store a password in session...generally account checking is done using password only once at the start, then you set the session is password is correct. on other pages you can check if session is set, no need to check password thre again.. hth ok thank Link to comment https://forums.phpfreaks.com/topic/115810-i-have-a-problem-with-session/#findComment-595347 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.