Jump to content

Recursive page call doesn't work


mike_abc

Recommended Posts

Hi,

 

I try to build a dynamic website, where, at some point, the same page needs to call itself, changing one of its parameters.

 

The call happens when you press an image from a sequence of images in a row, then the page calls itself with the index of the image pressed.

The first page has the image index = 0, then you should be able to press any image with the same or a different index (1, 2, 3, etc.) - they are all there in the row.

 

I get this error:

 

Notice: Undefined variable: link in .../htdocs/source/04_plant_show.php on line 126

 

Fatal error: Call to a member function query() on a non-object in .../htdocs/source/04_plant_show.php on line 126

 

I checked the link and it is ok, syntax-wise.

 

 

What can I do to call this page recursively ?

 

Mike

 

 

Link to comment
Share on other sites

The "link" is a variable I use to connect to the DB. It's my mistake: when I recursively call the page, I jump over the part where the link is "created".

Nothing very special - some steps are simply missing in my code because of the "jumping".

 

Mike

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.