I'm having a problem with my PHP installation. When I try to run a PHP file in my browser, I get an HTML page with broken PHP code, or sometimes just a blank page. When I try to run php.exe, it says OCI.dll can not be found.
Here's the question: is the problem with the browser or is it with PHP? or maybe just the code?
index.php
<?php
function connect()
{
$dbconn = mysql_connect('localhost', 'root', 'chance');
$db = mysql_select_db('db', $dbconn);
if (!db) die(mysql.error());
}
echo '<html>\n<head>\n';
echo '<style type=text/css>\n\tbody\n\t\tfont-family: ';
echo 'sans-serif;\n\t\tfont-size: 13pt;\n\t}\n</style>\n';
$p = $_GET['p'];
if ($p == 'home') $page = 'Home';
else if ($p == 'dload') $page = 'Download';
else if ($p == 'forum') $page = 'Forums';
else if ($p == 'about') $page = 'About';
echo '<title>';
echo htmlspecialchars('Chance\'s Site');
echo ' | $page</title>';
connect();
echo 'You are at the '.$page.' page.\n';
echo '</body>\n</html>';
?>
Thanks in advance.

New Topic/Question
This topic is locked



MultiQuote




|