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.
you can put like this,
<input type="text" value="<?php echo $SESSION['variable_name'];?>" />
<textarea><?php echo $SESSION['variable_name'];?></textarea>
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.