简体   繁体   中英

how to show entered data in the form when the form is submitted using php

I want to show the email in the email text input using this code but this code is not working when login is failed.

value= "if(isset($_POST['submit'])){ ?PHP echo $_POST[''email]?>";}

You need to enclose PHP code in <?php and ?>

Hence change:

   value= "if(isset($_POST['submit'])){ ?PHP echo $_POST[''email];"}

to

   value= "<?php if(isset($_POST['submit'])) { echo $_POST["email"]; } ?>"

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM