I want to protect my action page so that whenever user or hacker directly hits www.something.com/process.php That should not have any effect .Please help me securing the process.php page when user directly hits from browser address bar .
I have following code in index.html
<form method="post" action="process.php">
Name:<input type="text" name="txtname"><br/>
Age :<input type="text" name="age"><br/>
<input type="submit" value="submit">
</form>
I have following in process.php
<?php
//connection code to connect and use database...
$name=mysql_real_escape_string($_POST['txtname']);
$age=mysql_real_escape_string($_POST['age']);
$sql="insert into table values('$name','$age')";
$result=mysql_query($sql);
?>