Database Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesDatabase Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 9th, 2005, 02:01 PM
joey-schmoey joey-schmoey is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 1 joey-schmoey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 7 sec
Reputation Power: 0
Mysql Shoutbox Problem

Hello I'm having a problem hope someone can help because I really don't understand what I'm doing really here is some of the code I'm trying to do a shoutbox with avatars but avatar isn't the problem I'm having and would just like to get the shoutbox working I post and the text doesn't appear the problem probably has a really simple solution but I can't see it, thanks for any help.

PHP Code:
<?php
function shoutView(){ 
$sql "SELECT * FROM `shout` ORDER BY id DESC LIMIT 6";
$color1 "#808080";
$color2 "#666666";
$e_shout mysql_query($sql) or die(mysql_error());
echo 
"<TABLE CELLPADDING=\"3\" CELLSPACING=\"1\" WIDTH=\"40%\">";
while (
$shoutboxx mysql_fetch_array($e_shout));{
$row_color = ($row_count 2) ? $color1 $color2;


echo "
<TR>
<TD ALIGN='CENTER' BGCOLOR=\"$row_color\"><A HREF=\"".$shoutboxx['url']."\">".$shoutboxx['post_by']."<BR>".$shoutboxx['avatar']."</A>:</TD>
<TD BGCOLOR=\"$row_color\">".$shoutboxx['content']."</TD>
";
$row_count++;
}
echo "</TR></TABLE>";
}
function shoutAdd(){
include("db.php");
if($_POST['addShout'])
{
$post_byE = $_POST['name'];
if((!$_POST['name'])){
echo "Required field \"name\" Not complete";
exit();
}
$post_by = htmlentities($post_byE, ENT_QUOTES);
$urlE = $_POST['URL'];
$url = htmlentities($urlE, ENT_QUOTES);
$contentE = $_POST['content'];
$content = htmlentities($contentE, ENT_QUOTES);
echo "<center>Shout Item Added! You will be redirected in 5 seconds...</center>";
$sql = mysql_query("INSERT INTO `shout` (post_by,url,content,post_date) VALUES ('$post_by','$url','$content', NOW())") or die (mysql_error());
exit();
}
echo "
<FORM action='index.php' method='post'>
<TABLE width='410' align='center'>
<TR>
<TD>Name:</TD>
<TD><INPUT type='text' name='name' id='name'></TD>
<TR>
<TD>URL:</TD>
<TD><INPUT type='text' name='url' id='url'></TD>
<TR>
<TD>Content:</TD>
<TD><INPUT type='text' name='content' id='content'></TD>
</TR>
<TR>
<TD align='center' colspan='2'><BR><INPUT type='submit' name='addShout' value='Submit'></TD>
</TR>
</TABLE>
</FORM>";
}
?>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesDatabase Development > Mysql Shoutbox Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway