Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
<?php
session_start ();
$connectionid = mysql_connect ("localhost", "shinobi-no-kage", "***");
if(!mysql_select_db ("LoginSystem", $connectionid))
{
die ("Keine Verbindung zur datenbank");
}
$sql = "SELECT".
"id, name".
"FROM".
"snk_user".
"WHERE".
"(name LIKE '".$_REQUEST["name"]."') AND".
"(pw = '".$_REQUEST["pw"]."')";
$result = mysql_query ($sql);
if(mysql_num_rows ($result) > 0)
{
$data = mysql_fetch_array ($result);
$_SESSION["user_id"] = $data["id"];
$_SESSION["user_name"] = $data["name"];
header ("Location: intern.php");
}
else
{
header ("Location: login.form.php?fehler=1");
}
?>
?php
session_start ();
$connectionid = mysql_connect ("localhost", "shinobi-no-kage", "pw");
if(!mysql_select_db ("shinobi-no-kage", $connectionid))
{
header ("Location: sorry.php");
}
$sql = "SELECT
id,
name
FROM
snk_user
WHERE
(name LIKE '".$_REQUEST["name"]."') AND.
(pw = '".$_REQUEST["pw"]."')";
$result = mysql_query ($sql);
if(mysql_num_rows ($result) > 0)
{
$data = mysql_fetch_array ($result);
$_SESSION["user_id"] = $data["id"];
$_SESSION["user_name"] = $data["name"];
header ("Location: intern.php");
}
else
{
header ("Location: login.form.php?fehler=1");
}
?>
kommen. Ich weiss nicht, was ich bei der ersten machen soll und der header müsste doch eigentlich richtig sein oder??!Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /users/shinobi-no-kage/www/login.php on line 23
Warning: Cannot modify header information - headers already sent by (output started at /users/shinobi-no-kage/www/login.php:23) in /users/shinobi-no-kage/www/login.php on line 36