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
1 1296 Motoma 3,237
Recognized Expert Specialist
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
Welcome to theScripts.
[PHP]
//somewhere in the code:
$validPromo = false;
//later in the code
if(!$validPromo )
{
header("Locatio n: error.php?error Number=5");
}
[/PHP]
Your error page can then check the error number, and perform the necessary actions.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Manuel Lopez |
last post by:
I have a puzzling form timer problem that I didn't experience prior to
Access 2003 (though I'm not sure access 2003 is to blame).
Here's the situation: a computer has two access 2003 databases on it, a
frontend and a backend.
Case 1: If vba code on the frontend updates many rows (360,000) on the
backend, a form's timer event (from the frontend) will stop firing until the
user gives the form focus. (Note that the update itself always...
|
by: John Ortt |
last post by:
Hi there everyone,
I have a part info form which has a faded image of our company logo as a
background.
I want to replace the faded image with a bright red warning image on items
which have run out of purchasing cover.
I am nearly there, the only problem is that the code below only changes the
image background for text and combo-box backgrounds, it doesn't apply it to
the whole form.
|
by: JoeHenrich |
last post by:
I am using VS.NET 2003 and am having an interesting issue with a Listbox control. Essentially, I have a form with a listbox on it. In the listbox doubleclick event I would like to do some processing and then close the form. However, I receive an error (Cannot access a disposed object named "ListBox".) after my doubleclick code has processed.
/* ***************************
private void listBox1_DoubleClick(object sender, System.EventArgs...
|
by: eswanson |
last post by:
I have a web page I need to post a file plus some other fields to it. How
can I do this from a asp.net page. I know I can send individual fields to the
other page, but how do I send a file to the other page, or is there something
else like a stream which will be like a file. I am attempting to get a way
from writing out a file and then having to give the page that I am posting to
the file name. Instead I would like to just from asp.net...
|
by: hzgt9b |
last post by:
Using VB .NET 2003,
I have a windows application that performs a series of file actions (copy,
move, delete) but the actions are completing before the window is painted on
the screen... how can I force the form to be painted on the screen first,
then the actions start? Or should I pause the app for a few seconds while the
form paints.
Any suggestion woudl be appreciated!
| |
by: Jack |
last post by:
Hi,
I have a asp form where one element is a list box which lists four years
starting from 2004. This list is drawn from a database table which has YearID
and Year as two fields as shown below:
YearID YEAR
1 2004
2 2005
3 2006
4 2007
PART OF ASP CODE IS:
|
by: Mike |
last post by:
Hello,
Ok I have 2 classes in my project, one is the main form and one is a
connection class, at a certain event on my main form a new instance is
made of the connection class, and a reference to the main form is passed
to its constructor.
The connection class opens up a new thread and starts doing work in it,
and adds collected data to the main form via a (cross-thread) control
invoking delegate.
|
by: Zytan |
last post by:
I have public methods in a form. The main form calls them, to update
that form's display. This form is like a real-time view of data that
is changing.
But, the form may not exist (it is created / destroyed at user
request). I can check form != null to prevent incorrect access.
But, the form could disappear immediately after the check, before the
method is run. Or someone could click 'close' when it's in the middle
of an update. ...
|
by: numberwhun |
last post by:
Hello everyone! I am dabbling in processing forms using Perl and having only just begun, I am already having problems. Go figure. :-)
Top begin with, here it the form's html, its nothing at all complicated:
<div id="formcontent">
<h3>The New Information Gathering Form</h3>
<form action="./cgi-bin/process_form.cgi" method="post">
<fieldset>
<legend><strong>Personal Information</strong></legend>
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |