Undefined property error

Hi,

I have this page:
https://kroweb.dk/gfdev/arkivalier/canvas3/sognefakta_ByLand2.php?sogn=+Knudsker&amt=Bornholm
which I am working on at the moment.

This is about the first column of the page - the one to the left.
I am working on establishing a link attatched to the first column of the table - the one with the head 'Sogn'.
This link should do the following:
1. Attatch some values to the form at the top of the page
2. Open a new file and append these values to the link that is fired

To do that I have defined (what I believe is) the proper variables in my classes.php file, like this:
class KbSogn
{
    public $link;
    public $narrowlink;
    public $amt;


    function __construct()
    {
         $this->link = sprintf("<a href='%s' target='_blank'>%s</a>", $this->URL, $this->Kirkebog);
         
         $this->narrowlink = sprintf("<a href='%s' target='_blank'>%s</a>", $this->URL2narrow, $this->Sogn); 
                 
         $this->amt = $this->Amt;

    }
}

Open in new window


And in my kb_table.php file I am trying to present the table like this:

<table id="KbTable" class="table">

        <thead>
            <tr>
                <th>Sogn</th>
                <th>Amt</th>
                <th>Kirkebog</th>             
            </tr>
        </thead>

        <?php foreach ($data as $record): ?>

            <tr>
                <td><?php echo $record->narrowlink ?></td>
                <td><?php echo $record->amt ?></td>        
                <td><?php echo $record->link ?></td> 
                
            </tr>

        <?php endforeach; ?>

    </table>

Open in new window


I also have defined the column URL2narrow in the database (holding the name of the file that should be opened), and I am selecting it in the SQL query along with the other needed columns.

Well - I have managed to establish the link, and when clicking the link the form is filed correctly, and a page with the values of the form appended is opened.

BUT - I get this Undefined property error referring to the classes.php file in and the name of the column holding the file i need the link to open (URL2narrow), and where line 108 in this file is equal to line 12 in the code from classes.php above.

So the link is opening a wrong file - in fact a file with the same filename as the one we are comming from. But the right vaues are appended to it.

I have tried everything I can think of trying to fix this. The console gives no messages, and there don't seem to be any HTML errors in the code.

I'm sure that when this error is fixed, everthing will work as it is supposed to work.

 If someone can give me the right guidance to fix this, I would be a very happy man :)
Peter KromanSenior Proposal SpecialistAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Peter KromanSenior Proposal SpecialistAuthor Commented:
I have solved the issue.

Had a typo int he filename. Sorry.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Peter KromanSenior Proposal SpecialistAuthor Commented:
Closed
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.