mike177
Members-
Posts
49 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
mike177's Achievements
Member (2/5)
0
Reputation
-
Hi, I'm getting a parse error on ling 44 which is $query line. I've checked through the file and from what I can see its all up to scratch. Any suggestions - I attched the complete file if your feeling adventurace. function confirmPass($email, $pass){ if(!get_magic_quotes_gpc()){ $email = addslashes($email); } $query = "SELECT password FROM "Accounts" WHERE email = '$email'"; $result = mysql_query($query); if(!$result || (mysql_num_rows($result) < 1)){ return 1; } $dbarray = mysql_fetch_array($result); $dbarray['password'] = stripslashes($dbarray['password']); $password = stripslashes($pass); if($password == $dbarray['password']){ return 0; } else{ return 2; } } [attachment deleted by admin]
-
does any 1 have any sugestions or would I be right in saying that there is not a single desent tutorial on how to write a proper login system on the internet that doesnt use sessions for god saks
-
Hi, I've been using php for about a year and a half now but I'm having a lot of trouble designing a good solid login system. My current system runs the profile, account settings, register and login system all from 4 files. I fell it’s to centralised. I want to have a file for each single system, e.g. the login page is just one page with all the functions and database connection and error handling all in one. Could someone please give some suggestions on how I could achieve this or show some example?
-
Hi, I've been using php for about a year and a half now but I'm having a lot of trouble designing a good solid login system. My current system runs the profile, account settings, register and login system all from 4 files. I fell it’s to centralised. I want to have a file for each single system, e.g. the login page is just one page with all the functions and database connection and error handling all in one. Could someone please give some suggestions on how I could achieve this or show some example? Thanks in advance for anyhelp.
-
Hi, I have my main menu in a php file to show the logged in and logged out menu. The problem is that I need the user id to be displayed as part of the profile.php link (profile.php?id=000000009). I can do this in normal html and I used to be able to do it in PHP but I've forgotton. Some help please, thanks in advance for any help. The first block of code is where I'm working. <?php if(isset($_COOKIE['id']) && isset($_COOKIE['sessionID'])){ echo "<a href=\"/app/signOut.php\">Sign Out</a> <a href=\"/app/account.php\">Account</a> <a href=\"/app/mail.php\">Mail</a> <a href=\"/app/groups.php\">Groups</a> <a href=\"/app/friends.php\">Friends</a> <a href=\"/app/profile.php?id=\">Profile</a> <a href=\"/app/home.php\">Home</a>"; } else{ echo "<a href=\"/app/signIn.php\">Sign In</a> <a href=\"/app/signUp.php\">Sign Up</a> <a href=\"/index.php\">Home</a>"; } ?>
-
Hi, I have a admin area on my site. I want to for example disable registration or logging in. I can do this buy changing a value in the script to true or false but I want to be able to do this via the admin area. I know you can have a file and then use a php script / form to change a variable in it, Like a switch. Does anyone know a methode of doing this. Cheer's Thanks in advance for any help.
-
Hi, I have been using globals alot in my scripts and app's and theres alot of security risks with them so my question is how to get around them. e.g not use them. Does anyone know any methods? thanks in advance for any help.
-
I have checked it a little more and I know its just the error ckecking but i dont know how to apply it. Any sugestions
-
Hi, I have created a account update form but my error checking is a little off. When I try to change the password it says I havent entered a new password when I have and when I try to change the email address it asks me for my current and new password. I have included the core file, which hold the vaildation check. Theres also process but that just directs the for out and functions which I'm sure it's not the problem. The error handling file isn;t the problem becuase it works fine on other forms. Thanks in advance for nay help. All suggestions welcome. The editAccount functions is at bottom of the core file.
-
Cheers that works a treat.
-
index.php <?php $email = $_COOKIE['email']; echo "[<a href=\"profile.php?email=$email\">My Profile</a>]" ?> profile.php <?php echo $_GET['$email']; ?> Thats all I have on the 2 pages. I no the cookies are set and working fine but when I try to get information from the url nothing happen's
-
Hi, I am trubg to get the users email address out of the url. When they log in they are refirected to the index.php page from there they can go to the profile from the folloing link, pofile.php?email=master@hotmail.com. now when they land on the profile page I want to echo there email (just as an example). I use just a simple echo $_GET['email']. But it's not working. any suggestions. Thanks for any help in advance.
-
Hi, Just a small question. For example Facebook. When you go to your profile they put your id in the url and then they some how get the id from the URL to then query the database for their information that corrorsponds with the id. Could any one give me some pointers on how they do this. I no how they out the id in the url but not how to re-use it. Thanks in advance for any help.
-
Yea I just want the cookie to expire either when the user clicks the logout link to execute the logout script or when the user closes the browser. So I want the cookie to last as long as the user is logged in.
-
Hi, I need a little help with cookies. I want m cookies on my site to never expire unless the browser is closed or the user logout. On the php site it says to set the expire to 0. I tried this and the cookie expired a few seconds later. Does any one have some suggestions. Thanks in advance for any help.