FT3 Posted August 16, 2011 Report Share Posted August 16, 2011 <?php if (isset($_SESSION['wPassword']) && isset($_SESSION['wUsername'])) {$login="yes";} else {$login="no";} if($_GET['logout'] == "yes") {session_destroy();header('Location: .');} if($_POST['login'] ) {header('Location: .');} $result = mysql_query("SELECT * FROM `members` WHERE `id` = '$_SESSION[wID]'"); if (mysql_num_rows($result)==1) { $res = mysql_fetch_object($result); $w_username = $res->username; $w_email = $res->email; $w_coins = $res->coins; $w_id = $_SESSION[wID]; $_SESSION[wEmail] = $res->email; $_SESSION[wCoins] = $res->coins; $_SESSION[wLevel] = $res->level; } echo $w_username; ?> izmet šadu kļudu , kur vaina ? Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\traffic2\inc\user.php on line 10 Quote Link to comment Share on other sites More sharing options...
FT3 Posted August 16, 2011 Author Report Share Posted August 16, 2011 atrisinats vaina bija login forma :D Quote Link to comment Share on other sites More sharing options...
sandis_m Posted August 16, 2011 Report Share Posted August 16, 2011 Pie katras šādas kļūdas aizmirsti, ka eksistē šis forums. Labāk 7-reiz pārbaudi un tad izdari secinājumus, nevis 1-reiz pārbaudi un 7-reiz brīnies, kas par vainu. :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.