Jump to content

Form handling with conditions.


JustinDupre773

Recommended Posts

I've been banging my head on a wall for 30 hours over this!

 

What I am trying to do seems so simple. I have a couple of views, a profile overview type of page and an edit profile page. After verifying your account with an email link my site brings you to a blank-ish profile page and you have to follow another link from there to update your profile. It's just not as slick as I'd like it to be before launch and allows other functionality to be available before your profile has any content. I don't like it.

 

I created a specific "Create Your Profile" view that I want to include only if a user_id hasn't been included in the profilemaster table.

 

All that I have left to do is check to see if my session user_id exists in my profilemaster table and if it does include the old profile page and if it doesn't include the new "Create Your Profile" page.

 

I have tried everything over and over and then got beat up by the people at stack on top of it.

 

I need some direction.

 

I might just be tired, I've been working on the site for a solid week. All of my other functions are working, data can be inserted and updated, my emails are flowing when they need to, my log in is safe. I'm befuddled.

 

Thanks if you have any suggestions!

 

Justin

Link to comment
Share on other sites

 

 

All that I have left to do is check to see if my session user_id exists in my profilemaster table and if it does include the old profile page and if it doesn't include the new "Create Your Profile" page.

 

 1. Query the Database to determine the values needed

 2. Add a conditional statement to show which page you need to load for the user and load it

 

 I don't know if your using a Framework or if you're using modular code to create these pages so I can't really bring much to the table other than what I mentioned, I would be using templates with a MVC approach and I'd just load the content dynamically with jQuery depending on what my GET returned.

Link to comment
Share on other sites

add 

 

session_write_close();  session_start();

 

whenever you set the the $_SESSION.  

 

You can also achieve session_destroy() and arrive at the same result. :happy-04:

I do not see how that helps contributes to solve the OP's question/problem.

Edited by Ch0cu3r
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.