Solved

I need a script which will search a value from a database file...

Posted on 1997-12-08
4
140 Views
Last Modified: 2013-12-25
I am a complete HTML novice.  I need a script which will allow the user on my web page to enter in a value from the database then look it up in the database and return all of the pertinent data.  I thought this could be done with javascript, but apparently, it can't.  Can anyone tell me where I could find a script to do this?...There is no way I could code it myself.
0
Comment
Question by:wbassett
4 Comments
 
LVL 6

Expert Comment

by:alamo
ID: 1831595
Does your account have the ability to run CGI scripts? (Most don't).
Is perl installed on your server, so a perl script would do it?

Your basic problem sounds pretty straightforward, it's just figuring out what your options are and then getting it set up that's tricky :-)
0
 

Expert Comment

by:aurelio
ID: 1831596
Alamo is right. You must post more information for us.
The steps you must follow are aomething like this :

1) get the user key values via <FORM ACTION="<cgi script or exe program>" METHOD="POST">  or similar , CLIENT side.
2) get those values in your cgi script or exe program (SERVER side) and translate them (CONTENT_LENGTH and read stdin .. all that stuff)
3) search your database (SERVER side) .
4) return the results by "painting" them (printing html from your cgi script ot exe program , considering your info is in $RESULT , something like :
echo "Content type: text/html\n\n<html><head><title></title>"
echo "<head><body>"
echo "RESULTS FROM SEARCH : <br>"
echo "$RESULT <br>"
echo "</body></html>\n"
First time you do it , it´s a little complicated , but once you catch the thing it´s easy. The real programs of course are fairly more complicated than the above lines , which sould be considered merely as an example ; there  isn´t any "standard" script which do what you want . In most cases , you must code it by hand. There is a good example in "database cgi programming" "sky coyote home page" "sky@intergalact.com" . (sorry, donna page exact address) .
0
 

Accepted Solution

by:
mikal120797 earned 120 total points
ID: 1831597
Apart from what server you are running, what flavour database are you running??? This is important too, because chances are there is a standard script to do what you want.

Check out the standard scripts at Yahoo:
http://www.yahoo.com/text/Computers_and_Internet/Internet/World_Wide_Web/CGI___Common_Gateway_Interface/
0
 

Author Comment

by:wbassett
ID: 1831598
The database file I want to use could be as simple as a comma delimitted (or tab delimitted) file with say 10 rows of data.  My isp wilol allow me to run a perl cgi script, if that is what you are wondering.  I have looked around for a "standard script", and  it is either isn't out there, or I am not looking in the right places...or thoroughly enough.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question