<html>
<head>
</head>
<body>
<a href="#" id="filldetails" onfocusout="addFields()"><input type="text" id="member" name="member" value="">Number of members: (max. 10)<br />
Fill Details</a>
<form class="contact-form row" method="post" action="test.php" enctype="multipart/form-data">
<div id="container"></div>
<div class="form-field col-lg-12">
<input class="submit-btn" type="submit" value="Submit" name="submit">
</div>
</form>
</body>
<?php
include('config.php');
$i=0;
if(isset($_POST['submit']))
{
$name = $_POST['member_name'.$i.''];
$sql="INSERT INTO `ssk`.`members` (`member_name`) VALUES ('$name')";
$query=mysql_query($sql,$con);
if($query)
{
echo '<div class="alert alert-success">
<strong>form submitted successfully your member-id is '.$member_id.' </strong>
</div>';?>
<script>
alert('Thank you! Your form has been submitted and is being verified please note-down the member-id.');
</script>
<?php
}else{
echo '<div class="alert alert-success">
<strong>unsuccessful please read the above data and fill the form accordingly.</strong>
</div>';
?>
<script>
alert('ERROR:Request unprocessed');
</script>
<?php
}
}
?>
</html>
What I want is to have a form which accepts the number of fields to be generated after which the user has to fill the generated input fields and the data has to be stored in the database is their any alternate way of doing this using PHP & MYSQL its taking entry of first data bur not working dynamic please help me with this.