Jump to content
php.lv forumi

mysql_num_rows()


FT3

Recommended Posts

<?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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...