any php programmer around

Status
Not open for further replies.

Saharika

In the zone
i have just started php and i have learn many thing from books and may be some web experts help.
i have some problem though
hope it will be solved here ..just have not seen much php discussion here..

problem1)
the user name and password are stored in database table ..the user enter username and password and it is checked against the password and username in tables
now problem is if uname and pass are correct i want user to direct to thier personal profile page...if user can see only his personal profile

how is it done ?

is it making query
select .....from tables where uname=required and pass=" "

or we make separate page for each

are there simple example code in any web site

query 2) does php run in IIS (other than in aphace)
i am unable to make in run in IIS though some books says it can
then how

query 3)
when searching i want to search in certain tables only how it can be done
i want search result from password protected area
how it is done

by the way does phpbb forum run in intranet?any configuration details or intranet or is it same..


thanks for your replies

saha
 

valtea

In the zone
query 2) does php run in IIS (other than in aphace)
i am unable to make in run in IIS though some books says it can then how.

It can run, but you will need the php modules/server for it.

by the way does phpbb forum run in intranet?any configuration details or intranet or is it same..

It is the same.

Edit:techno-Edited this post to make it more legible
 

GNUrag

FooBar Guy
Saharika said:
problem1)
the user name and password are stored in database table ..the user enter username and password and it is checked against the password and username in tables
now problem is if uname and pass are correct i want user to direct to thier personal profile page...if user can see only his personal profile
Tip 1: Dont store your passwords in the database in plain text. Use some kind of hashing algorithm to make it secure. Use PHP's md5($string_variable); to generate MD5 hash and save that in the database instead.

As for your query,
Let's say you have a homepage as home.php then you can do something like this.

Code:
if ($username == $database_username && $passwd == $database_passwd)
{
  header('Location: home.php');
  exit();
}
else
{
  header('Location: login.php');
  exit();
}
 
Status
Not open for further replies.
Top Bottom