Ajit N

Ajit N

  • 1.3k
  • 352
  • 68.2k

How to display session value in textbox ?

Oct 22 2019 2:39 AM
Hello, I want to display session value in text box ,i tried some code but i didn't get output.
Here is my code....
  1. <?php  
  2.   
  3. session_start();  
  4. $pname=$_SESSION["pname"];  
  5. $rs=$_SESSION["rs"];  
  6.   
  7.     if($_SESSION["pname"]==TRUE){     
  8.       
  9. else  
  10.     {  
  11.           
  12.     }  
  13. ?>  
 and the HTML code
  1. <input type="text" class="form-control" name="name" placeholder="" required="" value="<?php echo $pname?>">  
 and i got this below output...
 
 
So help me how can i solve this ? 

Answers (4)