Hi all, first post in this subforum.
I am trying to get back into PHP/CSS/etc, and having a little problem with something - on my web hosting, my CSS is not working at all, however when I access my site locally through Xampp, it shows up fine. Any ideas what could cause this? Here's the code:
header.php
index.php
As you can see, the index.php calls the header file with an include. The other stuff from the header file shows fine. The page displays everything it should other than the formatting.
Also, while I'm here, what does everyone here use for editing PHP/html on a mac? I was working with Vim last night but it doesn't seem to have color coding, which I prefer for writing code. Suggestions?
I am trying to get back into PHP/CSS/etc, and having a little problem with something - on my web hosting, my CSS is not working at all, however when I access my site locally through Xampp, it shows up fine. Any ideas what could cause this? Here's the code:
header.php
HTML:
<html>
<head>
<title>Sound Void</title>
<link rel="stylesheet" type="text/css" href="css/formatting.css" />
</head>
<body>
<div id="header"><?php
include("title.html");
?></div>
<div id="divider"><?php include("topnav.html"); ?></div>
<div id="content">
index.php
PHP:
<?php
session_start();
header("Cache-control: private");
include ("header.php");
include ("db.php");
$count = 0;
$sql = "SELECT news_id, headline, text, date_posted, user_name FROM music_news";
$result=mysql_query($sql);
$rows=mysql_numrows($result);
mysql_close();
$i=0;
while($i < $rows) {
$id = mysql_result($result,$i,"news_id");
$headline = mysql_result($result,$i,"headline");
$text = mysql_result($result,$i,"text");
$date = mysql_result($result,$i,"date_posted");
$user = mysql_result($result,$i,"user_name");
if ($count > 0){
echo '<hr />';
}
echo '<h2>' . $headline . '</h2>';
echo '<div id=newstext>';
echo $text . '</div>';
echo '<h5>Posted by ' . $user . ', ' . $date;
if ($_SESSION['group'] == 1){
echo ' || <a href=edit_news.php?id=' . $id . '>Edit</a>';
}
if ($_SESSION['group'] == 2 && $_SESSION['dbuser'] == $user){
echo ' || <a href=edit_news.php?id=' . $id . '>Edit</a>';
}
if ($_SESSION['group'] == 1){
echo ' || <a href=delete.php?id=' . $id . '>Delete</a>';
}
echo '</h5>';
$count = $count+1;
$i++;
}
include ("menus.php");
include ("footer.php");
?>
As you can see, the index.php calls the header file with an include. The other stuff from the header file shows fine. The page displays everything it should other than the formatting.
Also, while I'm here, what does everyone here use for editing PHP/html on a mac? I was working with Vim last night but it doesn't seem to have color coding, which I prefer for writing code. Suggestions?