![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| wh inode index starts from 1 unlike array index (0) | sairamdevotee | UNIX for Dummies Questions & Answers | 1 | 08-17-2008 04:04 AM |
| why the inode index of file system starts from 1 unlike array index(0) | sairamdevotee | Filesystems, Disks and Memory | 0 | 08-17-2008 03:50 AM |
| Code page in Unix | braindrain | Shell Programming and Scripting | 2 | 07-06-2006 11:18 AM |
| Insert page breaks into .csv file | welsht | Shell Programming and Scripting | 2 | 02-04-2005 02:39 PM |
| Which comand to show the source code on a web page? | fundidor | UNIX for Dummies Questions & Answers | 11 | 01-02-2004 11:56 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hello guys,
Does anyone can help me? I've just made my simple index.php without any code, but after insert session code to check if any user is authenticated, my index.php doesn't work anymore. Any fresh eyes could help me to see what and where the code is wrong? Code:
<?
if ($_POST['entrar']=='Entrar!')
{
@session_start();
$result = mysql_query('select log_nome,senha from usuarios where log_nome="'.trim($nome).'";',$conexao);
if (mysql_num_rows($result)>0)
{
$usuSenha = mysql_result($result,0,senha);
else
{
$usuSenha = 'notuser';
}
if ($result and ($senha==$usuSenha) and ($usuSenha<>'notuser'))
{
@session_register($nome);
echo '<p align="center">';
echo '<font style="Tahoma" size=4>';
echo $nome.'</font><BR>';
echo '<font style="Tahoma" size=2>';
echo 'Você está on-line</font>';
echo '</p>';
}
else
{
echo 'Usuário não autorizado';
}
}
else
{
echo '<form method="post" name="logar" action="">
<font style="Tahoma" size=1>
Nome: <input type="text" name="nome" value="" size="15"><BR>
Senha: <input type="text" name="senha" value="" size="15"><BR>
</font>
<p align="center">
<input onmouseover=this.style.cursor="hand" type="submit"
name="entrar" value="Entrar!" STYLE="border:0; height:18;
width=50; background:#E8F3FD">
</p>
</form>';
}
?>
Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|