And when you post code, show it within code or php tags, as detailed in the Posting Guidelines at the top of this forum!
Ronald :cool:
this is my php code for registering a user with a password.
<?php
//replace username and password with your mysql name and password
$conn = mysql_connect("localhost","root","mobileproject") or die("Connection Error");
//select the database
$db = mysql_select_db("test")or die("Connection Error");
session_start();
$_SESSION['username'] = $_POST['username'];
echo $_SESSION['username'];
$password = md5($_POST['password']);
$email = $_POST["email"];
//insert the values
$result= MYSQL_QUERY("INSERT INTO users (username, password)".
"VALUES ('{$_SESSION['username']}', '$password')");
$temp_table=mysql_query("create table {$_SESSION['username']}(name varchar(30) not null,source varchar(30),destn varchar(30),flight varchar(10),seat int);")or die("creation error");
$temp_value=mysql_query("insert into {$_SESSION['username']}(name,source,destn,flight,seat)values('{$_SESSION['username']}','0','0','0','0')")or die("Insertion Error");
echo "Your name and password have been submitted into our database :)";
echo "<br/>";
echo "<a href=login.php>Back to Login</a>"
?>
now my objective is to set the time to live for the script. suppose if i am going to set 10 minutes for the script, the script should expire after 10 minutes and have to reload again? what will be solution to this?