I have a simple login page with 2 fields (email and password), these details are then sent to another page which processes the inputs and sends them off to a PEAR server and awaits a response, it then comes back with one of 3 values: 5 values (NO_EMAIL, NO_PASSWORD, ACCOUNT_LOCKED, LOGIN_INVALID or a userID, a numerical value). What i really, REALLY want is all this on one page (my login page), instead of 2. So a user logs into a single page, if they mistype their password or something the error code is echoed on the SAME page. i've tried PHP_SELF which won't work for obvious reasons. I've attached a bit of my error checking code for people to look at and get a greater understanding of how the system works. It's just a conditional statement at the moment. The error code is received from a completely seperate PEAR server which we do not own... - $params = array('email' => $email,'password' => $password,'service' => 'API v1.0');
-
$auth = $client->call('getAuthToken', $params);
-
-
// Check for a fault
-
if ($client->fault) {
-
$fault = $auth['faultstring'];
-
switch ($fault) {
-
case "NO_EMAIL":
-
echo 'Email address missing';
-
break;
-
case "NO_PASSWORD":
-
echo "Password missing";
-
break;
-
case "LOGIN_INVALID":
-
echo "email or password is incorrect";
-
break;
-
case "ACCOUNT_LOCKED":
-
echo "The account has been locked.";}
-
}else {
-
$err = $client->getError();
-
if ($err) {
-
echo 'There seems to be a server side error, please send a ticket along with this refereces: $err to the admin';}
-
else {
-
echo header("Location: http://the_page_in_question.com");}
-
}
-
-
exit;
1 1535 pbmods 5,821
Recognized Expert Expert
Heya, Slowpoke.
You can use $_SERVER['REQUEST_URI'] to have the form post to itself.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Frank |
last post by:
How do you turn on PHP error messages in PHP, So I can see what is
happening when a php page fails ?
Windows & Linux ??
|
by: Scott Castillo |
last post by:
I can't seem to find the PHP error log file on a Windows system.
Does anybody know where it is?
Thanks for the help.
|
by: Ron King |
last post by:
When I installed Mandrake 10.0 I thought I had Apache, PHP, and MySQL
installed correctly. I could serve web pages, MySQL worked, and when I
tried the phpinfo() function, I got a page that looked OK. I could
create simple php pages and serve them up. Then I tried to install
pear, and things started to be not OK after all.
phpinfo() told me that the 'Configure Command' had both the following
in it:
--with-pear=/usr/share/pear
|
by: O.B. |
last post by:
I'm working on integrating some PHP code into a website hosted by
catalog.com. It appears that PHP error handling is disabled. Other
hosting services (that I have worked with) have this turned on such that
when an error occurs in loading an HTML page, the error message is
displayed to the screen.
I've added "error_reporting(E_ALL);" to my PHP code and it has not made
a difference.
What must I do to enable this behavior?
|
by: Pratchaya |
last post by:
Hi Everyone
==============================================================
About PHP::: Error/Problem PHP Warning: mysql_fetch_array():
==============================================================
In the past i use my code/script work fine with
Mandrake 9.1 - 10.1 ( + apache ,mysql )
Now i move to redhat EL4 with the same code/script
| |
by: James |
last post by:
Hey everyone, I have a really obscure but impassable problem with a
reasonably simple piece of php/PEAR DB/MySQL code
When calling several stored procs the first call succeeds, but
subsequent calls fail no matter which SP is called first it always
works, and the rest fail... with:
>>>
|
by: newsbandit |
last post by:
Hello All, is there a way to specify a php error log for each
individual site on an IIS 6 server? If so how, when I turn on logging
in the php.ini file it seems to be global and all sites dump to one
file. Thank for any help!
|
by: Lawrence Krubner |
last post by:
Imagine a template system that works by getting a file, as a string, and
then putting it through eval(), something like this:
$formAsString = $controller->command("readFileAndReturnString", $formName);
// 06-22-07 - the next commands try to import all the functions that the
|
by: openxmod |
last post by:
hi,
i am using WAMP in localhost...
can anyone help about how to handle PHP error?
|
by: fuchsia555 |
last post by:
Is there anyway to hide php error messages? Because i have in my php code error but it redirecting after 1 sec and shows my hosting path and php error number, but this error doesn't effect anything.
|
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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |