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.

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>
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.

Comments

Your Answer

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.