Hi, I am working on a somewhat complicated form wherein I am collecting data for a client and then submitting the data for credit card processing and submitting it to a gateway and sending a confirming email to both the client and the regstrant. Everything is working great except one small issue. In some cases there is a promotional cide that is sumitted in the form that offers a discounted function. I need to check if code is valid and if it is not, stop, the process and alert the user that he needs to go back and enter a valid code.
Again this is not an issue. I have the proper code and everything is fine. The problem I am having is that the rest of the process does not stop like I want it to. Here is the scenario:
I have a form: registration.ph p that posts to regproc.php
regproc.php gathers all of the variables calculates pricees based on criteria, etc., then I submit the data to the gateway and send the email.
I check for the valid promotional code BEFORE I submit to the gateway. Is there a way I can stop the rest of the code in regproc.php from running if the code is invalid?
Thanks
Again this is not an issue. I have the proper code and everything is fine. The problem I am having is that the rest of the process does not stop like I want it to. Here is the scenario:
I have a form: registration.ph p that posts to regproc.php
regproc.php gathers all of the variables calculates pricees based on criteria, etc., then I submit the data to the gateway and send the email.
I check for the valid promotional code BEFORE I submit to the gateway. Is there a way I can stop the rest of the code in regproc.php from running if the code is invalid?
Thanks
Comment