nerya 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?? Quote Link to comment 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'>"; ?> Quote Link to comment Share on other sites More sharing options...
nerya 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
nerya 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 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.