PHP and Access

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
sagat
Forum Newbie
Posts: 3
Joined: Tue Jan 13, 2004 4:56 pm

PHP and Access

Post by sagat »

Hi all. i have a dilemna question here. i have created an access database with the username and password tables. I have the ODBC connection which linked PHP to Access. I have created a PHP login form using Dreamweaver:

<form method="post" action="process.php">
Username
<input type="text" name="user" />
<br />
Password
<input type="password" name="pass" />
<br />
<input type="submit" name="submit" value="Login" />
</form>

Now i want to be able to login using from via getting the details from the access database. Somebody said to me to use process.php:
<?
//get variables from form
$user = $_GET['user'];
$pass = $_GET['pass'];

How do i use this?

After logging in, the user should be redirected to a website (this should be done using javascript client side checking). Also the login should be able to cope with users forgetting thier passwords and should be able to perform server side checking. Does anyone know i to go about this? Thanks in advance
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

To access your access database you need to use the [php_man]odbc[/php_man]_* functions. Once you've got the hang of checking a users username and password against what's in the database then you've got [php_man]header[/php_man]() to do a redirect but I'm not sure what you mean by:
sagat wrote:(this should be done using javascript client side checking)
Then you can build the code for resetting users' passwords. What do you mean by:
sagat wrote:and should be able to perform server side checking
Mac
Post Reply