Parse error Help Please
Posted: Sun Dec 18, 2011 1:01 pm
I'm at my wits end here as this is puzzling to say the least. If I create or download a premade html / php contact form, edit the email and upload to my server it works fine when I use Dreamweaver CS5 to edit it in.
I recently updated to Dreamweaver CS5.5 and used that to edit and upload and html / php form but when I test it I get the following message in the browser
Parse error: syntax error, unexpected T_VARIABLE in /home/content/r/a/l/ralphiedee/html/contactform_free/free_settings.php on line 1
This only applies to editing any content in Dreamweaver 5.5. I have tried this with at least 5 different php scripts and the same thing all the time. I did a search on the error and it seems it has to do with a semi colon, in this case line 1? But why would this error only show up in Dreamweaver CS5.5.
below is the file in question, can someone explain this to me cause the Adobe forum cannot.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Contact Us</title>
<script src="free_validation.js"></script>
<script>
required.add('Full_Name','NOT_EMPTY','Full Name');
required.add('Email_Address','EMAIL','Email Address');
required.add('Your_Message','NOT_EMPTY','Your Message')
</script>
<link rel="stylesheet" type="text/css" href="free_styles.css">
</head>
<body>
<form name="contactformfree" method="post" action="free_process.php" onsubmit="return validate.check(this)">
<table width="400px" class="cffree">
<tr>
<td colspan="2">
<p style="text-align:center">Fields marked with <span class="required_star"> * </span> are required.</p>
</td>
</tr>
<tr>
<td valign="top" class="cffree_td">
<label for="Full_Name" class="required">Full Name<span class="required_star"> * </span></label>
</td>
<td valign="top" class="cffree_td">
<input type="text" name="Full_Name" id="Full_Name" maxlength="80" style="width:250px">
</td>
</tr>
<tr>
<td valign="top" class="cffree_td">
<label for="Email_Address" class="required">Email Address<span class="required_star"> * </span></label>
</td>
<td valign="top" class="cffree_td">
<input type="text" name="Email_Address" id="Email_Address" maxlength="100" style="width:250px">
</td>
</tr>
<tr>
<td valign="top" class="cffree_td">
<label for="Telephone_Number" class="not-required">Telephone Number</label>
</td>
<td valign="top" class="cffree_td">
<input type="text" name="Telephone_Number" id="Telephone_Number" maxlength="100" style="width:250px">
</td>
</tr>
<tr>
<td valign="top" class="cffree_td">
<label for="Your_Message" class="required">Your Message<span class="required_star"> * </span></label>
</td>
<td valign="top" class="cffree_td">
<textarea style="width:250px;height:120px" name="Your_Message" id="Your_Message" maxlength="2000"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center" class="cffree_td">
<input type="submit" value=" Submit Form ">
<br /><br />
<div style="font-size:0.9em">Form provided by <a href="http://www.freecontactform.com/free.php" target="_blank">Free Contact Form</a></div>
<br /><br />
</td>
</tr>
</table>
</form>
</body>
</html>
I recently updated to Dreamweaver CS5.5 and used that to edit and upload and html / php form but when I test it I get the following message in the browser
Parse error: syntax error, unexpected T_VARIABLE in /home/content/r/a/l/ralphiedee/html/contactform_free/free_settings.php on line 1
This only applies to editing any content in Dreamweaver 5.5. I have tried this with at least 5 different php scripts and the same thing all the time. I did a search on the error and it seems it has to do with a semi colon, in this case line 1? But why would this error only show up in Dreamweaver CS5.5.
below is the file in question, can someone explain this to me cause the Adobe forum cannot.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Contact Us</title>
<script src="free_validation.js"></script>
<script>
required.add('Full_Name','NOT_EMPTY','Full Name');
required.add('Email_Address','EMAIL','Email Address');
required.add('Your_Message','NOT_EMPTY','Your Message')
</script>
<link rel="stylesheet" type="text/css" href="free_styles.css">
</head>
<body>
<form name="contactformfree" method="post" action="free_process.php" onsubmit="return validate.check(this)">
<table width="400px" class="cffree">
<tr>
<td colspan="2">
<p style="text-align:center">Fields marked with <span class="required_star"> * </span> are required.</p>
</td>
</tr>
<tr>
<td valign="top" class="cffree_td">
<label for="Full_Name" class="required">Full Name<span class="required_star"> * </span></label>
</td>
<td valign="top" class="cffree_td">
<input type="text" name="Full_Name" id="Full_Name" maxlength="80" style="width:250px">
</td>
</tr>
<tr>
<td valign="top" class="cffree_td">
<label for="Email_Address" class="required">Email Address<span class="required_star"> * </span></label>
</td>
<td valign="top" class="cffree_td">
<input type="text" name="Email_Address" id="Email_Address" maxlength="100" style="width:250px">
</td>
</tr>
<tr>
<td valign="top" class="cffree_td">
<label for="Telephone_Number" class="not-required">Telephone Number</label>
</td>
<td valign="top" class="cffree_td">
<input type="text" name="Telephone_Number" id="Telephone_Number" maxlength="100" style="width:250px">
</td>
</tr>
<tr>
<td valign="top" class="cffree_td">
<label for="Your_Message" class="required">Your Message<span class="required_star"> * </span></label>
</td>
<td valign="top" class="cffree_td">
<textarea style="width:250px;height:120px" name="Your_Message" id="Your_Message" maxlength="2000"></textarea>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center" class="cffree_td">
<input type="submit" value=" Submit Form ">
<br /><br />
<div style="font-size:0.9em">Form provided by <a href="http://www.freecontactform.com/free.php" target="_blank">Free Contact Form</a></div>
<br /><br />
</td>
</tr>
</table>
</form>
</body>
</html>