<tr>
<td class="atthetop">Display from : </td>
<!-- get the date from the recordset -->
<td><?php $date=new DateTime($row_Recordset1['event_entered']);
echo $date->format('d-M-Y') ?>
</td>
</tr>
<tr>
<td class="atthetop">to:</td>
<!-- add a period of months to the date -->
<td><?php $date->add(new DateInterval('P'.($row_Recordset1['event_expiry']).'M'));
echo $date->format('d-M-Y');?>
</td>
</tr>
<tr>
<td class="atthetop">For :</td>
<td><?php echo $row_Recordset1['event_expiry']." Months"; ?> </td>
</tr>
<tr>
<td class="atthetop">Entered :</td><!--/format the date and print it with the time-->
<td><?php $date=new DateTime($row_Recordset1['event_entered']);
echo $date->format('d-M-Y-\a\t h:i') ?></td>
</tr>
Above is a section of code that displays perfectly well in live view and in a browser when I use it on my own machine.
However, when I upload it to my website, it only displays the page down to where the smily is.
I assumed that the error is due to a small difference in the php variants, but it could also be something that is wrong with my code.
Can anyone help?
I am using Xamp 2.5 on my home machine. The web server is using php version 6 but version 5 is also enabled.
Its all written in html5 and php.