siddscool19 Posted October 11, 2008 Share Posted October 11, 2008 Can any one tell me whats the use of 0 ? 0 : In the following codings, (TIMEOUT_MINUTES == 0 ? 0 : time() + TIMEOUT_MINUTES * 60) I am not good at time thing Quote Link to comment https://forums.phpfreaks.com/topic/127942-need-help/ Share on other sites More sharing options...
BillyBoB Posted October 11, 2008 Share Posted October 11, 2008 If TIMEOUT_MINUTES equals 0 then set the variable to 0 (I'm guessing the script looks like: $time = (TIMEOUT_MINUTES == 0 ? 0 : time() + TIMEOUT_MINUTES * 60) else set $time to time() + TIMEOUT_MINUTES times 60. Quote Link to comment https://forums.phpfreaks.com/topic/127942-need-help/#findComment-662515 Share on other sites More sharing options...
xtopolis Posted October 11, 2008 Share Posted October 11, 2008 It's called the ternary operator $var = (condition) ? value if true : value if false; $timeout = (TIMEOUT_MINUTES == 0) ? 0 : time() + TIMEOUT_MINUTES * 60; if TIMEOUT_MINUTES is equal to 0, the value of $timeout is 0, if TIMEOUT_MINUTES is not = to 0, the timeout is the current time + TIMEOUT_MINUTE * 60; Quote Link to comment https://forums.phpfreaks.com/topic/127942-need-help/#findComment-662516 Share on other sites More sharing options...
siddscool19 Posted October 11, 2008 Author Share Posted October 11, 2008 Thanks friends it helped a lot (Also I learned a new thing) Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/127942-need-help/#findComment-662518 Share on other sites More sharing options...
siddscool19 Posted October 11, 2008 Author Share Posted October 11, 2008 Hey people I need help with this also if (isset($_POST['access_password'])) { $login = isset($_POST['access_login']) ? $_POST['access_login'] : ''; $pass = $_POST['access_password']; if (!USE_USERNAME && !in_array($pass, $LOGIN_INFORMATION) || (USE_USERNAME && ( !array_key_exists($login, $LOGIN_INFORMATION) || $LOGIN_INFORMATION[$login] != $pass ) ) ) { See I understood till $pass but I am not able to understand conditions in if statement... Quote Link to comment https://forums.phpfreaks.com/topic/127942-need-help/#findComment-662519 Share on other sites More sharing options...
Zane Posted October 11, 2008 Share Posted October 11, 2008 are you not able to understand conditions in the if statement or an if statement I assume you mean the USE_USERNAME.. this is a constant look at http://php.net/define Quote Link to comment https://forums.phpfreaks.com/topic/127942-need-help/#findComment-662521 Share on other sites More sharing options...
siddscool19 Posted October 11, 2008 Author Share Posted October 11, 2008 ohk thanks..... And also one more question Can we send captcha to a page? I mean we get captcha image to the user from a page and then the user type the text seen and we send that value to for is it possible? Quote Link to comment https://forums.phpfreaks.com/topic/127942-need-help/#findComment-662522 Share on other sites More sharing options...
.josh Posted October 11, 2008 Share Posted October 11, 2008 yes. Quote Link to comment https://forums.phpfreaks.com/topic/127942-need-help/#findComment-662523 Share on other sites More sharing options...
siddscool19 Posted October 11, 2008 Author Share Posted October 11, 2008 Hmm like how should i procede on it? Any hints? Quote Link to comment https://forums.phpfreaks.com/topic/127942-need-help/#findComment-662524 Share on other sites More sharing options...
.josh Posted October 11, 2008 Share Posted October 11, 2008 You say that you have generated a captcha image and put it on the screen for the user...after that you make a simple form... Quote Link to comment https://forums.phpfreaks.com/topic/127942-need-help/#findComment-662526 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.