Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 5th, 2007, 11:33 PM
Registered User
 
Join Date: Jun 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default show an error if not checked

I make a system, and one of the function is submit the value of checkbox.
The submitting is success.
The problem is I don't know how to show the error if no checkbox is checked...plz help me...
Reply With Quote
  #2 (permalink)  
Old June 6th, 2007, 05:07 AM
Authorized User
 
Join Date: Mar 2005
Location: , , India.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to pritz Send a message via Yahoo to pritz
Default

Hi,

in form
<input type="checkbox" name="checkme" value="user1">User1

when you will submit
if(isset($_POST))
{
if(empty($_POST['checkme']))
{
echo 'forgot to click me';
}
else
{
print_r($_POST);
}

}

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does it show error C2228? cupido Visual C++ 2 March 22nd, 2008 10:38 PM
Why does it show Link error 2001? Jams Visual C++ 2 July 10th, 2007 05:15 AM
With Me .Show() I get error "end of statement exp kenn_rosie VS.NET 2002/2003 1 March 20th, 2006 09:12 PM
Why does the SQL show error? gilgalbiblewheel Classic ASP Databases 11 October 18th, 2004 07:17 AM



All times are GMT -4. The time now is 01:40 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.