Html form checkbox undefined behavior
I have the html code below:
<html>
<head><title>OPTIONS</title></head>
<body>
<p>Choose schedule to generate:</p>
<form action='cgi-bin/mp1b.cgi'>
<input type=checkbox name='tfield' value=on />Teacher<input type=text
name=teacher value=""/><br>
<input type=checkbox name='sfield' value=on />Subject<input type=text
name=subject value=""/><br>
<input type=checkbox name='rfield' value=on />Room<input type=text
name=room value=""/><br>
<input type=submit value="Generate Schedule"/>
</form>
</body>
</html>
The problem is: Whenever I type in one of those text spaces and use my C
CGI script to parse it, it gives me the right output which. But whenever I
checked one of the checkboxes, it seems to delete the string inputted in
the text space corresponding to it. For example, when I check
name='tfield' and write a string to the text name=teacher , it doesn't
give me the output for the name=teacher. What could be the possible
problem in this one? Thanks!
No comments:
Post a Comment