php - when all fields are empty, echo and exit - by newbie -


please tell me needs done, avoid message:

parse error: syntax error, unexpected $end in /xxxx/xxxxxxx/public_html/contact-    it/feedback.php on line xxx (the last line of feedback.php = ?>) 

thanks hint.

if(empty($data_start)) {      if(empty($data_end)) {          if(empty($comment)) {          # empty  echo "you have not specified details submit us";     exit ;  ?> 

you missing closing curly braces:

if(empty($data_start)) {      if(empty($data_end)) {          if(empty($comment)) {          # empty  echo "you have not specified details submit us";     exit(); }}} 

you should re-factor code this:

if(empty($data_start) && empty($data_end) && empty($comment)){     exit("you have not specified details submit us"); } 

more info:


Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -