Solved

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

Posted on 1997-12-08
4
139 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now