help customize triggers for insert or update record
Hello im trying to do an insert to the database and i would like it to be inserted if a form field has a specific value example i have a drop down list with 2 options confirmed = 1 and unconfirmed = 0, what i need is that when i press the submit button it checks on the triggers if the field that has the drop down is checked with 1 then do the insert if not then skip that insert to the database; a normal trigger would be like this
if ((((isset($_POST["confirmado"]))?$_POST["confirmado"]:"") != "")) // Trigger
or
if (isset($_POST["btn_Update1"])) // Trigger
i try to make my own triggers like this
if ((isset($_POST["btn_Update1"])) && ($_POST["confirmed"]== 1)) // Trigger
{
When i add my own trigger it doesnt insert into the database unless i place the code like this other
if ((isset($_POST["btn_Update1"])) && ($_POST["confirmed"]= 1)) // Trigger
{
But this way it never checks the value of the post variable and always insert no matter what option i have selected, can any one point me the correct direction on how i can archive this goal
Thanks in advance
Sades