473,216 Members | 2,207 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

Is this doable?

My customer has a login form on their site that goes to a remote database.
The remote database creates its own login errors if the user (say) types in
the password incorrectly. The customer wants customized messages.
My thinking is to have a form go first to a php form handling page on the
customer's server, check for errors. If there are errors then custom
messages can be echoed back to the login page. The issue is how can the, now
accurate, ID and PW get passed to the remote database automatically?
I am guessing that the initial error checking page would not encrypt the
password as that gets done on the remote database of which I have no
control.

My php skills are very basic. Any help would be appreciated. Is this at
least doable?
Thanks
Christopher
Jul 17 '05 #1
5 1608
Hello, are you connecting to the database from your PHP script and issue
queries to check user credentials? if so, why does it matter whether the
database is remote or not? please clarify. Or by "remote database" you mean
a different web application? then how does your application communicates
with the other one?

"Christopher Richards" <cr**********@christopherNOSPAMrichards.com> wrote in
message news:AL************@newssvr14.news.prodigy.com...
My customer has a login form on their site that goes to a remote database.
The remote database creates its own login errors if the user (say) types
in the password incorrectly. The customer wants customized messages.
My thinking is to have a form go first to a php form handling page on the
customer's server, check for errors. If there are errors then custom
messages can be echoed back to the login page. The issue is how can the,
now accurate, ID and PW get passed to the remote database automatically?
I am guessing that the initial error checking page would not encrypt the
password as that gets done on the remote database of which I have no
control.

My php skills are very basic. Any help would be appreciated. Is this at
least doable?
Thanks
Christopher

Jul 17 '05 #2
lig
if you are connecting to the DB remotely you can have the page make the
connection and verify it then save it in a session variable.

Something like:
page 1 - login form sends input to ->
page 2 - verify form input and try to connect (ex: mysql_connect,
mysql_select_DB). If a valid connection is made you can then save the
input into a session variable ($_SESSION) and use it whenever and where
ever you need to interact with the DB. If there is no valid connection
you send back an error message (Ex: The database will not allow you to
connect with that information. Please check your data and try again.)

Make sense or did I lose you at the last left. :)
Christopher Richards wrote:
My customer has a login form on their site that goes to a remote database. The remote database creates its own login errors if the user (say) types in the password incorrectly. The customer wants customized messages.
My thinking is to have a form go first to a php form handling page on the customer's server, check for errors. If there are errors then custom
messages can be echoed back to the login page. The issue is how can the, now accurate, ID and PW get passed to the remote database automatically?
I am guessing that the initial error checking page would not encrypt the password as that gets done on the remote database of which I have no
control.

My php skills are very basic. Any help would be appreciated. Is this at least doable?
Thanks
Christopher


Jul 17 '05 #3

"konsu" <ko***@hotmail.com> wrote in message
news:Wp********************@kallback.com...
Hello, are you connecting to the database from your PHP script and issue
queries to check user credentials? if so, why does it matter whether the
database is remote or not? please clarify. Or by "remote database" you
mean a different web application? then how does your application
communicates with the other one?

Sorry if I am not clear. When I say remote db it is one that I have no
access to other than as a user via the login form on a web page.
That db has a script that issues its own error message. I have no control
over that script and I don't even know what language it is written in. I
know it doesn't make much logical sense, but the cutomer wants their own
text echoed back to the login screen if a user screws up. My suggestion may
not be the most elegant solution. But I thought I could hide the original
login form, create my own which would go to another db that I do have access
to in order to generate error messages of the type acceptable. But then my
question is how does the PHP handling page pass the correct login id and pw
to the primary db (the one I have no control over). I guess it boils down to
how do I get the PHP script to pass values into fields on a login form I
have no control over? It seem to me that I should be able to grab the code
(which accepts the input on the orginial form) and put that in a PHP script
which would log into the original db. Does this make sense and it is likely
to work? I am probably missing something obvious to those that know their
stuff. I only wish I did. Thanks.
Hope this claifies.
Jul 17 '05 #4

