This may be a no brainer, I'm not sure, but just wondering if it is causing problems.

Is it acceptable to use both GET and POST for transferring data in the same script?

Here is what I have, and I seem to be getting eratic results, so trying to pinpoint the source of the issue

if (!isset($_POST['subbed'])) {   // If form has not yet been posted get current data
    //  Need to check the event code to see if set, and if not then redirect
    if (!isset($_GET['event'])) {   // If form has not yet been posted get current data
        header('Location:../memberbo.php');
    }else{
        $event_id=$_GET['event']; // passed in link from event_schedule.php
    }

the POST is checking to see if a variable that is internal to the script 'subbed' has been set to determine the path within the script to be followed...

the GET is ensuring that the variable 'event' has been set before arriving at this script, and if not, it redirects the member to their back office instead of displaying the event form.

I'm just wondering if the combination would be causinging a problem.

Thank you in advance for your feedback.

Douglas

Nothing wrong with using both.

What is the problem you are having?

The Get was not getting the correct data, but I found the issue and it was simply my not assigning the value correctly.

Seems to be working fine now..

Thank you for your response, and sorry to have wasted your time with it.

Doug

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.