Solved

Executive SQL command in CGI

Posted on 1999-01-27
5
221 Views
Last Modified: 2013-12-25
Dear Madam/Sir,

The attached file is my HTML file. In the "comment.exe", I run the SQL command to insert the data to a database. I could check the data had been put in the correspond variables in "comment.exe". Why dos it appear "File Download" windows when run the sub-procedure including the SQL commands?
My email address is csxhuang@yahoo.com

Thanks!

csxhuang

------------------------------------------------------

<html>

<head>
<title>Òâ¼ûÏä</title>
</head>

<body bgcolor="#FFFFFF">
<div align="center"><center>

<table width="612" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td></td>
    <td align="right" valign="top"><form action="/cgi-bin/comment.exe" method="POST">
      <table border="0" width="100%">
        <tr>
          <td valign="top" align="right"><font size="-1">µç×ÓÓʼþÐÅÏä </font></td>
          <td><input type="text" size="30" name="email" maxlength="50"><br>
<spacer type="vertical" size="15">          </td>
        </tr>
        <tr>
          <td valign="top" align="right"><font size="-1">ϵͳƽ̨</font> </td>
          <td><select name="SYSTEM" size="1">
            <option>ϵͳƽ̨ </option>
            <option>MS Windows 3.1 </option>
            <option>MS Windows 95 </option>
            <option>UNIX </option>
            <option>Other </option>
          </select><br>
<spacer type="vertical" size="15">          </td>
        </tr>
        <tr>
          <td valign="top" align="right"><font size="-1">Ö÷Ìâ</font></td>
          <td><input type="text" size="30" name="URL_Subject"><br>
<spacer type="vertical" size="15">          </td>
        </tr>
        <tr>
          <td valign="top" align="left" colspan="2"><font size="-1">½¨ÒéËù¶ÔÍøÒ³ </font></td>
        </tr>
        <tr>
          <td valign="top" align="right"><font face="arial, helvetica" size="-1">URL</font></td>
          <td><input type="text" size="30" name="URL" maxlength="50"><br>
<spacer type="vertical" size="15">          </td>
        </tr>
        <tr>
          <td valign="top" align="right"><font size="-1">½¨Òé</font></td>
          <td><textarea rows="6" cols="25" name="url_comment">
</textarea><br>
<spacer type="vertical" size="9">          </td>
        </tr>
        <tr>
          <td></td>
          <td><input type="submit" name="Submit" Comments" value=" Ìá½» "> <spacer type="vertical" size="12"></td>
        </tr>
      </table>
    </form>
    </td>
  </tr>
</table>
</center></div>
</body>
</html>
0
Comment
Question by:csxhuang
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
MaDdUCK earned 100 total points
ID: 1832429
the directory where your CGI resides has to have execute rights in the file system as well as with the server software. Only then will the cgi be executed instead of downloaded. What server software do you use and what operating system do you run?
0
 

Author Comment

by:csxhuang
ID: 1832430
Dear Dr. MaDdUCK,

Sorry for forget to tell you details! The opearting system is Windows 98, and the Web server is Microsoft FrontPage 98. I put the HTML file in the root, and the "comment.exe" file in cgi-bin.
Could you give me the suggest as soon as possible?
Thanks!!!

csxhuang

0
 
LVL 8

Expert Comment

by:MaDdUCK
ID: 1832431
Okay, there has to be something in Frontpgae to change the settings for the virtual directory cgi-bin. I don't have Frontpage myself so cannot say exactly, but I shall go and look aroung a little. If you can't get this to work I suggest that you deinstall the Frontpage webserver and user Windows 98's Peer Web Services (or Personal Web Server), whatever it is called. This program will have a nice utility where you can configure your cgi-bin correctly.
0
 

Author Comment

by:csxhuang
ID: 1832432
I think you are right. I will try it. I would trouble you again if it is out of order. Thanks a lot! csxhuang
0
 

Author Comment

by:csxhuang
ID: 1832433
Using WebSite 1.1, the problem is disappear. Thanks! csxhuang
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
The viewer will learn how to dynamically set the form action using jQuery.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 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

13 Experts available now in Live!

Get 1:1 Help Now