473,386 Members | 2,129 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,386 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 1615
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
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...

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.