Jump to content

Retrieve $_GET var again after it has been retrieved


longhornn

Recommended Posts

Hi!

I am trying to implement the comment feature.

After a user selects a recipe from the search results (http://razor.ischool.utexas.edu/~nem/project/index.php scroll down to choose a recipe from the search results), the recipe page is displayed. The user may leave a comment at the bottom of the recipe page if she wishes to. The comment would be recorded in a mysql table and be displayed along with other comments for this particular recipe.

 

The problem is that when the user has entered the comment and name and hits "Add my comment", this error appears: Notice: Undefined index: id in /.../recipeText_w.php on line 57 error retrieving proteins data

 

While I understand it happens because the recipe Id ($_GET['id']) becomes unavailable after the comment and name are submitted, I am not sure how to make the recipe ID available again so that the same recipe page is displayed.

 

The script is attached. I will appreciate your advice.

 

[attachment deleted by admin]

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.