HTML NEW_PASSWORD:PHP:甚至仍在工作,如果不isset
<input name="new_password" type="password" maxlength="25" id="new_password" class="ModuleTextbox" onkeyup="var regex = new RegExp(/^.*(?=.{6,})(?=.*\d)(?=.*[[email protected]!¤&/()_?,.-]).*$/m); if(regex.test(this.value)) { pwok.style.visibility = 'visible'; } else { pwok.style.visibility = 'hidden'; }" style="width:200px;" /> <img id="pwok" src="ok.png"
alt="R" style="visibility: hidden;" />
PHP提交表單後:
foreach($_POST as $key => $value) {
$data[$key] = filter($value);
}
$pw_new = $data["new_password"];
if(isset($pw_new)) {
echo "LOL";
}
即使我沒有寫在場上任何事情,它呼應的大聲笑,爲什麼?
您還應該發佈'filter'函數的代碼。 – Sarfraz 2010-09-04 20:17:00