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

Link to comment
Share on other sites

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

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.