Status Messages

Assumptions

  • $status_message is string containing text of message
  • $message_str in heredoc for browser output
  • errmsg is CSS class for p elements

php

  if ( $status_message == "" || !isset($status_message) ) {
    $message_str = "";
  } else {
    $message_str = "<p class=\"errmsg\">$status_message</p>";
  }

css

p.errmsg {
  color: #ff0600;
}
Advertisements

About samehramzylabib

See About on https://samehramzylabib.wordpress.com
This entry was posted in Code for View, Coding and tagged , , , . Bookmark the permalink.