我知道我正在尝试做什么,而且我知道代码可以正常工作,但我的网站无法显示。
如果其他人可以看一遍,因为我确实在寻找一个半小时的实力。
如果你们可以浏览它,那就太棒了。
代码:
<?php include('includes/pageNav.php');
include('config.php');
$sql = "SELECT * FROM sponsoredBackground ORDER BY id DESC";
$retval = mysql_query( $sql, $con );
if(! $retval )
{
die('Could not get data: ' . mysql_error());
}
echo "<div id=\"headerSlider\">";
while($row = mysql_fetch_array($retval, MYSQL_ASSOC))
{
echo "<div class=\"headerContainer\" style=\"background: transparent url('/images/".$row['imageName']."') 0 0 no-repeat;\">";
echo "<div class=\"headerLeftContent\">";
echo "<div class=\"sponsoredBackground\">";
echo "<a href=\"".$row['imageName']."\">";
echo "View this Opportunity";
echo "</a>";
echo "</div>";
echo "<p style=\"font-size:18px; color:white;\">Search by Location:</p>";
echo "<select id=\"location\" name=\"location\" class=\"selectDropDown\">";
echo "<option>Select Location...</option>";
echo "<option value=\"AcrossScotland\">Across Scotland</option>";
echo "<option value=\"Aberdeen\">Aberdeen</option>";
echo "<option value=\"Aberdeenshire\">Aberdeenshire</option>";
echo "<option value=\"Angus\">Angus</option>";
echo "<option value=\"Argyll/Bute\">Argyll And Bute</option>";
echo "<option value=\"Clackmannanshire\">Clackmannanshire</option>";
echo "<option value=\"Dumfries/Galloway\">Dumfries And Galloway</option>";
echo "<option value=\"Dundee\">Dundee</option>";
echo "<option value=\"EastAyrshire\">East Ayrshire</option>";
echo "<option value=\"EastDunbartonshire\">East Dunbartonshire</option>";
echo "<option value=\"EastLothian\">East Lothian</option>";
echo "<option value=\"EastRenfrewshire\">East Renfrewshire</option>";
echo "<option value=\"Edinburgh\">Edinburgh</option>";
echo "<option value=\"EileanSiar\">Eilean Siar</option>";
echo "<option value=\"Falkirk\">Falkirk</option>";
echo "<option value=\"Fife\">Fife</option>";
echo "<option value=\"Glasgow\">Glasgow</option>";
echo "<option value=\"Highlands\">Highlands</option>";
echo "<option value=\"Inverclyde\">Inverclyde</option>";
echo "<option value=\"Midlothian\">Midlothian</option>";
echo "<option value=\"Moray\">Moray</option>";
echo "<option value=\"NorthAyrshire\">North Ayrshire</option>";
echo "<option value=\"NorthLanarkshire\">North Lanarkshire</option>";
echo "<option value=\"Orkney\">Orkney</option>";
echo "<option value=\"Perth/Kinross\">Perth And Kinross</option>";
echo "<option value=\"Renfrewshire\">Renfrewshire</option>";
echo "<option value=\"ScottishBorders\">Scottish Borders</option>";
echo "<option value=\"ShetlandIslands\">Shetland Islands</option>";
echo "<option value=\"SouthAyrshire\">South Ayrshire</option>";
echo "<option value=\"SouthLanarkshire\">South Lanarkshire</option>";
echo "<option value=\"Stirling\">Stirling</option>"
echo "<option value=\"WestDunbartonshire\">West Dunbartonshire</option>";
echo "<option value=\"WestLothian\">West Lothian</option>";
echo "</select>";
echo "<p style=\"font-size:18px; color:white;\">Search by Category:</p>";
echo "<select id=\"category\" name=\"category\" class=\"selectDropDown\">";
echo "<option>Select Category...</option>";
echo "<option value=\"AllCategories\">All Categories</option>";
echo "<option value=\"Financial\">Financial</option>";
echo "<option value=\"Administration\">Business And Administration</option>";
echo "<option value=\"Care\">Care</option>";
echo "<option value=\"Construction\">Construction</option>";
echo "<option value=\"Creative\">Creative</option>";
echo "<option value=\"Energy\">Energy</option>";
echo "<option value=\"Engineering\">Engineering</option>";
echo "<option value=\"Food/Drink\">Food And Drink</option>";
echo "<option value=\"Hair/Beauty\">Hair And Beauty</option>";
echo "<option value=\"Hospitality\">Hospitality</option>";
echo "<option value=\"IT\">IT</option>";
echo "<option value=\"Landbased\">Landbased</option>";
echo "<option value=\"Mechanics/Transport\">Motor And Transport</option>";
echo "<option value=\"Retail\">Retail</option>";
echo "<option value=\"Scientific\">Scientific</option>";
echo "<option value=\"Sport/Leisure\">Sport And Leisure</option>";
echo "</select>";
echo "<p style=\"font-size:18px; color:white;\">Search by Type:</p>";
echo "<select id=\"type\" class=\"selectDropDown\">";
echo "<option>Select Type...</option>";
echo "<option value=\"AllTypes\">All Types</option>";
echo "<option value=\"Apprenticeships\">Apprenticeships</option>";
echo "<option value=\"Enterprise\">Enterprise</option>";
echo "<option value=\"College\">College</option>";
echo "<option value=\"University\">University</option>";
echo "<option value=\"WorkExperience\">Work Experience</option>";
echo "<option value=\"Voluntary\">Voluntary</option>";
echo "<option value=\"Graduate\">Graduate</option>";
echo "</select>";
echo "</div>";
echo "<div class=\"headerCenterContent\">";
echo "</div>";
echo "<div class=\"headerRightContent\">";
echo include('featuredEvents.php');
echo "</div>";
echo "</div>";
}
?>
苦苦寻找故障的位置,明确地说是愚蠢的。提前谢谢。