Jump to content

Parse error: syntax error, unexpected T_IF in C:\xampp\htdocs\admin\updates_deta


Danny620

Recommended Posts

Parse error: syntax error, unexpected T_IF in C:\xampp\htdocs\admin\updates_details.php on line 278

 

while ($data = mysqli_fetch_array($r, MYSQLI_ASSOC)) {
echo '<table width="100%" border="1" cellpadding="5" cellspacing="5">
  <tr>
    <td width="11%"><strong>Download</strong></td>
    <td width="34%"><strong>Update By: ' . $data['update_by'] . '</strong></td>
    <td width="48%"><strong>Date Created:</strong> ' . $data['dr'] . '</td>
    <td width="7%"><a href="delete.php?item=update&id=' . $data['update_id'] . '"><img src="../images/delete-icon.png" width="24" height="24" alt="delete" /></a></td>
  </tr>
  <tr>
    <td colspan="4">File: ' . if($data['file'] == 'Yes'){ $data['file']; } . 'Click Here to Download</td>
  </tr>
  <tr>
    <td colspan="4"><p>' . $data['update_msg'] . '</p></td>
    </tr>
</table>';
} // End of WHILE loop.

Link to comment
Share on other sites

while ($data = mysqli_fetch_array($r, MYSQLI_ASSOC)) {
$temp = '<table width="100%" border="1" cellpadding="5" cellspacing="5">
  <tr>
    <td width="11%"><strong>Download</strong></td>
    <td width="34%"><strong>Update By: ' . $data['update_by'] . '</strong></td>
    <td width="48%"><strong>Date Created:</strong> ' . $data['dr'] . '</td>
    <td width="7%"><a href="delete.php?item=update&id=' . $data['update_id'] . '"><img src="../images/delete-icon.png" width="24" height="24" alt="delete" /></a></td>
  </tr>
  <tr>
    <td colspan="4">File: ';
if($data['file'] == 'Yes'){$temp .= $data['file']; } 
$temp.= 'Click Here to Download</td>
  </tr>
  <tr>
    <td colspan="4"><p>' . $data['update_msg'] . '</p></td>
    </tr>
</table>';
echo $temp;
} // End of WHILE loop.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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