html page:
<form class="form-signin" role="form" id="form1" action="post_user.php">
<label class="">Name</label>
<input type="text" class="form-control" placeholder="Your Name" value="" required name="yname" id="yname" autofocus ><br/>
<label class="">Email</label>
<input type="text" class="form-control" name="email" id="email" placeholder="Email address" required > <br/>
<label class="">Telephone Number</label>
<input type="text" class="form-control" pattern="\d+" placeholder="Telephone" name="telephone" required><br/>
<div class="col-md-4 col-md-offset-4">
<button class="btn btn-lg btn-primary btn-block" type="submit">Submit Ad</button>
</div>
</form>
post_user.php page:
<?php
$con = mysql_connect("localhost","root","");
if(!$con){
die('Could not connect:'.mysql_error());
}
mysql_select_db("biz",$con);
$mail=$_POST['email'];
$query = mysql_query("SELECT yname,mail,tp FROM reg WHERE mail = '".$mail."' ");
while($row = mysql_fetch_object($query)){
?>
Name: <?php echo $row->yname ?>
Mail: <?php echo $row->mail ?>
Telephone: <?php echo $row->tp ?>
<?php
}
mysql_close($con);
?>
You can replace "Name: " or "Mail" or "Tel. Number" in input type or else ... Like u want