ERLEDIGT
JA
JA
ANTWORTEN
1
1
ZUGRIFFE
205
205
EMPFEHLEN
-
Noch ne Frage
wenn ich auf user suchen gehe wird das mti der datei überprüft:
Problem wenn ich jetzt zb test suche bin ich bin test eingeloggt
hilfeeeeee
PHP-Code:<?php
include"inc/config.php";
session_start(); // start the session
if(!isset($_SESSION['user'])){
// check if the user is logged in
// the user is not logged in
header("Location: index.php"); // take him/her to the login page
} else {
// the user is logged in
// the page will go in here, e.g.
}
?>
<?php
include "mysql.php";
$user = addslashes($_POST['usersuche']); // make sure people can't hack the db by entering '" MySQL QUERY HERE as the username
$userrow = mysql_query("SELECT * FROM `userdb` WHERE `username` = '" . $_POST['usersuche'] . "';",$mysql);
if(mysql_num_rows($userrow) != "1"){
// no rows found, wrong password or username
Header("Location: error.php?user=$user");
} else {
// 1 row found exactly, we have the user!
header("Location: viewprofile.php?name=$user");
}
?>Geändert von maarian (27.01.07 um 12:43 Uhr)
-
Also bis hier sehe ich keinen Fehler. Ich denke du findest ihn eher in
viewprofile.php?name=$userGebe keine Hilfe per PN, Mail, Instant Messenger etc.
und keine Copy&Paste-Lösungen - ein bisschen selbst nachdenken sollte drin sein. Konstruktivismus 4tw!
MfG, Zod
__________________
rpd Framework: Rapid Web-Engineering in PHP (Manual | Google Code)
Ähnliche Themen
-
pop up im IE7 ohne location usw.
Von mdd im Forum Javascript & AjaxAntworten: 2Letzter Beitrag: 28.10.07, 05:39 -
location.href mit as?
Von mewX im Forum Flash PlattformAntworten: 2Letzter Beitrag: 13.05.07, 17:47 -
location.replace() am Mac IE 5.1
Von Mogler im Forum Javascript & AjaxAntworten: 2Letzter Beitrag: 25.05.04, 12:06 -
location.href in php
Von Zisenmann im Forum PHPAntworten: 15Letzter Beitrag: 11.12.03, 16:50 -
Header Location ?
Von DarkSummer im Forum PHPAntworten: 6Letzter Beitrag: 06.03.02, 10:33





Zitieren
Login






[PHP][Snippet] Array zu XML konvertieren