我为我的用户编写了一个更新HTML表单和一个PHP脚本,它很有效。现在我想让表格记住已经填写的内容。
HTML表单:
我尝试过的:
<td><label>Email:</label></td>
<td><input type="email" name="email" placeholder="email()"></td>
PHP脚本:
include_once './controler/connect.php';
session_start();
function email()
{
$username=$_SESSION["user"];
$sql = "SELECT email FROM `users` WHERE user='$username' ";
$query = mysqli_query(con(), $sql);
$row=mysqli_fetch_assoc($query);
return $row["email"];
}
echo
用户在input
内的value="<?php echo 'whatever' ?>"
中发送电子邮件。假设你有比你发布的更多的内容。