Hi,

I am upgrading from php4 to php5 and get this error message when i go live :
"Notice: Undefined variable: eff in /home/test5/www/includes/lanekalkulator.php on line 226 %) "

Code:

<br />
<div style='margin-top: 5px;'>= <span style='font-weight:bold;font-size:18px;'><?php echo ceil($resultat2); ?></span> kr,- pr. måned <em><span style='font-size: 11px'>(nom. rente 11.9% og eff. rente <?php echo $eff; ?>%)</span></em>
				<br />

Hello Espenij,

It looks like the problem is with the $eff varaible.
You have not assigned a value to this variable, and PHP is complaining about that.
You can't echo something that doesn't exist.

You can first check to see if exists or not. If it does, then you echo it:

if(isset($eff))
{
    echo $eff;
}

or you can just make sure you assign a value to it before you try to use it, even if you make it an empty string before you echo it.

Hope this helps.

Hi,

it didnt work, I have just deleted the whole code.

But thanks anyways.

Espen

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.