There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer audio black screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware network networking nvidia outlook outlook 2003 outlook express partition printer problem ram router slow software sound trojan usb video virus vista windows windows vista windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
unable to read checkbox and radio


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
sudhakararaog's Avatar
Computer Specs
Member with 64 posts.
 
Join Date: Sep 2007
Experience: Intermediate
29-Feb-2008, 08:02 AM #1
unable to read checkbox and radio
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.
SNewman's Avatar
Member with 43 posts.
 
Join Date: Feb 2006
Location: New Jersey
Experience: Intermediate
04-Mar-2008, 09:08 AM #2
This post should help you out
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:38 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.