[PHP & MySQL] Was stimmt nicht l PHP

uuhna
ich wollte in Log-In Script machen, aber immer, wenn ich dann auf LogIn klicke kommt irgendein error.
Ich gebe euch mal den Link zum Verzcihnis, wo die daten drinnen sind.

LiNk

Hoffe es kann mir jemand helfen...
Black Katrin
diese codes... einfach der hammer Freude wie haste die den gemacht?
uuhna
gar nicht
unis vrh kalender
wearum??
kannste nir nich helfen
lg
Maina
Zitat:
Original von Kleene-Anna
gar nicht
unis vrh kalender
wearum??
kannste nir nich helfen
lg


+seufz+ Wir brauchen die Codes der Seiten, um dir helfen zu können.
uuhna
ok
checkuser.php
code:
1:
2:
3:
4:
<?if($uname=="")
{
header ("location: login.html");
}?>


intern.php
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
<? 
@session_start();
$uname = $_SESSION["user_name"];
$job = $_SESSION["user_job"];
include "checkuser.php";
?>
<html>
<head>
<TITLE></TITLE>
<body>
Willkommen im Internbereich, <? echo $uname;?><br>
Du bist <? echo $job;?>.
</body>
</head>
</html>


logform.php
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
<? 
$pw=$HTTP_POST_VARS['pw'];
$uname=$HTTP_POST_VARS['uname'];

if($yes=="1")
{
session_start (); 
$_SESSION["user_name"] =$uname;
$_SESSION["user_job"] =$job;
header("location: intern.php");
}
?>

if($uname=="Anna" and $pw =="Robust"){
$yes ="1";
$job = "Beruf";
}

login.html
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
<html>
<head>
<TITLE>
</TITLE>

</head>
<body>
<form action="logform.php" method="post"> 
<p align="center"><br>

Username: <input type="text" size="23" name="uname" style="font-family: Verdana; font-size: 12px; border-style: solid; border-width: 1"> 
<br><br>
Passwort: <input type="password" size="23" name="pw" style="font-family: Verdana; font-size: 12px; border-style: solid; border-width: 1"> 
<br><br>
<input type="submit" value="LogIn"> 

</form>
  </body>
</html>
Maina
logform.php
php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:

<? 
$pw=$HTTP_POST_VARS['pw'];
$uname=$HTTP_POST_VARS['uname'];

if($uname=="Anna" and $pw =="Robust"){
$yes ="1";
$job = "Beruf";

if($yes=="1")
{
session_start (); 
$_SESSION["user_name"] =$uname;
$_SESSION["user_job"] =$job;
header("location: intern.php");
}
?>



Probiers mal so.
uuhna
geht immer noch nicht

Zitat:
Parse error: syntax error, unexpected $end in /var/www/users/gutlerchental/scripts/logform.php on line 19
uuhna
weißt du auch wo??

lg
Maina
php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
<? 
$pw=$HTTP_POST_VARS['pw'];
$uname=$HTTP_POST_VARS['uname'];

if($uname=="Anna" and $pw =="Robust"){
$yes ="1";
$job = "Beruf";

}

if($yes=="1")
{
session_start (); 
$_SESSION["user_name"] =$uname;
$_SESSION["user_job"] =$job;
header("location: intern.php");
}
?>


Da - glaub ich.
uuhna
geht immer noch nicht
SaraliebtPferde
weiß nich qenau, aber vielleicht so?


php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
<? 
$pw=$HTTP_POST_VARS['pw'];
$uname=$HTTP_POST_VARS['uname'];

if($uname=="Anna" and $pw =="Robust"){
$yes ="1";
$job == "Beruf";

if($yes=="1")
{
session_start (); 
$_SESSION["user_name"] =$uname;
$_SESSION["user_job"] =$job;
header("location: intern.php");
}
?>




SaraliebtPferde
hast recht modred.. ich lass das php helfen lieba +verzieh+
uuhna
logform.php
php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
<? 
$pw=$HTTP_POST_VARS['pw'];
$uname=$HTTP_POST_VARS['uname'];

if($uname=="Anna" and $pw =="Robust"){
$yes ="1";
$job = "Beruf";

}

if($yes=="1")
{
session_start (); 
$_SESSION["user_name"] =$uname;
$_SESSION["user_job"] =$job;
header("location: intern.php");
}
?>