Jump to content

[SOLVED] help wiht contact form


runnerjp

Recommended Posts

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runnerse/public_html/include/contactlost.inc.php on line 64

<?php session_start();
$ses_id = session_id();        // DO NOT REMOVE THIS LINE!
$_SESSION['ses_id'] = $ses_id;    // OR THIS ONE!
?>
<style type="text/css">
body {
    margin: 0px;
    padding: 100px;
    background: #fafafa;
    font-family: verdana, Arial, sans-serif;
    font-size: 11px;
    line-height: 18px;
}

#Wrapper {
    margin: 0 auto;
    padding: 10px;
    width: 500px;
    background: #fff;
    border: 1px solid #999999;
}

fieldset {
    margin: 0px;
    padding: 0px;
    border: 0px;
}

legend {
    display: none;
}

input, textarea {
    margin: 0px;
    padding: 1px;
    font-family: Courier, monospace;
    font-size: 11px;
    border: 1px solid #999999;
}

span.cursor {
    cursor: pointer;
}

p#Error_msg {
    color: red;
}
</style>
</head>
<body>

<div id="Wrapper">
<?php
$Error = $_GET['error'];
if(isset($Error)) {
echo '<fieldset><legend>Contact Form</legend>'."n";
echo '<form action="contactlost2.inc.php" method="post">'."n";
echo '<p><label for="name"><strong>Name :</strong></label><br />'."n";
echo '<input type="text" name="name" id="name" tabindex="1" size="40" value="'.$_SESSION['name'].'" /></p>'."nn";

echo '<p><label for="email"><strong>E-mail address :</strong></label><br />'."n";
echo '<input type="text" name="email" id="email" tabindex="2" size="40" value="'.$_SESSION['email'].'" /></p>'."nn";

echo '<p><label for="comment"><strong>Questions / Comments :</strong></label> (<span class="cursor" onclick="document.getElementById('comment\').rows += 5;" title="Increase The Textarea">increase</span> » <span class="cursor" onclick="document.getElementById('comment').rows -= 5;" title="Decrease The Textarea">decrease</span>)<br />'."n";
echo '<textarea cols="50" rows="5" name="comment" id="comment" tabindex="3">'.$_SESSION['comment'].'</textarea></p>'."nn";

echo '<p id="Error_msg">'.$_SESSION['errormsg'].'</p>'."nn";

echo '<p><input type="submit" name="submit" value="submit" class="submit" tabindex="4" /> <input type="reset" value="reset" class="submit" tabindex="5" /></p>'."n";
echo '</form>'."n";
echo '</fieldset>'."n";
} else {
?>
<fieldset><legend>Contact Form</legend>
<form action="contactlost2.inc.php" method="post">
<p><label for="name"><strong>Name :</strong></label><br />
<input type="text" name="name" id="name" tabindex="1" size="40" /></p>

<p><label for="email"><strong>E-mail address :</strong></label><br />
<input type="text" name="email" id="email" tabindex="2" size="40" /></p>

<p><label for="comment"><strong>Questions / Comments :</strong></label> (<span class="cursor" onclick="document.getElementById('comment').rows += 5;" title="Increase The Textarea">increase</span> » <span class="cursor" onclick="document.getElementById('comment').rows -= 5;" title="Decrease The Textarea">decrease</span>)<br />
<textarea cols="50" rows="5" name="comment" id="comment" tabindex="3"></textarea></p>

<p><input type="submit" name="submit" value="submit" class="submit" tabindex="4" /> <input type="reset" value="reset" class="submit" tabindex="5" /></p>
</form>
</fieldset>
<?php } ?>
</div>

</body>
</html>

 

any help :D:D

Link to comment
https://forums.phpfreaks.com/topic/42984-solved-help-wiht-contact-form/
Share on other sites

line 64 is

 

echo '<p><label for="comment"><strong>Questions / Comments :</strong></label> (<span class="cursor" onclick="document.getElementById('comment').rows += 5;" title="Increase The Textarea">increase</span> » <span class="cursor" onclick="document.getElementById('comment').rows -= 5;" title="Decrease The Textarea">decrease</span>)<br />'."n";

 

try changing it to

 

echo '<p><label for="comment"><strong>Questions / Comments :</strong></label> (<span class="cursor" onclick="document.getElementById(\'comment\').rows += 5;" title="Increase The Textarea">increase</span> » <span class="cursor" onclick="document.getElementById(\'comment\').rows -= 5;" title="Decrease The Textarea">decrease</span>)<br />'."n";

 

~d

echo '<textarea cols="50" rows="5" name="comment" id="comment" tabindex="3">'.$_SESSION['comment'].'</textarea></p>'."nn";

 

has error Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in /home/runnerse/public_html/include/contactlost.inc.php on line 65

 

 

Archived

This topic is now archived and is closed to further replies.

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