|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Login
I am compleatly lost here thought I was going in the right direction now I am all lost. Can someone please help me with this code. I want people to log in before posting any news or uploading files to the dtabase so I can track them.
Here is the code. <? // Log into the database and check the user and password $db=mysql_connect ("localhost", "Login", "pass") or die ('I cannot connect to the database.'); mysql_select_db ("forums"); $result = mysql_query("SELECT * FROM ibf_members WHERE LOWER (name) = '$FUser' and password = '$FPassword'"); $x=0; $qry = "SELECT * FROM ibf_members"; //$result = mysql_num_rows($qry); $result = mysql_query($qry); $num_rows = mysql_num_rows($result); print $num_rows; if (!$result) { $x="if (!$result)"; } if ($num_rows = mysql_num_rows($result)>0) { $x="Long if"; } else { $x="else"; } echo $x; echo $number; ?> I would also like to set a cookie. The problem is I am trying to log into an existing database and they have a cookie already set from their login. Any sugestions or help is apreciated! |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Login |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|