Link to home
Start Free TrialLog in
Avatar of Airgazm
Airgazm

asked on

User Login in HTML - SQL Query - Dump Data back to HTML Page.

Say I have a web page made from a Template, and the editable area is made up of a HTML table.

I want to make up a perl script that will ask for a user name/password login, then after you submit the info, the perl script connects to a Mysql database on the localhost using the POST data. It then performs a basic query (SELECT * FROM TABLE), and then dumps the query back into the orgional HTML table on the HTML template or dumps the info to a new page but made from the same template and dumping into the correct HTML Table.

Note that the login page should be contained inside the HTML template Table.

The main thing would be that instead of getting a new clear page made from the cgi script, I would get the actual query back into the template I started with.  It wouldn't matter if the page was reloaded, as long as the rest of the template was still there.

Did I explain this correctly? Is this possible?

Thanks a bunch.
Avatar of ahoffmann
ahoffmann
Flag of Germany image

> .. as long as the rest of the template was still there.

what do you mean by "there" ?
Could you please explain.
Avatar of Airgazm
Airgazm

ASKER

Well, I am new to CGI and perl and I have written a few web pages.  

All the simple scripts I have got working present the data in a new page.  I mean if I ask for variables in a HTML form and submit it, the data returned goes into a new page.

I want to get that data back into the page I started from or at least make it look like it is in the same page.  

I can get it to work with PHP, because PHP lets you mesh the PHP code in with the HTML, but that dosen't seem to be the case with Perl.  I just found out about Mason, is that what I should be using here to do this?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Macane
Macane

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I forgot about the html part, but it should be a simple task to create a search sentence when you got the transfer of variables from page to page going.

for instance.

$searchstring = "SELECT * FROM TABLE WHERE LASTNAME=$lastname"

Or whatever you need todo with the variables.