语法错误,意外的T_PRINT

时间:2022-02-26 22:45:29

I have searched and can not find anything on T_PRINT syntax errors. So here it goes, I don't see how this is "unexpected". It is referring to the print "Your Staff Application has been posted" etc. line.

我搜索过,但是没有发现T_PRINT语法错误。我不明白这是怎么“意料之外”的。它是指打印的“您的员工申请已经张贴”等线。

<?php
session_start();
include "globals.php";
if($_POST['app']) 
{ 
$db->query("INSERT INTO staffapps VALUES('',$userid,'{$_POST['pos']}','{$_POST['app']}')", $c)
or die
("Your staff application could not be processed. Make sure you have filled out the form completely!"); 
 
print "Your Staff Application has been posted for our staff to review, your results will be decided within 14 days! Good Luck!"; 
 
} 
else
 
print "<h3>Staff Application</h3>
 
 
<center><h8><b>Please read the <a href='stafftoc.php'><font color='yellow'>Terms & Conditions</font></a>before sending an application!</b>
 
<form action='staffapps.php' method='post'>
Position <select name='pos'><option value='3'>Admin</option><option value='5'>Secretary</option><option value='6'>Assistant</option></select>
 
Why do you deserve the position?
 
Please bare in mind that staff look for professional members so be sure to spell correctly with the right grammar and punctuation!
 
If your staff application appears un-professional, it will be dismissed! 
 
<textarea rows='7' cols='40' name='app'>{$_GET['app']}</textarea>
 
<input type='submit' value='Submit Application' /></form>";
 
$h->endpage;
?>

1 个解决方案

#1


1  

Some of your code lines seem to have some funny trailing characters that shouldn't be there; here's a hexadecimal representation of them:

有些代码行似乎有一些不应该出现的有趣的结尾字符;这是它们的十六进制表示:

0xc2 0xa0

I've been told that this is a non-breaking space. Clearing those characters from your code should fix the issue.

我被告知这是一个不间断的空间。从代码中清除这些字符应该可以解决这个问题。

#1


1  

Some of your code lines seem to have some funny trailing characters that shouldn't be there; here's a hexadecimal representation of them:

有些代码行似乎有一些不应该出现的有趣的结尾字符;这是它们的十六进制表示:

0xc2 0xa0

I've been told that this is a non-breaking space. Clearing those characters from your code should fix the issue.

我被告知这是一个不间断的空间。从代码中清除这些字符应该可以解决这个问题。