Jump to content

What's wrong with this?


kenny724

Recommended Posts

 

What's wrong with this statement? It works with the md_date_string...., but there is not always an other...so if the other is blank then it needs not to show.

 

if($md_date_string != "") && ($other_name_string != "")
   {
echo '
<tr>
   <td><br /><center><b>TREATMENT TEAM SIGNATURES</b></center>
      <table border="0" width="100%">
         <tr><td colspan="2"><b>Services ordered are Appropriate—See SMI/SED for additional explanation</b></td></tr>
         <tr>
            <td valign="bottom">'. $md_sig. '<hr />Psychiatrist: '. $md_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
         <tr>
            <td valign="bottom">'. $case_manager_sig. '<hr />Case Manager: '. $case_manager_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
	 <tr>
            <td valign="bottom">'. $therapist_sig. '<hr />Therapist: '. $therapist_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
         <tr>
            <td valign="bottom">'. $activity_therapist_sig. '<hr />Activity Therapist: '. $activity_therapist_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
	 <tr>
            <td valign="bottom">'. $other_sig. '<hr />Other: '. $other_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
	 <tr>
			<td colspan="2"><br />NEXT TREATMENT PLAN REVIEW: <font class="dbd">$next_review</font></td>
		</tr>
      </table>   
   </td>
</tr>'; }


elseif ($md_date_string = "") && ($other_name_string != "") {

echo '
<tr>
   <td><br /><center><b>TREATMENT TEAM SIGNATURES</b></center>
      <table border="0" width="100%">
         <tr><td colspan="2"><b>Services ordered are Appropriate—See SMI/SED for additional explanation</b></td></tr>
         <tr>
            <td valign="bottom"><hr />Psychiatrist: '. $md_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
         <tr>
            <td valign="bottom"><hr />Case Manager: '. $case_manager_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
	 <tr>
            <td valign="bottom"><hr />Therapist: '. $therapist_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
         <tr>
            <td valign="bottom"><hr />Activity Therapist: '. $activity_therapist_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
	 <tr>
            <td valign="bottom"><hr />Other: '. $other_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
	 <tr>
			<td colspan="2"><br />NEXT TREATMENT PLAN REVIEW: <font class="dbd">$next_review</font></td>
		</tr>
      </table>   
   </td>
</tr>'; }

elseif ($md_date_string = "") && ($other_name_string = "")

echo '
<tr>
   <td><br /><center><b>TREATMENT TEAM SIGNATURES</b></center>
      <table border="0" width="100%">
         <tr><td colspan="2"><b>Services ordered are Appropriate—See SMI/SED for additional explanation</b></td></tr>
         <tr>
            <td valign="bottom"><hr />Psychiatrist: '. $md_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
         <tr>
            <td valign="bottom"><hr />Case Manager: '. $case_manager_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
	 <tr>
            <td valign="bottom"><hr />Therapist: '. $therapist_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
         <tr>
            <td valign="bottom"><hr />Activity Therapist: '. $activity_therapist_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
	 <tr>
			<td colspan="2"><br />NEXT TREATMENT PLAN REVIEW: <font class="dbd">$next_review</font></td>
		</tr>
      </table>   
   </td>
</tr>'; }

else 
{
echo '
<tr>
   <td><br /><center><b>TREATMENT TEAM SIGNATURES</b></center>
      <table border="0" width="100%">
         <tr><td colspan="2"><b>Services ordered are Appropriate—See SMI/SED for additional explanation</b></td></tr>
         <tr>
            <td valign="bottom">'. $md_sig. '<hr />Psychiatrist: '. $md_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
         <tr>
            <td valign="bottom">'. $case_manager_sig. '<hr />Case Manager: '. $case_manager_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
	 <tr>
            <td valign="bottom">'. $therapist_sig. '<hr />Therapist: '. $therapist_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
         <tr>
            <td valign="bottom">'. $activity_therapist_sig. '<hr />Activity Therapist: '. $activity_therapist_name_string. '</td>
            <td valign="bottom">'. $md_date_string. '<hr />Date:</td>
         </tr>
	 <tr>
			<td colspan="2"><br />NEXT TREATMENT PLAN REVIEW: <font class="dbd">$next_review</font></td>
		</tr>
      </table>   
   </td>
</tr>'; }
}

Link to comment
Share on other sites

Got it fixed. Thanks.

 

I need to put a break in heredoc...I thought this would work, but it isn't. Any comments? Thanks.

$frm_str = <<<EOP <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>   

*alot of *stuff*

</html>
EOP;
$message .= $frm_str;

if(($md_date_string != "") && ($other_name_string != ""))
   {
echo '
<tr> 

what I need in the middle

}

$frm_str = <<<EOP
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> second part
</html>
EOP;

$message .= $frm_str;


}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.