[SOLVED] Warning: mktime() expects parameter 4 to be long, string given in /home/a5663365/publ
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
if i got several errors in the scripts i have, pleace let my know. i have struggled long time now with inputting birtday in my regisration.
PS
Along with this error in my database it showes 1969-12-31 in birtday, strange because i typed mars-12-2010
pleace respond, even if you have looked at the scripts and not come up with a solution, so i knoe someone have looked at it, and then try again from start
sorry, I have corrected that in the script i uploaded in 000webhost, but when i was writing the CODE i copied the script i had on dreamweaver and agian not the script i am using, sorry my bad. I think that was the only different in the two scripts.
First, you have day and month swapped in your HTML; i.e. your days only go from 1 to 12, but months from 1 to 31. Check what name you have in each select, and what the options in it are.
Quote:
Originally Posted by nothing07
how to get al the years do i need to type them all in?
instead. The @ suppresses all warnings. This also sanitizes your inputs -- there are all kinds of asshats trying to break our scripts, so best be careful. All you need to do, is to check that the values are sane. I'd use a test similar to
Second, instead of storing passwords in plain text, just generate a random salt, and store the hash of the salt and the password (in plain text in $password):
Note that I'm using dual-salted passwords. I consider it the best technique, although many consider it overkill. I like it because it prevents both prefix and postfix attacks (prepending or appending garbage to the password to make it match).
To compare a plain text password $password to a stored salted hash $pass later on, you just do
Code:
@list($salt1, $salt2, $hash) = @explode(":", $pass);
if (strcmp($hash, sha1($salt1 . $password . $salt2)) === 0) {
/* $password is correct */
} else {
/* $password is incorrect */
}
This way, when somebody eventually steals your password database, your users are not screwed. Any attacker must do a lot of trial-and-error computation ("cracking") to find out any of the passwords. Since they are salted, each password hash must be cracked separately; there is no way to work them over in a batch.
Last edited by Nominal Animal; 06-16-2012 at 01:34 PM.
This will fail, because POST data is always strings. (So are GET, REQUEST, and COOKIES, too.)
not only will this fail, it's also completely pointless to just copy the variable values. Instead, you might just as well use the original variables.
But you're right - it makes a lot more sense to check, sanitize and convert the input as required and then store the result in a different variable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.