Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 5th, 2007, 11:33 PM
Registered User
 
Join Date: Jun 2007
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...
 
Old June 6th, 2007, 05:07 AM
Authorized User
 
Join Date: Mar 2005
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);
}

}






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





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