[Solved]:problem with php checks

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mekha
Forum Contributor
Posts: 112
Joined: Sat Mar 31, 2012 6:50 am

[Solved]:problem with php checks

Post by mekha »

hi guys,
how can i make this:?
if the values for example in checkbox is null,i mean if i didnt choose any thing,and i did a submit,how can i prevent mysql to insert something in the table?
Last edited by mekha on Wed Jul 11, 2012 11:52 am, edited 1 time in total.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: problem with php checks

Post by Celauran »

Code: Select all

if (isset($_POST['checkboxname']))
{
    // query goes here
}
Or did I misunderstand your question?
mekha
Forum Contributor
Posts: 112
Joined: Sat Mar 31, 2012 6:50 am

Re: problem with php checks

Post by mekha »

Oh, thank u man !
Post Reply