encrypt text

we use md5 method in php to ecript text.

$text = "something";
$enc_text= md5($text);

echo "ecript text": $enc_text;

login

session_start();

include db_conn.php";

if (isset($_POST['Login'])){
$sql_login = "select * from login where no_id = '$_POST[no_id]' and pass = '$_POST[password]'";
$res_login = mysql_query($sql_login);
$row_login = mysql_fetch_array($res_login);
}
if ($row_login) {
$_SESSION['no_ic'] = $_POST['no_ic'];
header("location:home.php");
exit();
}
else{
echo "No user found";
}

simple php tutorial

for loop

for loop is to run your script in many times

example

for ($i=0;$i<10;$i++){
echo $i;

}

//the output will be like this
0123456789