Hi all, i want to fetch one form value index1.html to another index1.php ,i dont know how to retrive result of checkbox,dropdown,radio button and file ,which we selected . Help me ,here is my code.Thanks
index1.html
<html>
<head>
<title>index</title>
</head>
<body>
<form name="index" method="post" action="index1.php" align="center">
<fieldset>
<legend>Growmore computer science</legend>
<table align="center" border="1px solid">
<tr>
<td>Employee name </td>
<td><input type="text" name="emp_name" /></td>
</tr>
<tr>
<td>address</td>
<td>
<textarea name="txt">
</textarea>
</td>
</tr>
<tr>
<td>Department</td>
<td>
<select name="dept">
<option value="IT">IT</option>
<option value="CE">CE</option>
</select>
</td>
</tr>
<tr>
<td>Designation</td>
<td>
<select name="desg">
<option value="Assistant Professior">Assistant Professior</option>
<option value="Senior Professior">Senior Professior</option>
</select>
</td>
</tr>
<tr>
<td>Male/Female</td>
<td>
<input type="radio" name="sex" value="male">Male<br/>
<input type="radio" name="sex" value="female">female
</td>
</tr>
<tr>
<td>Favopurite Subject</td>
<td>
<input type="checkbox" name="sub" value="A">A<br/>
<input type="checkbox" name="sub" value="B">B<br/>
<input type="checkbox" name="sub" value="C">C<br/>
<input type="checkbox" name="sub" value="D">D<br/>
<input type="checkbox" name="sub" value="E">E<br/>
<input type="checkbox" name="sub" value="F">F<br/>
</td>
</tr>
<tr>
<td>Contact No </td>
<td><input type="text" name="cnt" /></td>
</tr>
<tr>
<td>Enter Your Email </td>
<td><input type="email" name="email" /></td>
</tr>
<tr>
<td>Enter Your Password </td>
<td><input type="password" name="password"/></td>
</tr>
<tr>
<td>Enter Your Email </td>
<td><input type="file" name="file" /></td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="save" name="submit" /></td>
</tr>
</table>
</fieldset>
</form>
</body>
</html>
index1.php
<?php
error_reporting(1);?>
<html>
<head>
<title>index</title>
</head>
<body>
<form name="index" method="post" align="center">
<fieldset>
<legend>Growmore computer science</legend>
<table align="center" border="1px solid">
<tr>
<td>Employee name </td>
<td><input type="text" value="<?php echo $POST['emp_name'];?>" readonly/></td>
</tr>
<tr>
<td>address</td>
<td>
<textarea readonly>
<?php echo $POST['txt'];?>
</textarea>
</td>
</tr>
<tr>
<td>Department</td>
<td>
<select name="dept" readonly="" >
<option value="<?php echo $POST['dept'];?>"><?php echo $POST['dept']?></option>
</select>
</td>
</tr>
<tr>
<td>Designation</td>
<td>
<select name="desg" readonly="">
<option value="<?php echo $POST['desg'];?>"><?php echo $POST['desg'];?></option>
</select>
</td>
</tr>
<tr>
<td>Male/Female</td>
<td>
<?php $sex=$POST['sex'];
echo $sex;
?>
</td>
</tr>
<tr>
<td>Favopurite Subject</td>
<td>
<input type="checkbox" name="sub" value="A">A<br/>
<input type="checkbox" name="sub" value="B">B<br/>
<input type="checkbox" name="sub" value="C">C<br/>
<input type="checkbox" name="sub" value="D">D<br/>
<input type="checkbox" name="sub" value="E">E<br/>
<input type="checkbox" name="sub" value="F">F<br/>
</td>
</tr>
<tr>
<td>Contact No </td>
<td><input type="text" value="<?php echo $POST['cnt'];?>" readonly/></td>
</tr>
<tr>
<td>Enter Your Email </td>
<td><input type="email" value="<?php echo $POST['email'];?>" readonly/></td>
</tr>
<tr>
<td>Enter Your Password </td>
<td><input type="password" value="<?php echo $POST['password'];?>" readonly/></td>
</tr>
<tr>
<td>Enter Your Email </td>
<td><input type="file" /></td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="save" name="submit" /></td>
</tr>
</table>
</fieldset>
</form>
</body>
</html>