Whats wrong with this block of code

4 replies
if($_POST['scores']<10){
echo "<tr>
<td align="center" valign="top" bgcolor="#838383" style="background-color:#838383;"><br>
<br>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top"><img src="http://mysite.com" width="600" height="177" style="display:block;"></td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#d3be6c" style="background-color:#d3be6c; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000000; padding:0px 15px 10px 15px;">
<div><img src="http://mysite.com" width="517" height="1"></div>
<div style="font-size:32px; color:#0066CC;"><b>Autogenerated scores mail.. Find your score below</b></div>
<div><img src="http://mysite.com" width="517" height="10"></div>
<div style="font-size:32px; color:#555100;"></div>
<div><br>
<p>Thank you for taking the anxiety test on our site <a href="http://mysite.com ">http://mysite.com</a><br>
recently. Your results are very <strong>positive</strong>. It seems that right now you are free from anxiety and worries. That is fantastic news and you should be proud of yourself.<br>
<br>
<center>
<h3>Your Test Score is ';
$email_message.= $_POST['scores'] .'
</h3>
</center>
</p>
<p>However, \as\ with most people, there has probably been a time in your life where you have felt anxious. It may have been something to do with work, your home life, money worries (like all of us) or something else. <br>
<br>
We all know that Prevention is much better than trying to cure something once you have it. learning how to monitor stress levels and coping with everyday life is something you can do quite easily with a little help.<br>
<br>
I have learnt this the hard way and I can now proudly say that I cope with stress and anxiety, mainly because of a great product called &quot;Panic Away.&quot;</p>
<p><br>
This product is so good that I am offering a great deal for all my readers so you will never have to worry about facing anxious times on your own again.</p>
<p>
<center>
<h3> Grab your copy of panic away right now<br>
http://mysite.com
</h3>
<p><a href="http://mysite.com"><img border="0" src="http://mysite.com"></a></p>
</center>
</p>
<p>We are updating our blog weekly so be sure to check back in often and learn everything you can, knowledge is key.</p>
<p>Thanks;<br>
Desjardins, Jeff<br>
</p>
<br>
<br>
<br>
<br>
<b>
<center>
http://mysite.com
</center>
</b><br>
</div></td>
</tr>
<tr>
<td align="left" valign="top"><img src=http://mysite.com width="600" height="18" style="display:block;"></td>
</tr>
</table>
<br>
<br></td>
</tr>
</table> ";
#block #code #wrong
  • Profile picture of the author LinkUp
    Quotes.

    Try

    if($_POST['scores']<10){

    ?>

    <!-- YOUR HTML -->

    <?

    }
    {{ DiscussionBoard.errors[5735622].message }}
  • Profile picture of the author shantanu
    this is a validation code for the redirection for any other page and got some bugs not at one point but at some other points too.
    {{ DiscussionBoard.errors[5737440].message }}
    • Profile picture of the author Brandon Tanner
      Inside the echo statement, you need to escape each double-quote with a backslash, otherwise php will think your echo statement ends after this...

      echo "<tr>
      <td align="
      Signature

      {{ DiscussionBoard.errors[5737585].message }}

Trending Topics