Jump to content

shoutbox...PLEASE LOOK AT IT :p


runnerjp

Recommended Posts

hey hey all ok iv got shout box all set up at [url=http://www.runnerselite.com/shoutbox/shoutbox.php]www.runnerselite.com/shoutbox/shoutbox.php[/url]
and what im tryin to do is set it up so i can display peoples messages on my index page as a marquee ... so i got this php script to do this

[code]<?php


#################################


include("shoutbox/config/config.php"); -- this is folder i have stuck it in!!


#################################





mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());


// Select the database.


mysql_select_db($dbname) or die(mysql_error());





$query = "SELECT message, author, eml FROM shoutbox order by id DESC LIMIT 1";


$result = mysql_query($query);











    while($r=mysql_fetch_array($result))


    {





        echo "<marquee><font size='3'>$r[message] - <a href=\"$r[eml]\">$r[author]</a></font></marquee>";





    }





        ?>[/code]

and on my homepage where i wanted the marquee to appear i added this
<?php include("shoutbox/marq.php")?>

and nothing seems to happen even tho their is a message "test message" in the shoutbox bit :S any ideas any one pllleeaaasssseeeeee
Link to comment
https://forums.phpfreaks.com/topic/17486-shoutboxplease-look-at-it-p/
Share on other sites

[quote author=runnerjp link=topic=104175.msg415471#msg415471 date=1155567865]
no right shunt the marque code bit be in the php script i pasted above ???
[/quote]

What?

[code]<?php
#################################
include("shoutbox/config/config.php"); -- this is folder i have stuck it in!!
#################################

mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());
// Select the database.
mysql_select_db($dbname) or die(mysql_error());
$query = "SELECT message, author, eml FROM shoutbox order by id DESC LIMIT 1";
$result = mysql_query($query);
$marquee = "";
while($r=mysql_fetch_array($result))
{
  $marquee.= $r[message]. '<a href=\"$r[eml]\">'. $r[author]. '</a>'";
}
echo "<marquee><font size='3'>". $marquee. "</font></marqee>";
?>[/code]
[quote]i find it easyer to look at what i am doing)useing graphics rather then html [/quote]

Until you're prepared to look at code there's virtually no hope of you getting it working.  Somewhere in that generated mess is where the working php code needs to get included.

How your editor allows that is a mystery to me.
<?php
#################################
include("config/config.php");
#################################

mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());
// Select the database.
mysql_select_db($dbname) or die(mysql_error());
$query = "SELECT message, author, eml FROM shoutbox order by id DESC LIMIT 1";
$result = mysql_query($query);
$marquee = "";
while($r=mysql_fetch_array($result))
{
  $marquee.= $r[message]. '<a href=\"$r[eml]\">'. $r[author]. '</a>'";
}
echo "<marquee><font size='3'>". $marquee. "</font></marqee>";
?>
???

I guess you are saying that you can't see your website content?

Make sure that you have uploaded all files that your site relies on to show content (all php files, all include files, all pictures, etc...), and make sure that these files are in the same folder structure as they were on your local machine, i.e. if all your website graphics were in a folder called "graphics" on your local machine, make sure you have all those files in a "graphics" folder on your web host.

Also, if you changed your PHP file name to index.php, you need to be sure that any files you included or referenced know about this name change, i.e. if your file was previously called "test.php" and you changed it to "index.php", make sure all calls to "test.php" get changed to "index.php".
its wierd  ok iv only got my index page set up and the shoutbox page...and thats oviusly a php.... my files where allready loaded to the site when it was a html site... all iv done is change it to php and it wnt lket me add anything at alll????  i changed it back to html and everything was their....its even loadin slow as if the images are going to apear and they dnt :S
[quote author=runnerjp link=topic=104175.msg415597#msg415597 date=1155574398]
its wierd   ok iv only got my index page set up and the shoutbox page...and thats oviusly a php.... my files where allready loaded to the site when it was a html site... all iv done is change it to php and it wnt lket me add anything at alll????  i changed it back to html and everything was their....its even loadin slow as if the images are going to apear and they dnt :S
[/quote]

Post the full code of both your index and shoutbox pages please...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.