JustinDupre773 Posted March 7, 2014 Share Posted March 7, 2014 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 Quote Link to comment https://forums.phpfreaks.com/topic/286782-form-handling-with-conditions/ Share on other sites More sharing options...
Skewled Posted March 7, 2014 Share Posted March 7, 2014 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. Quote Link to comment https://forums.phpfreaks.com/topic/286782-form-handling-with-conditions/#findComment-1471716 Share on other sites More sharing options...
Augury Posted March 7, 2014 Share Posted March 7, 2014 add session_write_close(); session_start(); whenever you set the the $_SESSION. You can also achieve session_destroy() and arrive at the same result. Quote Link to comment https://forums.phpfreaks.com/topic/286782-form-handling-with-conditions/#findComment-1471728 Share on other sites More sharing options...
Ch0cu3r Posted March 7, 2014 Share Posted March 7, 2014 (edited) add session_write_close(); session_start(); whenever you set the the $_SESSION. You can also achieve session_destroy() and arrive at the same result. I do not see how that helps contributes to solve the OP's question/problem. Edited March 7, 2014 by Ch0cu3r Quote Link to comment https://forums.phpfreaks.com/topic/286782-form-handling-with-conditions/#findComment-1471740 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.