[thelist] Include function in CODE doesn't work (blank output)

kasimir-k kasimir.k.lists at gmail.com
Sat Feb 14 03:52:49 CST 2009

HP Thniah scribeva in 2009-02-12 13:07:
> I have an issue with running this PHP script on PHP Triad ver 2.2.
> The issue is that the following sub-code (using INVOLVE function) below
> produces a blank output.
> if($rec=mysql_fetch_array(mysql_query("SELECT * FROM cus_info WHERE
> login='$userid' AND password = '$password'")))
> {
> if(($rec['userid']==$userid)&&($rec['password']==$password))
> {  include("include/newsession.php");
>          echo "<p class=data> <center>Successfully,Logged in<br><br><a
> href='logout.php'> Log OUT </a><br><br><a href=welcome.php>Click here if
> your browser
> is not redirecting automatically or you don't want to
> wait.</a><br></center>";

If there's no output, then the conditions aren't met - that is either 
mysql_fetch_array returns no rows or $userid and $password don't match.

One funny thing I noticed here. First you have:
SELECT * FROM cus_info WHERE login='$userid' AND password = '$password'
and then

So do you store the username in two columns (login and userid) or do you 
have an error in one of the two lines?


More information about the thelist mailing list