| re: CGI - Accessing form parameters broken
AS you requested, the html code....
[HTML]
<html>
<head>
<title>FEEDBACK</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
#enterName {
visibility: hidden;
padding-left: 50px;
}
</style>
<script type="text/javascript" src="./SDFJASJF;;DSKFSJDFASJSD;KJAF/form.js"></script>
</head>
<body bgcolor="#EEEEEE"> <center>
<table width=80 border=1 cellspacing=0 cellpadding=0><tr><td>
<p><font size="6" color=blue><b><center> Wiser words</b></font><br>
<center> <p><font color=violet size=2><SCRIPT LANGUAGE="JavaScript">var now = new Date();
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thu rsday','Friday','Saturday');
var months = new Array('January','February','March','April','May',' June','July','August','September','October','Novem ber','December');
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;
}
//join
today = days[now.getDay()] + ", " +
months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear())) ;
document.write(today);</script>
</p>
<hr width="50%" align="center">
<form method="post" enctype="text/plain" action="/cgi/todo.pl" name="enableform" onSubmit="return disableForm(this);">
<table align=center border=0 cellpadding=1 width=30% cellspacing=1>
<td><tr><font size=2 color=green><center>
Do you wish to be contacted? <font size=1.5 color=red>*</font>
<input type="radio" name="enable" value="agree" onclick="agree2();">Yes, I wish to be contacted!
<div id="enterName">Please enter your name: <input type=text id="box" name="name" value=""></div>
<input type="radio" name="enable" value="disagree" onclick="disagree();" checked>No, I wish to be anonyous!
<br><br>
<table align=center border=0 cellpadding=0 width=35% cellspacing=1>
<td><tr><center> Purpose: <font size=1.5 color=red>*</font>
</td></tr></table>
<table align=center border=0 cellpadding=1 width=30% cellspacing=1>
<td><tr><center>
<input type="radio" name="Purpuse" value="Complaint"> Complaint<br>
<input type="radio" name="Purpuse" value="Suggestion" checked> Suggestion
</tr></td></table>
<hr width=50% align="center">
<table align=center border=0 cellpadding=1 width=30% cellspacing=1>
<td><tr><center><p>Comments: <font size=1.5 color=red>* </font>
</tr></td></table>
<textarea name="Wisdom" cols="60" wrap="ON" rows="10"></textarea>
<p><p>
<table width="50%" border="5" cellpadding="10">
<tr>
<td>
<div align="center">
<input type="submit" name="done" value="Send!" onmouseover="goSubmit()" onmouseout="this.value='Send!'">
</div>
</td>
<td>
<div align="center"> <center>
<input type="reset" name="Reset" value="Reset">
</div></tr>
</table>
<font color=red><h6>Fields with an * are required!</h6></font>
</form>
</tr></td></table>
</body>
</html>
[/HTML]
I've also added the perl code to the above perl code.....
#Test lines begin
print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";
print $body;
I checked a couple of our developer scripts at work and they have these in the code.....
print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";
Even with them, I still have the variables messed up in the body statement.... Beingthe brain child, I changed the body statments to explude the variables and it still didn't work?
$body = "<html><HEAD><TITLE>Post Mail</TITLE></head><body><p>";
$body .= "<img height\=60 width\=55 src\=\"http\://tuxedo\.capreit\.net/Apps/Documentation/HomeDocumentRepository\.nsf/logo\.JPG\">\n\n";
$body .= "<p><P><font color=blue size=2> Web User wishs to make " . $Purposal \. ."<br>";
$body .= "Name: " . $Employee . '<br>\n";
$body .= " $Con \n";
$body .= " <br> " . $Comments . '<br>\n";
$body .= "<font size=1 color=white>". $ENV{REMOTE_ADDR} \. . " </font><br>\n";
$body .= "<H6> Have a nice day!! </H6> \n";
$body .= "</BODY></html> \n";
|