Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning when creating new account


technoczech

Recommended Posts

Posted

Hi - I'm new to osc and to php... Any help is soooo appreciated.

 

I'm testing my signup process, and if I enter the date of birth incorrectly (by just entering one letter instead of MM/DD/YYYY), I get this warning at the top of the page:

 

Warning: checkdate() expects parameter 3 to be long, string given in C:\blah\blah\blah\create_account.php on line 164

 

I saw the contribution for the dob dropdown, and tried it, but couldn't get it to work. My create_account.php page completely errored out with a syntax error, so I abandoned that effort and am back to using my original files.

 

Since editing my account does not give this error, I tried comparing the code in account_edit.php with create_account.php, but it's the same:

 

if (ACCOUNT_DOB == 'true') {

 

if (!checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4))) {

 

$error = true;

 

 

 

$messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR);

 

}

 

}

 

 

Please help! Thanks!

Posted
if (!checkdate( (int)substr(tep_date_raw($dob), 4, 2), (int)substr(tep_date_raw($dob), 6, 2), (int)substr(tep_date_raw($dob), 0, 4))) {

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...