Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 1997-12-08
4
Medium Priority
?
149 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

DFW AZURE MEETUP TONIGHT FRI 6PM

We will be discussing what Azure Stack is, how does it fit into the suit of offerings that Azure has currently, and where can it fit into your organizations technology stack. We will also be discussing limitations of the platform while covering various applicable scenarios.

Question has a verified solution.

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

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…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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…

715 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