[英]Blank php page?
I have got 2 pages, one generates a bit for the job information called jobs.php
and another page called Jobdescription.php
displays the full details of the job I selected. 我有2页,一个生成一个位名为作业信息
jobs.php
,并呼吁另一页Jobdescription.php
显示我选择了工作的全部细节。 On the jobdescription.php
page, 2 tables are involved one called Employers
and the other called APP_Jobs
. 在
jobdescription.php
页面上,涉及2个表,一个称为Employers
,另一个称为APP_Jobs
。 This is the code I have got so far, but I get a blank page with no error or anything. 这是到目前为止的代码,但是我得到的是空白页,没有任何错误或任何其他内容。
<?
//database connection
$dblink = mysqli_connect($mysqli_host, $mysqli_user, $mysqli_pw, $mysqli_db);
$sql_query = "SELECT APP_Jobs.* FROM APP_Jobs INNER JOIN Employers on APP_Jobs.Emp_id=Employers.Emp_id";
$query_result = mysqli_query($dblink, $sql_query) OR die ("Cannot read from DB ".mysql_error($dblink));
while ($row = mysqli_fetch_array ($query_result))
{
{
echo "<h3>'".$row['Job_Title']."'</h3>";
echo "<tr>
<td>
Employer : ".$row["Emp_name"]." <br />
Address : ".$row["Emp_address"]." <br />
Town : ".$row["Emp_town"]." <br /><br />
<h1>Job Details</h1>
Description : ".$row["Job_description"]."<br />
Skills Required : ".$row["Job_Skills"]."<br />
Training provided : ".$row["Job_Training"]." <br /><br />
Start : ".$row["Job_StartDate"]."<br />
pay:".$row["Job_pay"]." <br /><br />
<a href=CV1.php?Job_id=".$row["Job_id"].">Apply</a>
</td>
<tr>
<td colspan=\"2\"><hr size=\"1\"/></td>
</tr>
</tr>\n";
}
}
?>
There must be something going wrong in your database code. 您的数据库代码中肯定有问题。
Add the following to the top of the page to show errors: error_reporting(E_ALL);
将以下内容添加到页面顶部以显示错误:
error_reporting(E_ALL);
There Are too many quotation marks (") in echo 回显中的引号(“)过多
try 尝试
echo "<h3>'\".$row['Job_Title'].\"'</h3>";
and same in your below code too like 和下面的代码一样
echo "
<tr>
<td>
Employer : \".$row['Emp_name'].\" <br />
Address : \".$row['Emp_address'].\" <br />
Town : \".$row['Emp_town'].\" <br /><br />
<h1>Job Details</h1>
Description : \".$row['Job_description'].\"<br />
Skills Required : \".$row['Job_Skills'].\"<br />
Training provided : \".$row['Job_Training'].\" <br /><br />
Start : \".$row['Job_StartDate'].\"<br />
pay:\".$row['Job_pay'].\" <br /><br />
<a href=CV1.php?Job_id=\".$row['Job_id'].\">Apply</a>
</td>
<tr><td colspan=\"2\"><hr size=\"1\"/></td></tr>
</tr>\n";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.