Tech Support banner

Status
Not open for further replies.
1 - 1 of 1 Posts

·
Registered
Joined
·
1 Posts
Discussion Starter #1
I have been making a comments system for my website (pretty-in-punk.com). I am fairly new to both HTML and PHP and have ran into a bit of a problem. Here is the page I have been testing it on. As you can see, the comments do not all fit in the pink box that is labbeled 'Comments:'. I would like the comments to stay in that box and for that box to extend when a comment is added too fit it. I would need all below content to move down as well so it doesn't overlap.

Here is the revelvant (some unrelevant stuff too but just ignore that) part of the code -
PHP:
echo "<div class=\"wpmd\">\n";
echo "<div><font color=\"#FFFFFF\">© Copyright 2005 - Pretty-In-Punk.com.</font></div>\n";
echo "</div>\n";
echo "</div>\n";
echo "\n";
echo "<div id=\"text4\" style=\"position:absolute; overflow:hidden; left:4px; top:253px; width:150px; height:90px; z-index:16\">\n";
echo "</div>\n";
echo "\n";
echo "<div id=\"text5\" style=\"position:absolute; overflow:hidden; left:249px; top:196px; width:545px; height:66px; z-index:17\">\n";
echo "<div class=\"wpmd\">\n";
echo "<div><font class=\"ws36\" color=\"#FFFFFF\" face=\"Verdana\"><B>Jimmy Eat World</B></font></div>\n";
echo "</div>\n";
echo "</div>\n";
echo "\n";
echo "<div id=\"text6\" style=\"position:absolute; overflow:hidden; left:206px; top:198px; width:150px; height:28px; z-index:18\">\n";
echo "<a href=\"hash.html\"><div class=\"wpmd\">\n";
echo "<div><a href=\"J.html\">Back</a></div>\n";
echo "</div>\n";
echo "</a></div>\n";
echo "\n";
echo "<div id=\"image9\" style=\"position:absolute; overflow:hidden; left:285px; top:256px; width:400px; height:287px; z-index:19\"><img src=\"images/jimmyeatworld.jpg\" border=0 width=400 height=287></div>\n";
echo "\n";
echo "<div id=\"text7\" style=\"position:absolute; overflow:hidden; left:252px; top:548px; width:376px; height:336px; z-index:20\">\n";
echo "<div class=\"wpmd\">\n";
echo "<div><font class=\"ws12\" color=\"#000000\"><B>Originated In: </B></font><font class=\"ws12\" color=\"#FFFFFF\">Arizona, USA</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#000000\"><B>Band Members:</B></font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">Jim Adkins: Vocals and Guitar </font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">Tom Linton: Guitar and Vocals </font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">Rick Burch: Bass </font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">Zach Lind: Drums</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#000000\"><B>Label:</B></font><font class=\"ws12\" color=\"#000000\"> </font><font class=\"ws12\" color=\"#FFFFFF\">?</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#000000\"><B>Albums:</B></font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">2004 - Futures</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">2004 - Firestarter</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">2001 - Bleed America</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">2000 - Split</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">2000 - Singles</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">1999 - Clarity</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">1998 - Jimmy Eat World</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">1996 - Static Prevails</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">1994 - One, Two, Three, Four</font></div>\n";
echo "<div><font class=\"ws12\" color=\"#FFFFFF\">1994 - Jimmy Eat World</font></div>\n";
echo "</div>\n";
echo "</div>\n";
echo "\n";
echo "<div id=\"shape4\" style=\"position:absolute; overflow:hidden; left:185px; top:1691px; width:563px; height:314px; z-index:21; background-color:#FF8080\"> </div>\n";
echo "\n";
echo "<div id=\"text8\" style=\"position:absolute; overflow:hidden; left:195px; top:1696px; width:256px; height:24px; z-index:22\">\n";
echo "<div class=\"wpmd\">\n";
echo "<div><font class=\"ws14\"><B>Comment on this band:</B></font></div>\n";
echo "</div>\n";
echo "</div>\n";
echo "\n";
echo "<form name=\"comment\" method=\"POST\" action=\"commentadd.php\">\n";
echo "<input name=\"poster\" type=\"text\" style=\"position:absolute;width:200px;left:282px;top:1726px;z-index:25\">\n";
echo "<input name=\"postemail\" type=\"text\" style=\"position:absolute;width:200px;left:282px;top:1757px;z-index:26\">\n";
echo "<input name=\"posttitle\" type=\"text\" style=\"position:absolute;width:200px;left:281px;top:1789px;z-index:27\">\n";
echo "<textarea name=\"posttxt\" style=\"position:absolute;width:204px;height:125px;left:280px;top:1825px;z-index:28\"></textarea>\n";
echo "<input type=\"hidden\" name=\"assume\" value=\"true\">\n";
echo "<input name=\"submit\" type=\"submit\" value=\"Submit\" style=\"position:absolute;left:281px;top:1956px;z-index:30\">\n";
echo "</form>\n";
echo "\n";
echo "<div id=\"text9\" style=\"position:absolute; overflow:hidden; left:201px; top:1732px; width:150px; height:124px; z-index:24\">\n";
echo "<div class=\"wpmd\">\n";
echo "<div><B>Your Name:</B></div>\n";
echo "<div><B><BR></B></div>\n";
echo "<div><B>Your Email:</B></div>\n";
echo "<div><B><BR></B></div>\n";
echo "<div><B>Subject:</B></div>\n";
echo "<div><B><BR></B></div>\n";
echo "<div><B>Comment:</B></div>\n";
echo "<div><B><BR></B></div>\n";
echo "<div><B><BR></B></div>\n";
echo "</div>\n";
echo "</div>\n";
echo "\n";
echo "<div id=\"shape5\" style=\"position:absolute; overflow:hidden; left:185px; top:903px; width:563px; height:784px; z-index:21; background-color:#FF8080\"> </div>\n";
echo "\n";
echo "<div id=\"text10\" style=\"position:absolute; overflow:hidden; left:188px; top:902px; width:181px; height:43px; z-index:32\">\n";
echo "<div class=\"wpmd\">\n";
echo "<div><font class=\"ws24\"><B>Comments:</B></font></div>\n";
echo "</div>\n";
echo "</div>\n";
echo "\n";
echo "<div id=\"hr1\" style=\"position:absolute; overflow:hidden; left:187px; top:934px; width:555px; z-index:33\">\n";
echo "<hr size=2 width=555>\n";
echo "</div>\n";
echo "\n";
echo "<div id=\"html3\" style=\"position:absolute; overflow:hidden; left:191px; top:949px; width:500px; z-index:34\">\n";

