Prakh_6355 Posted October 21, 2016 Share Posted October 21, 2016 Hello everyone, I have some problem regarding my application .please help me.. ... here i am attaching the snapshot. please take a look. Error: Undefined Index.. Quote Link to comment https://forums.phpfreaks.com/topic/302377-having-some-undefined-index-error-problem-while-making-blog-application/ Share on other sites More sharing options...
requinix Posted October 21, 2016 Share Posted October 21, 2016 Think about the logic you're using on line 6. Quote Link to comment https://forums.phpfreaks.com/topic/302377-having-some-undefined-index-error-problem-while-making-blog-application/#findComment-1538469 Share on other sites More sharing options...
Prakh_6355 Posted October 22, 2016 Author Share Posted October 22, 2016 thank you for responding me...dear But i think my logic is okk.. Any more suggestion you want to give.. please tell me otherwise my head gonna blow uppp.. Quote Link to comment https://forums.phpfreaks.com/topic/302377-having-some-undefined-index-error-problem-while-making-blog-application/#findComment-1538489 Share on other sites More sharing options...
Jacques1 Posted October 22, 2016 Share Posted October 22, 2016 But i think my logic is okk.. Think again, my dear. Right now, your code says this: If the user is logged in, redirect them to the index page and cancel the script. Otherwise (i. e. the user is not logged in), take the nonexistent user ID and store the post. Sounds like you have it backwards. You want to redirect the user if they're not logged in, otherwise you store the post with the user ID. Quote Link to comment https://forums.phpfreaks.com/topic/302377-having-some-undefined-index-error-problem-while-making-blog-application/#findComment-1538491 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.