Coder456
02-19-2003, 08:07 PM
I have just begun my first project using cgi and I'm having some trouble that I hope someone can help me out with...
I have a basic HTML page to test the function user input
<html>
<head>
<title>Page</title>
</head>
<body>
<center>
<h1>Page</h1>
<hr>
<FORM
ACTION="/cgi-bin/mod.exe" METHOD="post">
NUMBER:<br>
<INPUT name="number" maxlength="16" size="16">
<br><br>
<INPUT type="submit" value ="Send">
</form>
</center>
</body>
</html>
the source for mod.exe is this(VB Code):
Option Explicit
Dim Number As String
Sub CGI_Main()
Number = Trim(GetSmallField("number"))
End Sub
Sub inter_main()
MsgBox Number
End Sub
and I'm using cgi32.bas
when I run the html and submit with any value in the box, i get a message box with a blank space, which means 2 things,
1. Number has value = ""
2. sub inter_main is called even though, as far as i know it, it should only be called when the exe is run from something other than an html.
Moving the msgbox line of code to below the "number =" line has the same effect.
Not sure why the number string has no value, after get small field has been called.
Thanks for any help you can give!
-Coder456
I have a basic HTML page to test the function user input
<html>
<head>
<title>Page</title>
</head>
<body>
<center>
<h1>Page</h1>
<hr>
<FORM
ACTION="/cgi-bin/mod.exe" METHOD="post">
NUMBER:<br>
<INPUT name="number" maxlength="16" size="16">
<br><br>
<INPUT type="submit" value ="Send">
</form>
</center>
</body>
</html>
the source for mod.exe is this(VB Code):
Option Explicit
Dim Number As String
Sub CGI_Main()
Number = Trim(GetSmallField("number"))
End Sub
Sub inter_main()
MsgBox Number
End Sub
and I'm using cgi32.bas
when I run the html and submit with any value in the box, i get a message box with a blank space, which means 2 things,
1. Number has value = ""
2. sub inter_main is called even though, as far as i know it, it should only be called when the exe is run from something other than an html.
Moving the msgbox line of code to below the "number =" line has the same effect.
Not sure why the number string has no value, after get small field has been called.
Thanks for any help you can give!
-Coder456