Hi, Guest ~ Login or Register

The shoutbox tutorial..

Posted in Website Programming » PHP - Monday 24th September 2007 at 4:49PM

G3lm!s
Member

User Avatar

Joined September 2007
Posts: 2

The tutorial on the shoutbox has some errors in it.
(http://www.avengex.com/tutorials/87/Creating_a_Shoutbox/)

You should change the show.php to:

<?
include("connect.php");
$query = mysql_query("SELECT * FROM shoutbox ");
$query = mysql_query("SELECT * FROM `shoutbox` ORDER BY `id` DESC LIMIT 0 , 20 ");
if(mysql_error()) {
print(mysql_error());
}
while($row = mysql_fetch_array($query)) {
echo '<b><a href='.$row['link'].' title='.$row['name'].' posted on '.$row['date'].'>'.$row['name'].'</b></a >:'.$row['message'].'<br>';
}
?>


And the one line in process.php
From this:

<input type="submit" name="Submit" value="Submit" style="border: solid 1px #000000; font: Verdana; font-size: 10px; background: #f8f8f8;">


To this:
<input type="submit" name="submit" value="submit" style="border: solid 1px #000000; font: Verdana; font-size: 10px; background: #f8f8f8;">


And now it should work :D

__________________________________

 

Replies (14)

Replied - Monday 24th September 2007 at 6:37PM [Post Link]

Will
Administrator

User Avatar

Joined October 2005
Posts: 129

Cheers, but what were the errors?

__________________________________
Will Morgan
Freelance Web Developer
Next feature: How to fit 25 hours into a day!

 
Replied - Monday 24th September 2007 at 7:32PM [Post Link]

Alec
Super Moderator

User Avatar

Joined April 2007
Posts: 124

Good. Sure this isn't anywhere else on the net?

__________________________________
My Personal Portfolio Site

 
Sponsored Link
Replied - Monday 24th September 2007 at 7:33PM [Post Link]

G3lm!s
Member

User Avatar

Joined September 2007
Posts: 2

For show.php:
Parse error: syntax error, unexpected '"', expecting ',' or ';' in show.php on line 13

And for the process.php it didn't send it to the database cause of the capitalization.

__________________________________

 
Replied - Monday 24th September 2007 at 7:57PM [Post Link]

Tubby
Member

User Avatar

Joined July 2007
Posts: 47

yeh that things a piece of crap. Im allowed to say that, I wrote it.

__________________________________
All posts are my own opinion.

 
Sponsored Link
Replied - Monday 24th September 2007 at 10:10PM [Post Link]

adam2z
Member

User Avatar

Joined October 2005
Posts: 113

that thing is a piece of crap. im allowed to say that, tubby wrote it.

and i allowed to say that because i suck far more than tubby does at coding :D

__________________________________

 
Replied - Monday 24th September 2007 at 10:11PM [Post Link]

Will
Administrator

User Avatar

Joined October 2005
Posts: 129

That thing is a piece of crap and is probably better off deleted. I'll make it so..

__________________________________
Will Morgan
Freelance Web Developer
Next feature: How to fit 25 hours into a day!

 
Replied - Monday 24th September 2007 at 11:05PM [Post Link]

Brad
Member

User Avatar

Joined April 2007
Posts: 85

Go shitty shoutboxes.

I think the low-end tutorials should be pruned, anyway. Just saying.

__________________________________
Brad Purchase
Programmer, Designer, and Apple Tart.

 
Replied - Tuesday 25th September 2007 at 2:38AM [Post Link]

Xplicid
Member

User Avatar

Joined April 2007
Posts: 56

I don't think I recall one good half teaching-full (That even a word?) tutorial on how to make a shoutbox a while back when I started. It made me go crazy.

Aye tubby, it's shit :p

__________________________________
Go play in traffic. Thx. Luv ya.

 
Replied - Wednesday 26th September 2007 at 7:42AM [Post Link]

Alex
Member

User Avatar

Joined July 2007
Posts: 31

[QUOTE] Xplicid said (25th September @ 1:38am):

I don't think I recall one good half teaching-full (That even a word?) tutorial on how to make a shoutbox a while back when I started. It made me go crazy.

Aye tubby, it's shit :p



Shoutboxes are the easiest thing to make in php.

__________________________________
Aim2Break Records

 
Replied - Wednesday 26th September 2007 at 11:32AM [Post Link]

Brad
Member

User Avatar

Joined April 2007
Posts: 85

[QUOTE] (Unsourced):

Alex said (26th September @ 6:42am):

[quote=Xplicid;1190684328]I don't think I recall one good half teaching-full (That even a word?) tutorial on how to make a shoutbox a while back when I started. It made me go crazy.

Aye tubby, it's shit :p



Shoutboxes are the easiest thing to make in php.



...As long as you know a side-component, MySQL. That probably makes it not the easiest, but it is very easy.

__________________________________
Brad Purchase
Programmer, Designer, and Apple Tart.

 
Replied - Wednesday 26th September 2007 at 7:17PM [Post Link]

adam2z
Member

User Avatar

Joined October 2005
Posts: 113

[QUOTE] Alex said (26th September @ 6:42am):



Shoutboxes are the easiest thing to make in php.

that is a stupidly subjective statement. i would think that a script printing hello world would be easier. etc.

__________________________________

 
Replied - Wednesday 26th September 2007 at 9:41PM [Post Link]

Brad
Member

User Avatar

Joined April 2007
Posts: 85

[QUOTE] (Unsourced):

adam2z said (26th September @ 18:17pm):

[quote=Alex;1190788970]

Shoutboxes are the easiest thing to make in php.

that is a stupidly subjective statement. i would think that a script printing hello world would be easier. etc.



I was thinking the same, but hello world is simply printing text. I think Alex meant system-wise. However, it's not true. Anything you would do without MySQL and doesn't use more than 100 lines is easier, because it requires no hassle with setting up/connecting to databases.

__________________________________
Brad Purchase
Programmer, Designer, and Apple Tart.

 
Replied - Saturday 29th September 2007 at 6:33AM [Post Link]

Xplicid
Member

User Avatar

Joined April 2007
Posts: 56

[QUOTE] (Unsourced):

Alex said (26th September @ 6:42am):

[quote=Xplicid;1190684328]I don't think I recall one good half teaching-full (That even a word?) tutorial on how to make a shoutbox a while back when I started. It made me go crazy.

Aye tubby, it's shit :p



Shoutboxes are the easiest thing to make in php.



Comments like these are why noone joins, or stays really..

__________________________________
Go play in traffic. Thx. Luv ya.

 
Replied - Saturday 29th September 2007 at 11:37AM [Post Link]

Will
Administrator

User Avatar

Joined October 2005
Posts: 129

Shoutboxes are one of the simplest things to make in PHP, mine took me about 5 minutes :P

Maybe if a tutorial involving some Javascript and so on was written, people might find that more helpful?

__________________________________
Will Morgan
Freelance Web Developer
Next feature: How to fit 25 hours into a day!