<? include './config.php'; $city = $_GET['CITY']; $city = str_replace('-', ' ', $city); $state = $_GET['STATE']; echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>' . $city . ' Strip Clubs | ' . $rool_url . '</title> <link rel="stylesheet" type="text/css" href="' . $rool_url . '/main.css" /> </head> <body> <div id="wrapper"> <div id="header"> <img src="' . $rool_url . '/logo.gif" border=0 align=left></a><br><br><center><h2>' . $city . ' Strip Clubs</h2></center> </div> <div id="navbar">'; include("navbar.php"); echo '</div>'; echo '<div id="leftcolumn">'; include("leftbar.php"); echo '</div>'; //MAIN PART OF THE SITE echo '<div id="centercolumn"> <!-- Style 2 CityDelve.com City Search --> <table cellspacing=1 bgcolor=#cccccc cellpadding=3><tr><td bgcolor=#ffffff><form method="post" action="http://www.citydelve.com/search.php"> <img src="http://www.citydelve.com/search_logo.gif"><input type="text" name="search" size=25 maxlength=25> <input type="image" name="Submit" value="Submit" src="http://www.citydelve.com/search.jpg"> </form><font face=verdana size=1>Enter a CITY or ZIP to get started - <a href="http://www.citydelve.com">City information by City Delve</a></form></font></td></tr></table><!-- End CityDelve.com City Search --><br>'; echo '<h1>'; echo $city; echo ' Strip Clubs '; echo '</h1>'; //SHOW COFFEE SHOPS echo '<div id=coffee_head><h2>' . $city . ' Strip Clubs, Adult Comedy Clubs, and Dancers</h2></div>'; echo '<div id=coffee>'; echo '<img src="' . $root_url . '/doink.jpg" align=left>'; $sql = mysql_query('SELECT * FROM strip_clubs WHERE City = "' . $city . '" and State = "' . $state . '" LIMIT 10'); while($row = mysql_fetch_assoc($sql)) { preg_match('/([a-z0-9\040]*)/', strtolower($row['Name']), $matches2); $filename = $matches2[0]; $filename = str_replace(' ', '-', $filename); preg_match('/([a-z0-9\040]*)/', strtolower($row['City']), $matches2); $cityre = $matches2[0]; $cityre = str_replace(' ', '-', $cityre); preg_match('/([a-z0-9\040]*)/', strtolower($row['State']), $matches2); $statere = $matches2[0]; $statere = str_replace(' ', '-', $statere); $bar = $row['Name']; $bar = ucwords($bar); $bar = ucwords(strtolower($bar)); echo '<a href="' . $root_url . '/strip_clubs/' . $row['ID'] . '/' . $statere . '/' . $cityre . '/' . $filename . '" title="' . $row['Name'] . '" target="_blank">' . $bar . '</a>'; echo ', '; echo $row['Address']; echo ', '; echo $row['Telephone']; echo '<br><br>'; } echo '<h3>More Adult Entertainment in ' . $state . '</h3><br>'; $sql = mysql_query('SELECT * FROM strip_clubs WHERE State = "' . $state . '" ORDER BY City DESC LIMIT 10'); while($row = mysql_fetch_assoc($sql)) { preg_match('/([a-z0-9\040]*)/', strtolower($row['Name']), $matches2); $filename = $matches2[0]; $filename = str_replace(' ', '-', $filename); preg_match('/([a-z0-9\040]*)/', strtolower($row['City']), $matches2); $cityre = $matches2[0]; $cityre = str_replace(' ', '-', $cityre); preg_match('/([a-z0-9\040]*)/', strtolower($row['State']), $matches2); $statere = $matches2[0]; $statere = str_replace(' ', '-', $statere); $bar = $row['Name']; $bar = ucwords($bar); $bar = ucwords(strtolower($bar)); echo '<a href="' . $root_url . '/strip_clubs/' . $row['ID'] . '/' . $statere . '/' . $cityre . '/' . $filename . '" title="' . $row['Name'] . '" target="_blank">' . $bar . '</a>'; echo ', '; echo $row['Address']; echo ', '; echo $row['Telephone']; echo '<br><br>'; } preg_match('/([a-z0-9\040]*)/', strtolower($city), $matches2); $cityre1 = $matches2[0]; $cityre1 = str_replace(' ', '-', $cityre1); preg_match('/([a-z0-9\040]*)/', strtolower($state), $matches2); $statere1 = $matches2[0]; $statere1 = str_replace(' ', '-', $statere1); $bar1 = $city; $bar1 = ucwords($bar1); $bar1 = ucwords(strtolower($bar1)); echo '» <b><a href="' . $root_url . '/strip_clubs_all/All/' . $statere1 . '/' . $cityre1 . '/list_all" title="All strip clubs in ' . $bar1 . '" target="_blank">All Adult entertainment in ' . $state . '</a></b>'; echo '</div>'; //END OF THE SITE BYE BYE echo '</div>'; echo '<div id="rightcolumn">'; include("rightside.php"); echo '</div>'; echo '<div id="footer"><center>© ' . $sitename . ' - <a href="' . $root_url . '" title="' . $sitename . '">' . $sitename . '</a> 2006. All rights reserved.</center></div> </div> </body> </html>'; ?>
if you post the error you get, include the line number so we can track down the problem... also, off-topic, but for long blocks of HTML, I close then re-open the PHP tags instead of a huge echo... I wonder which is better? // long echo echo 'blah blah blah blah'; PHP: // close then reopen tags ?> blah blah blah blah <? PHP:
Depends on the case, but usually I'd suggest using the second method, as it's faster and easier to read.
The requested URL /strip_clubs_all.php.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
EDIT: ^^ Beat me to it, and that's probably the error. I'm glad I asked for the error before checking the code. There's (probably) nothing wrong with your code. The error is telling you that this file was not found on the server. Which means, either you didn't upload it, or the path it wrong, or the case is wrong. (If you're on an apache server.)
I'm happy you asked for it too! I would have racked my brain looking for a missing semi-colon or something, haha!
RewriteEngine on RewriteBase / RewriteRule (.*)/(.*)\.htm results.php?STATE=$1&CITY=$2 RewriteRule ([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+) $1.php?ID=$2&STATE=$3&CITY=$4&NAME=$5 [T=application/x-httpd-cgi] what does using capitols have to do with apache?