Solved

Executive SQL command in CGI

Posted on 1999-01-27
5
222 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

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…
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
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)
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…

831 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