PHP Status show help
#7

I now got this:
PHP код:
<? 
session_start
();
if(!
session_is_registered(Name)){
header("location:Accounts.php");
}
?>

<html>
<body>
<?php
$host
="Censored"// Host name 
$username="Censored"// Mysql username 
$password="Censored"// Mysql password 
$db_name="Censored"// Database name 
$tbl_name="Censored"// Table name

// Connect to server and select databse.
mysql_connect("$host""$username""$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");
// username and password sent from form 
$myusername=$_POST['myusername']; 
$mypassword=$_POST['mypassword'];

$sqlsprintf("SELECT Name, Password FROM $tbl_name WHERE Name ='$myusername'");
$result=mysql_query($sql);
while (
$row mysql_fetch_assoc($result))
{
    echo 
$row['Name'];
    echo 
$row['Password'];
}
?>

</body>
</html>
I found out that the thingy $myusername doesnt get the value from the login form so it doesnt query it with the right name...
Anyone have an idea why?
Reply


Messages In This Thread
PHP Status show help - by thimo - 27.01.2012, 17:37
Re: PHP Status show help - by Bumbis - 27.01.2012, 17:42
Re: PHP Status show help - by thimo - 27.01.2012, 17:44
Re: PHP Status show help - by royal_king - 27.01.2012, 18:10
Re: PHP Status show help - by thimo - 27.01.2012, 19:15
Re: PHP Status show help - by Sinner - 28.01.2012, 09:39
Re: PHP Status show help - by thimo - 28.01.2012, 16:21
Re: PHP Status show help - by Sinner - 28.01.2012, 18:23
Re: PHP Status show help - by thimo - 28.01.2012, 18:24
Re: PHP Status show help - by Sinner - 28.01.2012, 18:26

Forum Jump:


Users browsing this thread: 1 Guest(s)