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 t
Solution 1:
if (preg_match($snregex, $sn, $matches)) {
<command>
} else {
//echo "Invalid SN. Please re-enter!";
}
try commenting the echo and check if the text is still there.
if not, every time the else loop gets executed and prints the statement.
solution:
if(isset($_POST['submit']) && (preg_match($snregex, $sn, $matches))
{
<command>
} else {
echo"Invalid SN. Please re-enter!";
}
Solution 2:
Is it printing out from a session or post var that's not getting cleared ? is the input field something like
input value="<?phpif(isset($_POST['serial_number'])){echo S_POST['serial_number'];}?>"
Post a Comment for "Php Clear Text Printed To Webpage"