c q
09-14-2002, 06:26 PM
Forms
simple html forms question this....
What I'm tryiing to create is a wordlist with synonyms and antonyms; all entered by the user. Here's some code I made...
<form action=word.php?target=add method=POST>
<input type=text name=word>
<textarea name=meaning>
<br><br>
<!---here's the problem code----->
<input type=text name=antonym>
<input type=submit value=add>
<SELECT NAME=antonymslist MULTIPLE>
<OPTION value=antonymslist[1]>sddf </OPTION>
<OPTION value=antonymslist[2]>asaf </OPTION>
<OPTION value=antonymsliist[3]>sddfa </OPTION>
</SELECT>
<input type=text name=synonym>
<input type=submit value=add>
<SELECT NAME=synonymslist MULTIPLE>
<OPTION value=synonymslist[1]>sddf </OPTION>
<OPTION value=synonymslist[2]>asaf </OPTION>
<OPTION value=synonymsliist[3]>sddfa </OPTION>
</SELECT>
<!-----end of problem code lol ---->
<br>
<input type="submit" value=submit>
</form>
the approach is probably that each time the user enters an antonym in the text field "antonym" and hits the "add" button, that antonym is added to an array the elements of which are shown in the "antonymslist" field.
and finally when the form is submitted, all that gets submitted is the elements from "word" "meaning" and the arrays "synonymslist" and "antonymslist", that with the final submit button. what do I do about this ???????
simple html forms question this....
What I'm tryiing to create is a wordlist with synonyms and antonyms; all entered by the user. Here's some code I made...
<form action=word.php?target=add method=POST>
<input type=text name=word>
<textarea name=meaning>
<br><br>
<!---here's the problem code----->
<input type=text name=antonym>
<input type=submit value=add>
<SELECT NAME=antonymslist MULTIPLE>
<OPTION value=antonymslist[1]>sddf </OPTION>
<OPTION value=antonymslist[2]>asaf </OPTION>
<OPTION value=antonymsliist[3]>sddfa </OPTION>
</SELECT>
<input type=text name=synonym>
<input type=submit value=add>
<SELECT NAME=synonymslist MULTIPLE>
<OPTION value=synonymslist[1]>sddf </OPTION>
<OPTION value=synonymslist[2]>asaf </OPTION>
<OPTION value=synonymsliist[3]>sddfa </OPTION>
</SELECT>
<!-----end of problem code lol ---->
<br>
<input type="submit" value=submit>
</form>
the approach is probably that each time the user enters an antonym in the text field "antonym" and hits the "add" button, that antonym is added to an array the elements of which are shown in the "antonymslist" field.
and finally when the form is submitted, all that gets submitted is the elements from "word" "meaning" and the arrays "synonymslist" and "antonymslist", that with the final submit button. what do I do about this ???????