在评论中出现语法错误? 还是我错过了一些明显的东西?
I am writing a report form but I am this really weird syntax error.
Here is my code:
<h2>Report <u><?php echo $title; ?></u> Machine Program Error</h2>
<p><span class="error">* required field.</span></p>
<form action="send_form_email.php?email=yes">
Job Number: <input type="text" name="jobid" value="<?php print ($jobid) ?>">
<!--<span class="error">* <?phpecho $nameErr;?></span>-->
<br><br>
Part Number: <input type="text" name="partid" value="<?php print ($part_id) ?>">
<!--<span class="error">* <?phpecho $emailErr;?></span>-->
<br><br>
Machine: <input type="text" name="mach" value="<?php print ($machCode) ?>">
<!--<span class="error">* <?phpecho $machErr;?></span>-->
<br><br>
Note: <textarea name="comment" rows="5" cols="40" placeholder="More detail... (Is there a way to recreate the error?)"><?php echo $comment;?></textarea>
<br><br>
<input type="submit" name="submit" value="Submit">
</form>
Lines with the comments; <!--<span class="error">* <?phpecho $nameErr;?></span>-->
, <!--<span class="error">* <?phpecho $emailErr;?></span>-->
, and <!--<span class="error">* <?phpecho $machErr;?></span>-->
are pulling up syntax errors.
Am I missing something obvious or is there and error with my Dreamweaver CS5? If one of the two is true, how do I fix it?
Thanks in advance.
我正在撰写报告表格,但我这是一个非常奇怪的语法错误。 p> 这是我的代码: p>
&lt; h2&gt;报告&lt; u&gt;&lt;?php echo $ title; ?&GT;&LT; / U&GT; 机器程序错误&lt; / h2&gt;
&lt; p&gt;&lt; span class =“error”&gt; *必填字段。&lt; / span&gt;&lt; / p&gt;
&lt; form action =“send_form_email.php?email = yes “&GT;
工作号码:&lt; input type =“text”name =“jobid”value =“&lt;?php print($ jobid)?&gt;”&gt;
&lt;! - &lt; span class =“error “&gt; *&lt;?phpecho $ nameErr;?&gt;&lt; / span&gt; - &gt;
&lt; br&gt;&lt; br&gt;
零件号:&lt; input type =”text“name =”partid “value =”&lt;?php print($ part_id)?&gt;“&gt;
&lt;! - &lt; span class =”error“&gt; *&lt;?phpecho $ emailErr;?&gt;&lt; / span&gt; - &gt;
&lt; br&gt;&lt; br&gt;
Machine:&lt; input type =“text”name =“mach”value =“&lt;?php print($ machCode)?&gt;”&gt ;
&lt;! - &lt; span class =“error”&gt; *&lt;?phpecho $ machErr;?&gt;&lt; / span&gt; - &gt;
&lt; br&gt;&lt; br&gt;
注意:&lt; textarea name =“comment”rows =“5”cols =“40”placeholder =“更多细节......(有没有办法重新创建错误?)”&gt;&lt;?php echo $ comment; ?&gt;&lt; / textarea&gt;
&lt; br&gt;&lt; br&gt;
&lt; input type =“submit”name =“submit”value =“Submit”&gt;
&lt; / form&gt;
code> pre>
包含评论的行; &lt;! - &lt; span class =“error”&gt; *&lt;?phpecho $ nameErr;?&gt;&lt; / span&gt; - &gt; code>,&lt;! - - &lt; span class =“error”&gt; *&lt;?phpecho $ emailErr;?&gt;&lt; / span&gt; - &gt; code>和&lt;! - &lt; span class = “错误”&gt; *&lt;?phpecho $ machErr;?&gt;&lt; / span&gt; - &gt; code>正在提取语法错误。 p>
我错过了什么 我的Dreamweaver CS5显而易见或存在错误? 如果其中一个是真的,我该如何解决? p>
提前致谢。 p>
div>
HTML comments have no effect on PHP. You also have a syntax error
Try this:
<h2>Report <u><?php echo $title; ?></u> Machine Program Error</h2>
<p><span class="error">* required field.</span></p>
<form action="send_form_email.php?email=yes">
Job Number: <input type="text" name="jobid" value="<?php print ($jobid) ?>">
<!--<span class="error">* <?php //echo $nameErr;?></span>-->
<br><br>
Part Number: <input type="text" name="partid" value="<?php print ($part_id) ?>">
<!--<span class="error">* <?php //echo $emailErr;?></span>-->
<br><br>
Machine: <input type="text" name="mach" value="<?php print ($machCode) ?>">
<!--<span class="error">* <?php //echo $machErr;?></span>-->
<br><br>
Note: <textarea name="comment" rows="5" cols="40" placeholder="More detail... (Is there a way to recreate the error?)"><?php echo $comment;?></textarea>
<br><br>
<input type="submit" name="submit" value="Submit">
</form>