28, May 2012

Undefined variable error: $euro_date - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Undefined variable error: $euro_date
« previous next »
Pages: [1] Print

Author Topic: Undefined variable error: $euro_date  (Read 1664 times)
Where are my glasses?
*
Posts: 22
176 credits
Members referred : 0



« on: Jun 18, 2006, 02:41:19 am »

I'm getting this error:

Notice: Undefined variable: euro_date in /home/mydomain/public_html/classes/access_user/ext_user_profile.php on line 110

when I load the page update_user_profile.php.

The line in question is:

$form_field .= ($euro_date) ? strftime("%d/%m/%Y", strtotime($this->$formelement)) : $this->$formelement;

I'm not sure why I'm getting this error.

Ideas?
« Last Edit: Jun 18, 2006, 08:33:28 am by jbottero »
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Jun 18, 2006, 09:33:30 am »

The variable "$euro_date" can't be unknown sinds it is an argument of the function:

Code:
<?php
function 
create_form_field($formelement$label$length 25$required false$disabled false$euro_date false) {
$form_field "<label for=\"".$formelement."\">".$label."</label>\n";
$form_field .= "  <input name=\"".$formelement."\" type=\"text\" size=\"".$length."\" value=\"";
if (isset($_REQUEST[$formelement])) {
$form_field .= $_REQUEST[$formelement];
} elseif (isset($this->$formelement) && !isset($_REQUEST[$formelement])) {
$form_field .= ($euro_date) ? strftime("%d/%m/%Y"strtotime($this->$formelement)) : $this->$formelement;
} else {
$form_field .= "";
}
$form_field .= ($disabled) ? "\" disabled>" "\">";
$form_field .= ($required) ? "*<br>\n" "<br>\n";
return $form_field;
}


Where are my glasses?
*
Posts: 22
176 credits
Members referred : 0



« Reply #2 on: Jun 18, 2006, 10:45:11 am »

Quite. But none the less, it is so.

I have varified that the code I have is the same as you posted, and I assure you I have made no modifications.

See attached image.

* euro_date.jpg (53.11 KB - downloaded 7 times.)
« Last Edit: Jun 18, 2006, 10:50:03 am by jbottero »
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Jun 18, 2006, 11:57:27 am »

please upload the php file where the screenshot is from

Where are my glasses?
*
Posts: 22
176 credits
Members referred : 0



« Reply #4 on: Jun 18, 2006, 08:06:07 pm »

See attached file...

But could it be a setting in php.ini? I don't think so, but maybe I'm wronge...

* ext_user_profile.txt (7.85 KB - downloaded 2 times.)
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Jun 18, 2006, 08:34:06 pm »

check this row (no. 104):

   
Code:
function create_form_field($formelement, $label, $length = 25, $required = false) {

the argument $euro_date is missing (compare with the function above)

it looks like that haven't updated the file last time... replace this function with the one I posted before, I will update the zip later.
« Last Edit: Jun 18, 2006, 08:35:56 pm by olaf »

Google dot what?
*
Posts: 2
12 credits
Members referred : 0


« Reply #6 on: Oct 20, 2006, 09:32:33 pm »

Hey Olaf,

Im using your latest version from Oct 17th and im getting that same error when I go to the update user profile page

Notice: Undefined variable: euro_date in /home/mydomain/public_html/classes/access_user/ext_user_profile.php on line 110

Any Fixes for this?

Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Oct 20, 2006, 10:04:06 pm »

hehe, it looks like that I forgot to put the updated file into the zip file (8 month ago)

check the updated file on my website.

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=2921
Tags : php Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Undefined variable error: $euro_date
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 01:18:33 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.