Jump to content

Wont display branch name!!


sblake161189

Recommended Posts

Hi Guys,

 

I have a php mail script that calculates a branch to send it to dependant on the postcode which works fine as it goes to the right email and when I echo the script to show branch name it comes up with the correct branch name. However when you open the email I cannot get it to display the 'branch name'. It will display all the other bits of information that has been 'posted' from the form. But wont display the branch name form an sql database table.

 

The code below proves that it finds the branch name.

 

while($row = mysql_fetch_array( $result )) {
$ter = $row['Ter'];
$branchemail = $row['BranchEmail'];
$branchname = $row['BranchName'];
} 

 

This is the PHP Mail in HTML part below

 

<td bgcolor=#FFFFFF bordercolor=#666666 valign=top>' . ( $row['BranchName']) . '</td>

 

But when the email comes through the branch name is always blank. However on this page I can get it to echo the branch name and it displays the branch name and also emails to the branch email address.

 

Any ideas why it doesn't work.

 

Cheers, S

 

 

Link to comment
https://forums.phpfreaks.com/topic/226468-wont-display-branch-name/
Share on other sites

see how the line of html you posted is oddly colored? that often indicates broken or missing elements. values in HTML tags should always be quoted or double-quoted.

 

echo '<td bgcolor="#FFFFFF" bordercolor="#666666" valign="top">' . strip_tags($_POST['comments']) . '</td>';

Archived

This topic is now archived and is closed to further replies.

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