Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Dimwhit

macrumors 68020
Original poster
Apr 10, 2007
2,069
299
Hey all,

I'm going to be setting up a new website for my company, and I'm going to be needed a site-wide user registration/login system. I have one that I found online and modified a bit for my current site, but it's not particularly robust. I could probably adapt it. But I'm wondering if anyone knows of a good, reasonably-easy to install system. I don't mind paying a little bit if needed, either.

Any ideas or suggestions?
 
i would hire a freelance programmer to create one, and you can find one on rentacoder.com
 
i would hire a freelance programmer to create one, and you can find one on rentacoder.com

Well, I could create one. I just don't want to re-invent the wheel. And it would take me quite some time.
 
Try this :

<?php
session_start();
include('coor.php');
$username=$_POST['user'];
$passw=$_POST['password'];
$query="SELECT * FROM login WHERE user='$username' AND password='$passw'";
$result=mysql_query($query, $connect) or die('error making query');
$affected_rows = mysql_num_rows($result);
if($affected_rows == 1) {
$_SESSION['user']=$username;
header('location:index.php');
}
else {
header('location:loginAdmin.php?erreur=erreur');
}
?>
 
Try this :

<?php
session_start();
include('coor.php');
$username=$_POST['user'];
$passw=$_POST['password'];
$query="SELECT * FROM login WHERE user='$username' AND password='$passw'";
$result=mysql_query($query, $connect) or die('error making query');
$affected_rows = mysql_num_rows($result);
if($affected_rows == 1) {
$_SESSION['user']=$username;
header('location:index.php');
}
else {
header('location:loginAdmin.php?erreur=erreur');
}
?>

Login script, say hello to SQL injection.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.