Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 1997-12-08
4
Medium Priority
?
152 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 480 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
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 while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
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)
Suggested Courses

876 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