06-17-2008, 02:42 AM
|
#8 (permalink)
|
|
The Addict
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
|
first of all, instead of doing this
$link = mysql_connect("localhost",... etc)
if(!$link) { bla bla }
there is a better way. you do this.
Code:
mysql_connect("localhost","username","password") or die(mysql_error());
also its best practice to leave your connection string into another file. what i do is i've made a config.php file and in here i've placed my connection string. so whenever i want to use it i just do include("config.php");
as for the rest, try not to use the session function. although there might be a debate on this lol. but i would suggest not to use it and use cookies instead.
__________________
no signature set
|
|
|
|