mike177
Members-
Posts
49 -
Joined
-
Last visited
Never
Everything posted by mike177
-
Why don't you do what mmarif4u suggested. Just put a php file under each subdomain and have them redirect to mysite.com/index.php. Simple! <?php header("Location: http://www.mysite.com/index.php"); ?> Thats all you need.
-
Honestly if you want a mailing list you should create a database and just have the mail address added along with there name ect. Then use your mailing client to send a mass message rather than having them send you their email address add that to you contacts list. It's honestly a simply registration form, a little basic error checking and database connection. I could help you with some of the coding if you want send me a PM and I'll get back to you.
-
Cheers Daukan, Works like a charm.
-
I'm not expert ohdang888 but thats not how you would use it. You need to give the function a name first then you () then {} to open and close.
-
I had that problem with my script. It was an error in a previous file. Also check in your php settings where the seesion.save file is and see if it need cleaning up.
-
Hi, I am having some trouble with my user authentication. On login I set 2 cookies. 1 is the users email address and the other is an md5 login_ID instead of the user's password. That works fine but I now need to authenticate the user, e.g. on a restricted page. I am using the following: auth.php include("database.php"); $cookemail = $_COOKIE['email']; $cookloginID = $_COOKIE['login_ID']; if($database->checkLoginID($_COOKIE['email'], $_COOKIE['login_ID']) !=0){ header("Location: accessdenied.php"); } database.php function checkLoginID($cookemail, $cookloginID){ /*Verify use in DB*/ $q = "SELECT login_ID FROM ".TBL_MEMBERS." WHERE email = '$cookemail'"; $result = mysql_query($q, $this->connection); if(!$result || (mysql_num_rows($result) < 1)){ return 1;// failure } /*retreieve loginID from result*/ $dbarray = mysql_fetch_array($result); $dbarray['login_ID'] = stripslashes($dbarray['login_ID']); $login_ID = stripslashes($cookloginID); /*Validate login_ID is correct*/ if($cooklogin_ID == $dbarray['login_ID']){ return 0; //success } else{ return 2; //login_ID invalid } } Note: That is not the entire database.php file. The connecton ect are places in it also. Any suggestions on what I'm doing wrong & Thanks in advance for any help.
-
------------------- Hi, I've tried your method and the same result persists. Do you think it may be somthing more than the script.
-
Hey thanks for the help but it's not working. This is how I have it in my script. else if (!ctype_alnum($subpass)) { $form->setError($field, "* Password must be alphanumeric"); }
-
Yea okay, but like I said I was just putting another idea out there. Also the majority of internet users have cookies enabled as most sites require them.
-
Hi, Well I'm going to be honest here but your user system hasn't really been design for the required but it is written in PHP so it can be flexed to suit. Personal I would use cookies due to the fact that your session.save file will eventually get fill though you can just set a cron job for that to be cleaned up. On the other hand you wouldn't have to have long URL’s. On login success you can just set some cookies, not the password even if it's md5. Generate and random string on login and set the random string in a cookie along with there ID or email address then when displaying there CP simply cross reference with the cookie information and database to display their information and settings. Just an idea, open up a few options for you - hopefully.
-
Hi, if everything else fails, and I don't mean to be a smart %&* plus you've probably already tried it but maybe pay a little visit to Google. It wouldn't hurt.
-
Hi, I am constantly posting new topics on this forum now due to the fact it’s highly used and the members actually help solve your problem. Anyway I need to check my passwords to be alphanumeric. I have tried using preg_match, ereg, eregi and many more but they just aren't working I have tried all possible configurations with my script but none can do the job. I have a file that handles the error handling so none is in the section below, It's just the password processing. If you could give some suggestion’s it would be great and thanks in advance for any help. /*Password error checking*/ $field = "pass"; if(!$subpass){ $form->setError($field, "* Password Not Entered"); } else{ /*Spruce up password and check length*/ $subpass = stripslashes($subpass); if(strlen($subpass) < { $form->setError($field, "* Password must contain 8-15 characters"); } else if(strlen($subpass) > 15){ $form->setError($field, "* Password must contain 8-15 characters"); } else if(!eregi("^([0-9a-z])+$", ($subpass = trim($subpass)))){ $form->setError($field, "* Password must be alphanumeric"); } } Keep in mind that this is only a section of the file, it works fine its just the alphanumeric error checking wont work in the last else if statment.
-
Thanks for the comment! -yes just one. I fixed the issue myself. Cheers anyway
-
------------------- I checked the freg form and process and the field names match
-
Hi , I have written my own login script. I have completed the registration system, uploaded it to my server and fixed all the errors. Problem is when I try to test it and submit the registration form I get redirected back to my home page. I had a look through all the files and everything’s fine. I have a redirection to my home page in process.php to make sure that no one can access the file. I tried removing the redirection but that had no effect I just ended up landing on process.php. It's like the script isn't executing. I attached the zip folder of the registration system so you can see the complete source code. Thanks in advance for any help. [attachment deleted by admin]
-
Cheers mate, Works a treat.
-
Its just the password from the user input form and its pasted from proccess but it has no other major operations so I didn't include it.
-
Hi, I am having some trouble with my alphanumeric error checking on passwords with my login script. I am using the following to check the password, its the last "else if" statment, I thought it would be helpful to include the whole proccess: /*Password error checking*/ $field = "pass"; if(!$subpass){ $form->setError($field, "* Password Not Entered"); } else{ $subpass = stripslashes($subpass); if(strlen($subpass) < { $form->setError($field, "* Password Must Contain Between 8-15 Characters"); } else if(strlen($subpass) > 15){ $form->setError($field, "* Password Must Containe Between 8-15 Characters"); } else if(!ereg("([0-9A-Za-z])", ($subpass = trim($subpass)))){ $form->setError($field, "* Password Must Be Alphanumeric"); } } Note: I am also trimming the password, I've tried removing the trim but that had no effect. I'm not receiving any error messages, it just enteres the password in the database alphanumeric or not. Any suggestions. Thanks in advance for any help.
-
------------------- Cheers mate, I did just need to make the $database and form objects global
-
--------------------- Thanks so much, I forgot 1 line at the start of the function. Cheers mate
-
Hi, I have been writing my own login script for my site. I have completed the registration systems and now working out all the errors - problem is I'm using classes and something’s going wrong. I get a fatal error when I try to use a function located in another file. I've tried making the functions public, global - everything. I can't find any descent tutorials so it's no longer a self-help issue. The exact error message is: Fatal error: call to a member function on a non-object in /home/www/mnielsen.awardspace.com/login/files/session.php on line 31. I've attached the complete source code for the registration system. The errors are occurring in the session.php file on line 31 and the database_functions.php file on line 16 and 24. Thanks in advance for any help [attachment deleted by admin]