php clear text printed to webpage
问题 I have a html/php script which prints a text string directly to the page. However when I refresh the page that text is still there. I've googled this and check this forum too and tried various suggestions e.g. <input autocomplete="off"> and <body onload="document.FormName.reset();"> etc. None of them work. The php code that prints the string is (if regex matches serial number then execute command else print error string): if (preg_match($snregex, $sn, $matches)) { <command> } else { echo