PDA

View Full Version : User System Help Required



Agw2012
04-04-2007, 03:56 PM
i have a user system on my site excet i cant login on it i have used techtuts guides to making a user system. it dont work when i try to login it comes up with
<?
ob_start(); // allows you to use cookies
$conn = mysql_connect("sql06.freemysql.net ","","");
mysql_select_db(adam) or die(mysql_error());
//fill in the above lines where there are capital letters.
$logged = MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[id]'");
$logged = mysql_fetch_array($logged);
//the above lines get the user's information from the database.
alert ('$logged[alert]') "); //send it mysql_query("UPDATE `users` SET `alert` = 'NONE' WHERE `username` = '$logged[username]'"); //then delete alert } }$free = '80';> ?>
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

can anyone help.

the person that does manage to help get my user system working will get admin rites FREE

Edited by L&#181;ke (Forum Moderator): Thread Moved From Website Designing. Please post in the correct section next time, Thanks :).

Robbie
04-04-2007, 04:52 PM
Thanks for your sql info.

F32
04-04-2007, 04:56 PM
I suggest not using the TechTuts user system as it is very unsafe and is prone to hackings due to it using cookies as opposed to sessions.

But anyway, have you set up your MySQL database?

Robbie
04-04-2007, 04:58 PM
I just looked on his account and he has.

Topps
04-04-2007, 05:03 PM
I just looked on his account and he has.

LOL, your nice aren't you. :D

Robbie
04-04-2007, 05:04 PM
Heh, thought I might as well :p

Topps
04-04-2007, 05:05 PM
Heh, thought I might as well :p

Would you ever muck up his account though? :P

Robbie
04-04-2007, 09:11 PM
Nah, I wouldn't.

Really, I wouldn't!

HONESTLY! SO STOP HIGHLIGHTING!

nets
05-04-2007, 01:07 AM
Thanks for your sql info.

I just looked on his account and he has.
The username and password fields are blank?


cookies as opposed to sessions.
If it is vulnerable, then that's a result of using cookies incorrectly.

Robbie
05-04-2007, 11:21 AM
They weren't before.

Agw2012
04-07-2007, 03:47 PM
They weren't before.

dont use that host any more anyway you just keep getting errors LOL

Want to hide these adverts? Register an account for free!