Your Coding is wrong also.
<?php
//echo '<p>=Data Detail=</p>';
//echo '<p>Name: '.$_POST['box1'].'</p>';
//echo '<p>ID: '.$_POST['box2'].'</p>';
$user="root";
$pass="sn00ker1";
$db="try";
$name=$_POST['box1'];
$id=$_POST['box2'];
mysql_connect(localhost,$user,$pass)
or die(mysql_error());
@mysql_select_db($db)
or die(mysql_error());
$query = "INSERT INTO tryin VALUES ('$name','$id')";
mysql_query($query);
mysql_close();
?>
try this
<?php
/******************************
* process.php
*
*******************************/
require("config.php"
;
print("<p>Data Detail</p>
<p>Name: '$_POST['box1']</p>
<p>ID: '$_POST['box2']</p>"
;
$name = $_POST['box1'];
$id = $_POST['box2'];
$q = "INSET INTO tryin VALUES ('$name', '$id')";
mysql_query($q);
?>
<?php
/**************************************
* config.php
*
*
***************************************/
$host = '';
$user = '';
$pass = '';
$db = '';
$connect = mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($db, $connect) or die(mysql_error());
?>