I am using following code.
1) When one of fields with required attribute is not filled up And we try to submit form, It is showing that certain empty field is required and stops further proceeding till fill up that field.
BUT
2) When all fields are filled up,Submit button doesn't work and Form is NOT getting submitted.
On clicking Submit button, Nothing happens...
===============================================================
CODE Before HTML Coding :
<?php
include("db.php"); // contains start_session()...
if($_POST['action']=="registration"){
$all_columns[]="country";
$all_columns[]="state";
$all_columns[]="city";
$all_values[]=addslashes($_POST["country"]);
$all_values[]=addslashes($_POST["state"]);
$all_values[]=addslashes($_POST["city"]);
.....
//remaining code to insert data in mysql database.....
}
?>
FORM
<form name="myForm" id="myForm" method="post" action="" enctype="multipart/form-data">
<input type="hidden" name="action" value="registration" />
<input type="text" name="country" value="" required/>
<input type="text" name="state" value="" required/>
<input type="text" name="city" value="" required/>
<input type="submit" value="SUBMIT FORM" id="register" name="register" class="link-button-blue">
</form>
Error Log in cpanel showing : Undefined index: action in /home/username/public_html/.... on line 4