Jump to content
php.lv forumi

Errors


reGative

Recommended Posts

validators protams ka nebljaustaas, bet ja njem dziljak tad XML standarta izmanto dubultpedinajs, attieciigi

XHTML jadara tapat ..

Beidz musināt cilvēkus. Var lietot gan vienas, gan otras pēdiņas.

 

http://www.w3schools.com/Xml/xml_attributes.asp

XML Attributes Must be Quoted

 

Attribute values must always be quoted. Either single or double quotes can be used. For a person's sex, the person element can be written like this:

<person sex="female">

 

or like this:

<person sex='female'>

Link to comment
Share on other sites

Sveiki atkal!

 

Nezkāpēc neizdodas vairs ielogoties. Viss it kā ir pareizi, pat redirects notiek. Bet nezkāpēc vairs neielogojas. Kas par vainu

 

login.php

<?php
session_start();
ob_start();
include('Blurry_Include/include.php');
$result = mysql_query("SELECT * FROM blurry_settings");
while($row = mysql_fetch_array($result))
 {
 include('languages/'.$row['SiteLang'].'/general.php');
 $page = LOGIN;
include('styles/'.$row['SiteTheme'].'/header.php');
}
echo '<h2>'. LOGIN .'</h2>';
echo "<form action='login.php?reason=login' method='post'>"
.NICK ."<br /><input type='text' name='nick' /><br />"
.PASSWORD ."<br /><input type='password' name='pass' /><br />
<input type='submit' value='OK!' /><br />
<a href='register.php'>" . REGISTER . "</a>
</form>"; 
if(isSet($_GET['reason']) and $_GET['reason'] == 'logout')
{
mysql_query('UPDATE blurry_users SET user_online = "N" WHERE id =' . $_SESSION['id']);
session_destroy();
header('Location: index.php');
}
if(isSet($_GET['reason']) and $_GET['reason'] == 'login')
{


if(!isSet($_POST['nick']) and !isSet($_POST['pass']))
{
$nick = htmlSpecialChars($_POST['nick']);
$pass = htmlSpecialChars($_POST['pass']);

$nick_validate = 'SELECT * FROM blurry_users WHERE user_nick="' . mysql_real_escape_string($nick) . '"';
$final = mysql_query($nick_validate);
$pass_validate = 'SELECT * FROM blurry_users WHERE user_pass="' . mysql_real_escape_string(sha1($pass)) . '"';
$final2 = mysql_query($pass_validate);

if(mysql_num_rows($final) != $nick) {

  echo '<div id="error"><b>'.LOGIN_ERROR.'</b></div>';
}

if(mysql_num_rows($final2) != $pass)
{
echo '<div id="error"><b>'.LOGIN_ERROR.'</b></div>';
}}
else {
$fetch = mysql_query('SELECT id FROM blurry_users WHERE user_nick = "' . mysql_real_escape_string($_POST['nick']));
while($row = mysql_fetch_array($fetch))
{
$id = $row['id'];
}
$_SESSION['id'] = $id;
mysql_query('UPDATE blurry_users SET user_online = "Y" WHERE id = "'.$_SESSION['id']);

}header('Location: index.php');
 }
$result = mysql_query("SELECT * FROM blurry_settings");
while($row = mysql_fetch_array($result))
 {
include('styles/'.$row['SiteTheme'].'/footer.php');
}
ob_flush();
?>

Link to comment
Share on other sites

  • 1 month later...

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...