I have a form
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
the form has multipe input type text and 1 dropdown menu.
I also have a submit button called (submit1)
<input class="submit-button" type="submit" name="submit1" value="UPDATE MY INFORMATION" />
My PHP read like this :
if (isset($_POST['submit1']))
{ .... }
If I press the button, it works, no problem.
BUT I also want to submit the form from the dropdown menu change... so it can be executed by both the press of the button OR the change in dropdown... so I have the following for my dropdown
<select name="country" onchange="this.form.submit()">
when I select my dropdown, the page refreshed, but the code in my PHP is not executed... I figured it has to do with the name of $_POST['submit1']...
How can I change onchange="this.form.submit() for it to execute the code in if(isset($_POST['submit1']))...
Thank you