Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<?php
$host="localhost";
$srv_username="root";
$srv_password="";
$db_name="users";
$tbl_name="users";
mysql_connect("$host", "$srv_username", "$srv_password")
or die ("cannot connect".mysql_error);
mysql_select_db("$db_name")
or die ("cannot select DB".mysql_error);
$username=$_POST['username'];
$password=$_POST['password'];
$sql="SELECT*FROM $tbl_name WHERE username='$username' and password='$password' ";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1){
session_register("username");
session_register("password");
header("location:index.php");
}
else {
echo "Wrong Username or Password";
}
?>
<?
session_start();
if(!session_is_registered(username)){
header("location:login.php");
}
?>
<?
if ( $level == 1 )
{
header("locatoin: LINK.php"); //MOJE TAKA ILI
echo "<meta http-equiv=\"Refresh\" content=\"1; URL=LINK\"/>"; //TAKA
echo "Zdravej Potrebitel"; //Primerno
}
if ( $level == 2 )
{
header("locatoin: LINK.php"); //MOJE TAKA ILI
echo "<meta http-equiv=\"Refresh\" content=\"1; URL=LINK\"/>"; //TAKA
echo "zdravej moderator"; //Primerno
}
if ( $level == 3 )
{
header("locatoin: LINK.php"); //MOJE TAKA ILI
echo "<meta http-equiv=\"Refresh\" content=\"1; URL=LINK\"/>"; //TAKA
echo "Zdravej Admin"; //Primerno
}
?>