Specify ID attribute and use that. Blaine <apelouperdeu@xxxxxxxxx> wrote: <? print "this is what come into request ( get + post ) <br/>\n" print_r( $_REQUEST ); print "this is what come into get<br/>\n" print_r( $_GET ); print "this is what come into post<br/>\n" print_r( $_POST); ?> On Fri, Feb 29, 2008 at 10:04 AM, Sudhakar <finals27@xxxxxxxxx> wrote: > i am using a self submitting form > > <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" > id="test2" name="test1"> > > i need to do a validation of textfields, checkboxes, radio buttons > > i am able to read, display and validate textfields after the form > has been submitted however i am getting an error for > > checkbox and radio buttons. > > code for textfields > > username <input type="text" name="username" value="<?php echo > ($username) ; ?>" /> > > $username = htmlentities($_POST["username"]); > > if($username == "") { $error.=" enter username <br />"; } > > for checkboxes and radio buttons i am getting > "Notice: Undefined index: checkboxname " for checkbox > "Notice: Undefined index: radiobuttonname " for radio button > > presently the code for checkbox and radio button is > > <input type="checkbox" name="cbox" value="abc" /> > > $deposit = $_POST["cbox"]; > > <input type="radio" name="radioname" value="one"> one > <input type="radio" name="radioname" value="two"> two > > $radioname = $_POST["radioname"]; > > i have tried cbox[] radioname[] however i keep getting > "Notice: Undefined index: cbox " and "Notice: Undefined index: > radioname " > for checkbox and radio button > > please advice. > > thanks. > > > -- O Blaine - What the developing /|\ should'nt have been | thiagomata.blog.com / \ [Non-text portions of this message have been removed] Regards, Shaikh M. Zaid Lead Engineering | GlobalLogic India P: +91-120-4342000 Ex. 3813 C: +91-9999436854 http://www.globallogic.com http://www.globallogic.com/email_disclaimer.txt --------------------------------- Looking for last minute shopping deals? Find them fast with Yahoo! Search. [Non-text portions of this message have been removed]