$dbh=mysql_connect ("localhost", "prettyin_Kate", "*************") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("prettyin_comments"); 
      
    $result = @mysql_query("SELECT * FROM comtbl ORDER BY postID DESC"); 
    if (!$result) { 
      echo("<b>Error performing query: " . mysql_error() . "</b>"); 
      exit(); 
    } 
    
    while ($row = mysql_fetch_array($result) ) { 
	$msgTxt = $row["postTXT"];
	$msgId = $row["postID"]; 
	$SigName = $row["posterNAME"];
	$SigDate = $row["postTIME"];
	$msgTitle = $row["postTITLE"];
	$url = $row["posterEMAIL"];
	$yr = substr($SigDate, 2, 2);
	$mo = substr($SigDate, 4, 2);
	$da = substr($SigDate, 6, 2);
	$hr = substr($SigDate, 8, 2);
	$min = substr($SigDate, 10, 2);
	if ($hr > "11") {
	$x = "12";
	$timetype = "PM";
	$hr = $hr - 12;
	}else{
	$timetype = "AM";
	}
	if (!$url) {
	$url = "#";
	}else{
	$stat = $url;
	$url = "mailto:" . $url . "";
	}


echo ("<p><b>$msgTitle:</b> <br><div align=right>
   $hr:$min $timetype | $mo/$da/$yr | $msgId, <a href='$url'>$SigName</a></div></p>");
$new = htmlspecialchars("$msgTxt", ENT_QUOTES);
echo $new; // <a href='test'>Test</a>

    } 

echo "\n";
echo "\n";
echo "</body>\n";
echo "</html>\n";
?>
Please excuse the messy messy code. Any help would be appreciated but please remember, I am a bit of a "n00b?" to this.

Thank you.
 
1 - 1 of 1 Posts
Status
Not open for further replies.
Top