I have the following code that does what I want it to do, but the ones with the backslashes <?php echo $row['t_id']; ?>
, the <?php echo $row['t_type']; ?>
and the <?php echo ucfirst$row['t_fn']).' '.ucfirst($row['t_ln']); ?>
do not output their respective variable.
Instead, their output is literal like
view_t_profile.php?tutor_id=<?php echo $row['t_id']; ?>&t_type=<?php echo $row['t_type']; ?>
The <?php echo ucfirst$row['t_fn']).' '.ucfirst($row['t_ln']); ?>
doesn't show up on the web page like the previous code, but its in the code italicized and in red text. I'm not a programmer/coder, so if someone can correct my code, I sure would appreciate it. Usually, I can figure it out, but on this one, I cannot.
<?php
if($row['t_type'] == 1)
{
echo '<center><strong><font color="#3BB9FF"><a href="view_t_profile.php?t_id=<?php echo $row['t_id']; ?>&t_type=<?php echo $row['t_type']; ?>" class="cls" target="_blank"><br />View Profile</a></font></strong></center>';
echo '<center><strong>Main Contact</strong></center>';
echo '<center><strong><font color="#3BB9FF"><?php echo ucfirst$row['t_fn']).' '.ucfirst($row['t_ln']); ?></font></strong></center>';
}
if($row['t_type'] == 0)
{
echo '<center><strong><font color="#3BB9FF"><a href="view_t_profile.php?t_id=<?php echo $row['t_id']; ?>&t_type=<?php echo $row['t_type']; ?>" class="cls" target="_blank"><br />View Profile</a></font></strong></center>';
echo '<center><strong>Main Sponsor</strong></center>';
echo '<center><strong><font color="#3BB9FF"><?php echo ucfirst$row['t_fn']).' '.ucfirst($row['t_ln']); ?></font></strong></center>';
}
?>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…