Jump to content

Recommended Posts

Hi All

 

I am currently writing a reviews script.  I want to make it as easy as possible for reviews to be contributed.  With this in mind, I want someone to be able to create a review, without having to log in first.  However, once they have submitted the review, I want them either to log in to their ac so it gets attributed to them, or to register for an account.  If they don't do this, the review will just get attributed to guest. 

 

If I want to do this, can anyone suggest the kind of mechanism I will need to use.  Will I need to use a session variable to control the whole review submission process? 

 

I know it's a general question, but any thoughts are welcome. 

 

Thanks all.

Link to comment
https://forums.phpfreaks.com/topic/136082-add-review-without-logging-in/
Share on other sites

Use session to hold the new review_id. Then once the user logs in, check for this id, if there is an id pending then update the review table where the review_id is equaled to that session id and assign it to that user.

 

When you insert the review, assign it to guest by default, then just change it when that user logs in. This way if they do not login with that session it is just assigned to guest, if they do the code executes and changes it to that user.

 

 

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.