<?php
require ("../Application.php");//session_start(); included in this file
//init();
?>
<?php
$_SESSION['message']='';
echo $_SESSION['key'].":".isset($_POST['submit']).":".$_POST['key'];
if(isset($_POST['submit']) && ($_SESSION['key'] == $_POST['key'])){
submit();
}
function submit(){
echo "submitted";
}
?>
<?php include("includes/headers.php");?>
<div class="main">
<h1>Employee Details</h1>
<div class="message"><?=$_SESSION['message'];?></div>
<form name="adduser" action="add.php" method="POST">
<div class="fileds">
<div><label for="code">Employe code<i>(6 digit)</i></label></div> <input type="text" name="code" maxlength="6" id="code" />
</div>
<div class="fileds">
<div><label for="fname">First Name</label></div> <input type="text" name="fname" />
</div>
<div class="fileds">
<div><label for="mname">Middle Name</label></div> <input type="text" name="mname" />
</div>
<div class="fileds">
<div><label for="lname">Last Name</label></div> <input type="text" name="lname" />
<div><label for="father_name">Father's Name</label></div> <input type="text" name="father_name" />
<div class="fileds">
Status: <select name="status" >
<option value="1">Active</option>
<option value="0">Inactive</option>
</select>
</div>
<?php
$key=md5(rand(0,9999999));
$_SESSION['key']=$key;
//echo "<br>".$_SESSION['key'];
?>
<input type="hidden" name="key" value="<?=$key?>" />
<br><br>
<input type="submit" name="submit" value="Save" > <input type="reset" name="clear all" value="clear all" />
</div>
</form>
</div>
<?php include("includes/footer.php");?>
Formu göndererek değil, ne oldu bilmiyorum. Şimdi daha önce çalışan ama oldu ..: (
any please check this, where am wrong???? Edit