我有一個問題,從cookie中存儲數據到html值字段。我用PHP生成html。PHP存儲變量到html值字段
代碼:
$cookieName = $_COOKIE["username"];
$cookiePass = $_COOKIE["password"];
if(isset($_COOKIE['username']) && isset($_COOKIE['password'])){
echo "<input type='text' name='name' value='echo $cookieName'>";
echo "<input type='password' name='pass' value= 'echo $cookiePass'>";
}else{
echo "<input type='text' name='name'>";
echo "<input type='password' name='pass'>";
}
這些撇號正確嗎? – ragatskynet
那麼?有什麼問題? –