Forum Moderators: open

Message Too Old, No Replies

PHP with MySQL database help needed

php mysql login password authentication

         

t3c4n0d3

7:04 pm on Dec 7, 2008 (gmt 0)

10+ Year Member



I need a hand getting a login-exec.php script to work correctly.
Wondering if someone could check the script(s) and let me know what to change to make it work so I learn something and can move on to the next phase.

rocknbil

3:35 pm on Dec 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard t3c4n0d3, posts some code but be sure to make the login name anonymous. There's also a great PHP forum here.

Generally you would do something like

include ("db-connect.php");

(or require)

and it's contents would be

define('DB','your_db_name');
define('HOST','localhost');
define('USER','your_db_user');
define('PASSWORD','your_db_pass');

$db = mysql_pconnect(HOST,USER,PASSWORD) or die ("Could not connect to database");
mysql_select_db(DB,$db);