"lig" <li*@mgpt.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
if you are connecting to the DB remotely you can have the page make the
connection and verify it then save it in a session variable.

Something like:
page 1 - login form sends input to ->
page 2 - verify form input and try to connect (ex: mysql_connect,
mysql_select_DB). If a valid connection is made you can then save the
input into a session variable ($_SESSION) and use it whenever and where
ever you need to interact with the DB. If there is no valid connection
you send back an error message (Ex: The database will not allow you to
connect with that information. Please check your data and try again.)

Make sense or did I lose you at the last left. :)


Maybe a slight swerve.

There are two databases. (1)Primary db(don't know what language scripts are
written in that interact with it and I have no access to it only as a user)
(2)My (proposed) substitute db PHP and mySQL on my server.

page 1 My substitute login input form goes to mySQL DB (on my server) to
check if ID and PW valid. If no, then send whatever messages back to the
login page.

If there are no errors and the ID and PW are correct then:

I want to pass the ID and PW into the ID and PW fields of the original
login form which will go to the db I have no control over. How about using
the code from the original login form (the one that I substituted my own
for) in the PHP script so that now logs into the primary db number one I
have no control over? That script wont generate errors because I have
already checked for errors in my substitute script. I don't (yet) know
enough about how the $_SESSION constant would work here. Is this more clear?
Thanks for your help.
Jul 17 '05 #5
it looks like your PHP code needs to submit another http request to the
other server and to parse its html response.

forms are usually submitted using the HTTP POST verb with the form data in
the body of the message. usually you specify content-encoding header with
"application/x-form-urlencoded" value and put the data in to the body in the
form similar to that for url query strings for GET requests:

variable0=value0&variable1=value2

so all you need to do is to send this request to your other web server and
get its response in the form of html and parse it.

Sorry if I am not clear. When I say remote db it is one that I have no
access to other than as a user via the login form on a web page.
That db has a script that issues its own error message. I have no control
over that script and I don't even know what language it is written in. I
know it doesn't make much logical sense, but the cutomer wants their own
text echoed back to the login screen if a user screws up. My suggestion
may not be the most elegant solution. But I thought I could hide the
original login form, create my own which would go to another db that I do
have access to in order to generate error messages of the type acceptable.
But then my question is how does the PHP handling page pass the correct
login id and pw to the primary db (the one I have no control over). I
guess it boils down to how do I get the PHP script to pass values into
fields on a login form I have no control over? It seem to me that I should
be able to grab the code (which accepts the input on the orginial form)
and put that in a PHP script which would log into the original db. Does
this make sense and it is likely to work? I am probably missing something
obvious to those that know their stuff. I only wish I did. Thanks.
Hope this claifies.

Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rene Pijlman | last post by:
There doesn't seem to be an apt package for Python 2.3 on Debian Woody. Should I expect unusual difficulties or unsolvable problems when building and installing 2.3 on Woody from the source...
5
by: CNemo | last post by:
Hi all! I need to write some tracing code for legacy applications. Basically there is the need to trace SQL sent to server from ASP app. Code is very unstructured and dirty, so there is no...
5
by: darrel | last post by:
I have a client that would like to enable some email notification within their application. Normally, I'd just send an email thorugh their SMTP server and be all set. The catch here is that they...
3
by: well_doing | last post by:
I have something like this in declaration. union allInOne{ struct simple_s { int a; int b; } s; struct complex_s { int a; int b;
7
by: fkallgren | last post by:
Hi. I have a little problem. I have a script that is in the scheduler (win32). But every now and then I update this script and I dont want to go to every computer and update it. So now I want...
6
by: s.eng.ashraf | last post by:
Hi everybody, Is it possible to control the mouse action by a C++ program. For example, MousePosition(x_location = 100, y_location = 120) To make it more clear, I might be able to check...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.