View Full Version : To Much space?

02-09-2006, 07:38 PM
hey guys, could someone help me out? if you look at www.visionstudios.be/pstuts.php there is to much space between "comments to date: xx" and the other words, how can i fix this? here the code;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<table width="550" height="88" border="0" cellpadding="2" cellspacing="0">
<td width="80" align="center" valign="middle"><div align="center"><a href="http://www.visionstudios.be/tracker/tracker.php?id=1"><img src="images/tuts/diagonal/thumb.gif" width="48" height="48" border="0" align="top"></a></div></td>
<td width="466" align="center" valign="middle"><div align="left">
Difficutly: Easy<br>
Time: 5 Minutes<br>
Author: Cnelson<br>
Description: Learn to make a nice diagonal pattern, and apply it to a image.<br>
include ("tracker/connect.php");
$result = mysql_query("SELECT * FROM links where id=1");
while($row = mysql_fetch_array($result)) {
print 'This tutorial has been viewed '.$row[visits].' times. ';
$page_id = "2";


thanks. cnelson.

02-09-2006, 07:44 PM
That would be easier if you give us the php script in "tracker/connect.php" and "comments/comments_show1.php"

02-09-2006, 09:22 PM
ok, here we go;


// Database configurations
$host = "localhost"; //This is the ip of host where mySQL stands. Localhost for most cases.
$dbuser = "**************"; //username database user
$dbpass = "*******"; //password database user
$dbname = "cnelson_tracker"; //name of database

// Connecting to databse
$conn = mysql_connect("$host","$dbuser","$dbpass") or die ("Cannot connect to Database");
$db = mysql_select_db("$dbname") or die ("No Such Database found.");


(i've edited out the password and username.)

and comments_show1.php;


include("db_conn.php"); // connect to host and select db
mysql_connect($host, $db_user, $db_pass);
$db_table = "page_comments";

// construct page query to find out how many matches
$result=mysql_db_query($db_name,"select count(*) from $db_table where page_id='$page_id'");

// construct page query to find out how many matches
$query = "SELECT * from $db_table WHERE page_id = '$page_id' ORDER by id DESC ";// what matches THIS page?
$result = mysql_query($query);

// skip output if no comments exist
if (!$count)
echo "<p style='". $num_style. "'>No comments have been provided.</p>";
echo "<p style='". $num_style. "'>Comments to date: ". $count. "</p>";

and also comments_config.php;


// turn off ability to post comments on ANY page
$commoff = "0"; // set to 1 to turn off comment form

// your e-mail and domain name informationfor e-mails sent from the comments system
$eaddr = "yeahi********@********"; // for comment post notification
$domain = "www.visionstudios.be"; // for comment post notification
$mail_on = 1; // 1 = provide post notification, 0 = disable post notification

// avoid insignificant comments
$useful = 6; // shortest acceptable comment length

// include swear-checked posts to display (including baaaaad words)
$swearban = 0; // set to 0 to include posts that fail swear checking

// alternate row background colours for displayed comments
$ro1 = "#f7f7f7"; // odd rows
$ro2 = "#e0e0e0"; // even rows
$space_color = "#000000"; // divider line colour between comments

// CSS style applied to displayed comments
$comm_style = "font-family: sans-serif; font-size:12 px; color: #000000; ";

// CSS style applied to comments count line

// NOTE: the comments input form takes its styles from those you provide for your own pages


(edited out my email so i don't get spammed)

thanks. -cnelson. :)