tags:

views:

25

answers:

3

Hi Everyone

I am editing a page and there i am asking again username and password for confirmation.. I want to pick username from session variable

$_SESSION['employee']['password']=$row['Password'];

and want that username displayed there(i am setting username box value=session username variable) but not for editing only password is asked with value blank..

HOw i disable editing of any textbox like when we choose settings in orkut ...

I am trying this thing

<td><b><i>Username</i></b></td>
<td><input type="text" id="username" value="<?php $_SESSION['employee']['password'] ?>"></td>
</tr>

But by doing this my username textbox again coming blank.It is not filled with username i think the syntex i am using wrong...

value="<?php $_SESSION['employee']['password'] ?>"

How i can correct it..

+1  A: 

use <?=$SOMETHING?> or <?php echo($SOMETHING); ?>.

Notinlist
And use htmlspecialchars() on your text: http://hu.php.net/manual/en/function.htmlspecialchars.php
Notinlist
A: 

Try this:

<input type="text" id="username" value="<?php echo $_SESSION['employee']['password']; ?>" disabled="disabled" />
Sarfraz
can i send disabled text box value to the next page like simple text boxes through post or get .For example value="<?php echo $_SESSION['employee']['password']; ?>" disabled="disabled" How i will send this value to next page.In simple it is not occuring
Deepak Narwal
A: 

you need to print or echo the session variable.

Ross