Topic: Warning: mktime() expects parameter 5 to be long (Read 2762 times)
Google dot what?
Gender:
Posts: 2
16 credits Members referred : 0
« on: Jul 02, 2006, 01:54:53 pm »
I have this error when i try to update user profile.
Notice: Undefined offset: 1 in C:\WEB\classes\access_user\access_user_class.php on line 286
Notice: Undefined offset: 2 in C:\WEB\classes\access_user\access_user_class.php on line 286
Warning: mktime() expects parameter 5 to be long, string given in C:\WEB\classes\access_user\access_user_class.php on line 286
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql.users_profile SET language='en', address='', postcode='', city='', country' at line 1
I use WinXp with apache 2.2,Mysql 5,PhP 5. Help!
« Last Edit: Jul 02, 2006, 01:58:28 pm by zeus074 »
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Jul 02, 2006, 10:46:19 pm »
what is the dateformat you're using? maybe you can show us the form?
Google dot what?
Gender:
Posts: 2
16 credits Members referred : 0
« Reply #2 on: Jul 03, 2006, 02:11:44 am »
This is the form before save(profile) [1.jpg] then after [2.jpg]
if (isset($_POST['profile_data'])) { $update_profile->save_profile_date($_POST['id'], $_POST['language'], $_POST['address'], $_POST['postcode'], $_POST['city'], $_POST['country'], $_POST['phone'], $_POST['fax'], $_POST['homepage'], $_POST['notes'], $_POST['field_one'], $_POST['field_one'], $_POST['field_two']."##eu_date"); // note the last trailing string, this used to optimize the value as a euro date. }
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: Jul 03, 2006, 08:46:56 am »
I see the example file wasn'r really clear (nothing wrong in the class)
replace the this line to update the profile information:
Code:
<?php if (isset($_POST['profile_data'])) {
$eu_date_field = (!empty($_POST['field_two'])) ? $_POST['field_two']."##eu_date" : $_POST['field_two']; // add the eu date field information ONLY if the field is not empty $update_profile->save_profile_date($_POST['id'], $_POST['language'], $_POST['address'], $_POST['postcode'], $_POST['city'], $_POST['country'], $_POST['phone'], $_POST['fax'], $_POST['homepage'], $_POST['notes'], $_POST['field_one'], $eu_date_field, $_POST['field_three']); }
I added also an example for the us date to make it more clear:
Code:
<?php echo "<div>".$update_profile->create_form_field("field_two", "Euro Date dd/mm/yyyy: ", 10, false, false, true)."</div>"; echo "<div>".$update_profile->create_form_field("field_three", "US Date yyyy-mm-dd: ", 10)."</div>";
at last this features (dyn. form fields) are additional features, the main function in this class is to protect pages and manage members...
« Last Edit: Jul 03, 2006, 08:49:00 am by olaf »
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=3115