beemer832 Posted March 17, 2011 Share Posted March 17, 2011 I need to know if what I am doing will even work. I have a .php page which submits information into a form to a insert_form.php page which then parses then information and adds it to a DB. In this insert_form.php page I have a function which is being called which is located in another .php file called function.php. This function adds images to the file system and will display errors if anything happens to the user. I do this by doing a header redirect: header('location:link.php?error=error message that i want to display'); The problem is the function is working because the images are being loaded correctly, but if something happens to the images and the header redirect gets initiated, its not redirecting. I need to know if the header redirect would work when being a function in another file or not. thanks beemer Quote Link to comment https://forums.phpfreaks.com/topic/230959-header-redirect-with-a-function-not-wokring/ Share on other sites More sharing options...
Pikachu2000 Posted March 17, 2011 Share Posted March 17, 2011 Did you read the sticky topic at the top of the forum titled 'HEADER ERRORS - READ HERE BEFORE POSTING THEM' ? Quote Link to comment https://forums.phpfreaks.com/topic/230959-header-redirect-with-a-function-not-wokring/#findComment-1188886 Share on other sites More sharing options...
beemer832 Posted March 18, 2011 Author Share Posted March 18, 2011 I didn't before you posted that. Then i read through it and that was good information but the resolution to my issue. I've had that issue in the past so I am familiar with it. The issue I was having had to do with a while loop not meeting its requirements which was then not running my function that was running the header redirect. So my code was working as intended, I just wasn't taking into account for all its logic. Thanks for pointing the sticky out and I'll be sure to look for others on future posts. thanks -beemer Quote Link to comment https://forums.phpfreaks.com/topic/230959-header-redirect-with-a-function-not-wokring/#findComment-1189275 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.