No replies
kaymac
Offline
newbie
Last seen: 7 years 25 weeks ago
Timezone: GMT-5
Joined: 2011-12-29
Posts: 3
Points: 6

Hello

I have attached a part of my code that I am having difficulty getting to work.

I am reading a field from my database to see if a link to an image is present, and if it is, then I want to display the image.

If not, then I have some code that allows the user to draw in their signature.

I thought my code would work, but it isn't showing up.

Thanks

      <br/>
       <table border="0" class="table-inner">
       <tr>
             <td width="10">&nbsp;</td>
 
             <td width="160">
             <!-- (2) INITIAL - DAMAGES -->
            <?php
               $sQuery    = "SELECT * FROM signatures WHERE `web-order-num` = \"$sWebOrderNum\" ";
               $iResult   = mysql_query ($sQuery);
               $iRow      = mysql_fetch_assoc($iResult);
               $sTempDmg  = $iRow["initial-damages"];
 
               if (strlen($sTempDmg) > 0)
               {
                 $sTempImg = IMAGE_PATH . $sTempDmg;
                 print ("<img src='$sTempImg' />");
               }
               else
               {
             ?>
              <div id='ctlSignatureDamages_Container' style='width:130px;height:50px;margin:0px;'>
                <script language="javascript" type="text/javascript">
                    var ieVer = getInternetExplorerVersion();
                    if (isIE) 
                    {
                        if (ieVer >= 9.0)
                            isIE = false;
                    }
 
                    if (isIE) 
                   {
                        document.write("<div ID='ctlSignatureDamages' name='ctlSignatureDamages' 
                       style='width:130px;height:50px;border:Dashed 2px #DDDDDD'; z-index:9999'></div>");
                   }
                    else 
                   {
                        document.write("<canvas ID='ctlSignatureDamages' name='ctlSignatureDamages' 
                        width='130' height='50'></canvas>");
                    }
                 </script>
               </div>  
           <?php
             }
           ?>
             </td>
 
             <td align="left" valign="top">
             <b><u>Damages (Pets & Kids) (initial at left)</u></b>
             <br/>
             Our Company holds no responsibility for damage in and around the work site.
             Please keep kids and animals inside or away from our active work site.<br/>
             We will inform you of the scheduling.
             </td>
 
             <td width="10">&nbsp;</td>
       </tr>

[Moved, as not a css question. ~gt/mod]