• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

if logic inside php

<h1>Recurring payment info:</h1>
<p> '.$recurring_info.' </p>

I need this:

if $recurring_info=!"" :
<h1>Recurring payment info:</h1>
<p> '.$recurring_info.' </p>
<?php
$body_admon ='

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

</head>

<body>


<h1>Admin Order Confirmation</h1>

<p>Order Date: '.$order_date.' </p>
<h1>Credit Card Info:</h1>
<p>
<b>Credit Card number:</b> '.$hidden_card .'
<br>
<b>'.$ptype.':</b> <i>$'.$amount.'</i><br>

<h1>Recurring payment info:</h1>
<p> '.$recurring_info.' </p>


<h1>Tribute info:</h1>
<p> '.$tribute_info.' </p>

<h1>Donor info:</h1>
<p> '.$donor_info.' </p>
<h1>Please direct my gift to:</h1>
<p> '.$donation_to.' </p>
<h1>Additional information:</h1>
<p> '.$other_to.' </p>
</body>
</html>

';?>

Open in new window

0
phillystyle123
Asked:
phillystyle123
  • 2
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
I think this will work.
<?php
$body_admon ='

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

</head>

<body>


<h1>Admin Order Confirmation</h1>

<p>Order Date: '.$order_date.' </p>
<h1>Credit Card Info:</h1>
<p>
<b>Credit Card number:</b> '.$hidden_card .'
<br>
<b>'.$ptype.':</b> <i>$'.$amount.'</i><br>';

if ($recurring_info!="") {
$body_admon .='<h1>Recurring payment info:</h1>
<p> '.$recurring_info.' </p>';
}

$body_admon .='
<h1>Tribute info:</h1>
<p> '.$tribute_info.' </p>

<h1>Donor info:</h1>
<p> '.$donor_info.' </p>
<h1>Please direct my gift to:</h1>
<p> '.$donation_to.' </p>
<h1>Additional information:</h1>
<p> '.$other_to.' </p>
</body>
</html>

';?>

Open in new window

0
 
phillystyle123Author Commented:
thanks-much appreciated
0
 
Dave BaldwinFixer of ProblemsCommented:
You're welcome, thanks for the points.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now