Jump to content

mr.noname

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

mr.noname's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. you can check empty value for any image field before insert to your database and this is the best practice
  2. Thank so much chrsm and rythemton is it not have the default value because php has a loosely typed language
  3. in my opinion the NULL is not assign anything to the variable and most of default value are EMPTY value so if check it by empty() it return TRUE but if check by is_null() it should be return FALSE $a = NULL; // i think $a will not keep anything $b; // it assign to the default value --> i think it must be the empty value
  4. you can use the default value for example $message = "you default value"; include("some_process_file_that_change_behavior_of_message_var.php"); //follow you code check here hope it help
  5. sorry requinix for the my mistake and thank you for you suggestion for the next post i will carefully review
  6. please reforrmatting your code normaly mysql_fetch_array() is try to get the result from the given resource so if there are empty result, it will thrown out some warning
  7. in the code example the $recipients and $bcc argument MUST BE an array so if the $recipients and $bcc is not an array you will get some warning message well, if this is the codeigniter ( i think it is codeigniter ) the insert line is corrected *** make sure *** in your code example the recipient will always replace by bcc id before save if you pass $bcc into a function
  8. i think ( i'm not sure ) you sql is specify all row that mpid contain 6 so the if expression must be alway true except if you get the empty result
  9. sorry for this is the example [/td] [td]empty() isset() is_null() 0 TRUE TRUE FALSE 0.0 TRUE TRUE FALSE "0" TRUE TRUE FALSE "" TRUE TRUE FALSE " " FALSE TRUE FALSE NULL TRUE FALSE TRUE FALSE TRUE TRUE FALSE array() TRUE TRUE FALSE
  10. let's check this for example if the variable assign to this value 0 ----> number 0 "0" ----> string 0 "" ----> empty string " " ----> string with whitespace 0.0 ----> double value array() ----> empty array NULL ----> null value FALSE -----> boolean false if use empty() ----> will return TRUE is_null() ---> return TRUE on NULL value isset() ---> all above are TRUE except FALSE and NULL value
  11. use this if( empty($str['comment']['email']) ) { // do something if empty value } else { // if not empty }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.