0

I have a form with some fields like text , select etc. I need to set the variable using php. I have some values in the session which is to be put in the text field.

asked Jan 11, 2012 at 5:40
0

2 Answers 2

3

you can put like this,

<input type="text" value="<?php echo $SESSION['variable_name'];?>" />
<textarea><?php echo $SESSION['variable_name'];?></textarea>
answered Jan 11, 2012 at 5:45
Sign up to request clarification or add additional context in comments.

1 Comment

exactly what I wanted. Thanks! :D
0

You don't say where your variables come from, but if you need to move them from one page to another, you will have to use session_start(); at the beginning of each php page.

sjngm
13k16 gold badges90 silver badges118 bronze badges
answered Jan 11, 2012 at 5:55

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.