Hi everyone,
I am rewriting a basic "email data to administrator" script to include an error check, which will ensure that all fields are filled with at least some data.
However, there is a problem (almost certainly a coding error on my part). I divided the script into subroutines to make it easier to understand and my logic seems to have stuffed up somewhere.
The code looks like this: Code Attached in program.pl.txt
What appears to be happening is that the parameters are NOT being read from the web page; when I put a line into the HTML page at the end to show the contents of $username, $address, $fullname and $sender, they all came up as blank (not undef, just blank).
So it seems that there is either a logic error or a script error.
The relevent part of the shtml page:
The exact same HTML is used in the existing activation page, and the Perl is pretty similar too. What am I doing wrong?
Thanks!
David
I am rewriting a basic "email data to administrator" script to include an error check, which will ensure that all fields are filled with at least some data.
However, there is a problem (almost certainly a coding error on my part). I divided the script into subroutines to make it easier to understand and my logic seems to have stuffed up somewhere.
The code looks like this: Code Attached in program.pl.txt
What appears to be happening is that the parameters are NOT being read from the web page; when I put a line into the HTML page at the end to show the contents of $username, $address, $fullname and $sender, they all came up as blank (not undef, just blank).
So it seems that there is either a logic error or a script error.
The relevent part of the shtml page:
Code:
<form method="post" onsubmit="return checkform()" action="/cgi-bin/activate_v2.pl" > <input type="hidden" id="ip" value="127.0.0.1" /> <p><table> <tr> <td>Full Name:</td> <td><input type="text" id="fullname" size="31" /></td> </tr> <tr> <td>Street Address:</td> <td><input type="text" id="address" size="31" /></td> </tr> <tr> <td>Email Address:</td> <td><input type="text" id="email" size="31" /></td> </tr> <tr> <td>Website User Name: </td> <td><input type="text" id="username" size="31" /></td> </tr> </table></p> <p><button type="submit">Submit</button></p> </form>
Thanks!
David
Comment