![]() |
isset() help
im just wondering but why won't this isset() function not working? it still inerts the values nito my MySQL database even if the comment box isnt filled out. and thanks!
here's my code: :
<?php |
Re: isset() help
The variable is set but it's empty. Try using the is_empty function
|
Re: isset() help
Someone should probably edit his post to censor his MySQL password. Just because it's localhost doesn't necessarily mean its safe.
|
Re: isset() help
Quote:
|
Re: isset() help
Thank goodness. ^_^
You had me worried. And while I'm here, to elaborate on kruptof's well-spotted catch: isset only checks to see if the variable exists. It's useful to stop a user from directly accessing the .php script (where no post data is being sent). In such an event, isset will return false for any corresponding $_POST keys. |
Re: isset() help
Quote:
ok now wth? i cant use print,echo, or die... :( |
Re: isset() help
ok i figured out why lol. all i had to do was just change it to: if ($_POST['comment']==false)
hahhah wow. |
Re: isset() help
Quote:
|
Re: isset() help
Quote:
|
| All times are GMT -5. The time now is 3:39 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC