I have a client with a website made in php who is newly hosted with us. I have no idea why, but after transferring his website on our servers, the Contact us form's php code is visible to the public. I have no idea why that is, and would appreciate to be directed towards a solution.
(Sorry about the ugly display)
example of what is happening on the live website
<?php
if ($error) error_message($error);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form name="form1" method="post" action="index.php?go=sendcontact#chkerr">
<tr valign="top">
<td class="formfield1" width="30%">Name</td>
<td style="padding-bottom: 5px;" width="70%"><input name="name" type="text" size="25" maxlength="50" value="<? echo $_POST["name"] ?>"></td>
</tr>
<tr valign="top">
<td class="formfield1">Phone number</td>
<td style="padding-bottom: 5px;"><input name="phone" type="text" size="25" maxlength="50" value="<? echo $_POST["phone"] ?>"></td>
</tr>
<tr valign="top">
<td class="formfield1">Email address</td>
<td style="padding-bottom: 5px;"><input name="email" type="text" size="25" maxlength="100" value="<? echo $_POST["email"] ?>"></td>
</tr>
<tr valign="top">
<td class="formfield1">How do you prefer to be contacted?</td>
<td style="padding-bottom: 5px;"><input name="contactpref" type="radio" value="Phone"<? if ($POSTED["contactpref"] == "Phone") echo " checked"; ?>> Phone <input name="contactpref" type="radio" value="Email"<? if ($POSTED["contactpref"] == "Email") echo " checked"; ?>> Email</td>
</tr>
<tr valign="top">
<td class="formfield1">How did you find out about Bella Vista?</td>
<td style="padding-bottom: 5px;"><input name="heardfrom" type="text" size="25" maxlength="50" value="<? echo $_POST["heardfrom"] ?>"></td>
</tr>
<tr valign="top">
<td class="formfield1">Please tell us what you're looking for, or if you have any questions.</td>
<td style="padding-bottom: 5px;"><textarea name="question" cols="40" rows="8"><? echo $_POST["question"] ?></textarea></td>
</tr>
<!--
<tr valign="top">
<td class="formfield1"> </td>
<td style="padding-bottom: 5px;">
<div>Please enter the code in the text field below</div>
<div><img src="captcha.php" width="230" height="45" alt="Captcha code" /></div>
<div><input type="text" name="frm_cap" size="25" value="" /></div>
</td>
</tr>
-->
<tr valign="top">
<td class="formfield1"><!-- Verification --></td>
<td style="padding-bottom: 5px;"><input type="submit" name="Submit" value="Send"></td>
</tr>
</form>
</table>
<?php