This topic is locked

Before record added help

9/11/2023 3:26:53 PM
PHPRunner General questions
F
francesco author

I need to make this control before a record is added, it works good but I have a blank page after the condition is verified and I want to show add page again.
Also I'd like to show an error message on top of add page. Can you help me?
$com1=$values["commessa"]; $cod1=$values["codice"]; if (!empty($cod1) && empty($com1)) { exit(); } return true;

francesco 9/11/2023

I solved first question with this:
`$com1=$values["commessa"];
$cod1=$values["codice"];

if (!empty($cod1) && empty($com1))
{
header("Location: orario_add.php");
exit();

}
return true;`Now I need help showing a message like this:
img alt