Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Collapseable list of URLs. 10 100
Convert OverPunch 25 57
how to remove speical characters from a file name 8 55
scripting, exchange 35 40
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

747 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

16 Experts available now in Live!

Get 1:1 Help Now