Jump to content

header redirect with a function not wokring


beemer832

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.