Jump to content

I-AM-OBODO

Members
  • Posts

    442
  • Joined

  • Last visited

Everything posted by I-AM-OBODO

  1. yes. i have other session value and all is working well except this one. funny enough there's no code generating function on the next page. but why does it regenerate?
  2. Hi all. I generated a random number and assigned it a variable to be used through out the session but on getting to the next page, the value changes. It is regenerating another number which isnt the intention. I have tried severally but no way! i really cannot figure out why the value changes in my second page. $loan = mt_rand(1000, 9999); $name = "John"; if(isset($_POST['continue'])){ $_SESSION['num'] = $number; $sql = ("INSERT INTO table (name, token_number) VALUES(:name, :token_number) $stmt=$pdo->prepare($sql); $stmt->execute(array( ':name'=>$name; ':token_number'=>$_SESSION['num'] )); if($stmt->rowCount()==1){ header("location: nextpage.php"); }else{ echo "Something went wrong"; } }
  3. hi requinix. having same issue again. but registered with the username obodo. thanks
  4. Hello admin still no word about fixing my old account login?
  5. Thanks a zillion dozen times
  6. thanks alot. i tried to make the input field mandatory but to no avail. also i have a couple of other places i'd like to initial and instead of initialing them one by one, i'd like to initial just one and it will affect the whole three fields. thanks
  7. Thanks a zillion dozen times. I have modified my code to use sql but i read somewhere that sql dates are not to be trusted! which is better? thanks
  8. there's no way i could pm you cos it's not highlighted. i had this issue before and requinix fix it for me. my display name is Mr Chidi. thanks
  9. the sql you suggested takes care for only when month is the pay frequency. what can be done on sql to accommodate for both bi-weekly, weekly and monthly? thanks
  10. what then would you propose?
  11. Hello admin. i cannot login to my old account. help pls thanks
  12. could you pls help with example cos i don't know nada on javascript. thanks
  13. Thanks all. I ended up using php date/time function instead of mysql. I have my logics right just as i stated earlier but i have two issues. (1) i'd like to get rid of the + sign in from of date_diff (2) just as scootstah noted; not all months are 30 days, there February and others that have 31 days. How do i get it so that it works for all the months. Thanks my code $pay_frequency = "Monthly"; $first_payday = 10; //date of transaction $today = date('Y-m-d'); if($pay_frequency == "Monthly"){ $new_pay_frequency = 30; }elseif($pay_frequency == "Twice_monthly"){ $new_pay_frequency = 14; }elseif($pay_frequency == "Weekly"){ $new_pay_frequency = 7; } // make date for current month $make_date = date('Y-m-01'); //payment frequency echo "Payment frequency: " . $new_pay_frequency ; echo "<br>"; //first payday echo "First payday: " . $first_payday; echo "<br>"; //add payment frequency to first payday to get next payday in days $next_payday = $new_pay_frequency + $first_payday; echo "Next payday(in days): " . $next_payday; echo "<br>"; //get next payday in date format $date = date_create($make_date); date_add($date, date_interval_create_from_date_string($next_payday.'days')); $nu = date_format($date, 'Y-m-d'); echo "Next payday date: " . $nu; echo "<br>"; // difference between date of transaction and next payday $datetime1 = date_create($today); $datetime2 = date_create($nu); $interval = date_diff($datetime1, $datetime2); echo "Date difference: ". $interval->format('%R%a days');
  14. hello. why does the site keep logging me out even when the details provided are correct? i even asked for a reset and no mail was sent to me but it recognizes my email address. thanks
  15. hi all i dont know what it is called so i dont know what to goggle cos all my search result have not yielded desired result. i have a table and space for initials. i want so that when i type on the form field it will display on the table. just like the example used on jquery modal form thanks
  16. ok thanks. will put your suggestion into consideration but that is not my problem just yet. i need to express next payday in dates. and mind you the payment frequency could be weekly or twice weekly. thanks
  17. hi all. having a hard time figuring this out. i have: Payment frequency: weekly(7days) twice-monthly(14days) monthly(30days) First payday: 8th Next payday: first payday + payment frequency Date of transaction: 2015-07-14 (today) Date difference: difference between date of transaction(today) and next payday: Due date ? For argument sake: Payment frequency = 30(Monthly) First payday = 8th Next payday = 38th ( 8th of next month) Date of transaction: 2015-07-14 (today) Date difference = 8th next month - today My problem is how to express 8th of next month in date format. Thanks $first_payday = 8; $today = date('Y-m-d'); if($pay_frequency == "Monthly"){ $new_pay_frequency = 30; }elseif($pay_frequency == "Twice_monthly"){ $new_pay_frequency = 14; }elseif($pay_frequency == "Weekly"){ $new_pay_frequency = 7; } echo "Payment frequency: " . $new_pay_frequency; echo "<br>"; echo "First payday: " . $first_payday; echo "<br>"; $next_payday = $new_pay_frequency + $first_payday; echo "Next payday: " .$next_payday;
  18. still no head way
  19. thanks. will give it another shot and see.
  20. still couldnt get it to work pls
  21. Mr-chidi is my display name, emails not allowed!
  22. thanks all. i knw where the problem is, the thing is i do not know how to fix it. mac_givers, thanks for the link, will study it but for now, it wont solve my situation or ut will take some time. thanks anyway
  23. there's no way to pm u. if its ok i will post it here?
  24. Hi. I tried to login to my account but it say i am not recognised but i am sure my password is correct. i tried to reset the password via forgot password. after filling the form no reset mail was sent to me. tried it a couple of times still no reset mail and so i had to open a new account. can my old account be retrieved back? i'd loved badly to have my account back. my username is funkyfela. i had to add 2 to the new one to differentiate with old one. thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.