I'm trying to output some text stored in a variable in my HTML file
<span class="error">*<?php echo $piIdError;?></span>
I have declared and initialized the variable already along with the rest of some other php code that works
if (empty($_POST['piId']))
{
$piIdError = "Pi Id is Required";
}
else
{
$id = $_POST['piId'];
}
but when I run the file I get this error:
Notice: Undefined variable: piIdError in C:\xampp\htdocs\piWebConfig\index.php on line 86
Anyone have any ideas to what might be happening?
Thanks