runnerjp
-
Posts
2,214 -
Joined
-
Last visited
Posts posted by runnerjp
-
-
hey all ok i have a shoutbox but on a different page....i want it to come up as a pop up box so the information can be entered and then the results will appearin the marquee ( i already know how to do this) its just the opoup windows part :S any1 help
-
hey all...ok i have this code to retrieve the shouts posted and then its displaed as a marquee
[quote]<?php
#################################
include("shoutbox/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>";[/quote]
rite but the shout box i have saves the stuff in a textbox...it has instructions to make it mysql but very complex.... anyways is their away to retrieve the posts from the txt file?? -
ok at mo im useing sitespinner basicly a wysiwyg builder
i am thinkin of just duing it as html.... what are the advantages of doing this???
would it make the size of my site smaller at all ???
what else would it do??? -
i added it and it just came up as text ???
-
sweet wat it do??
-
hey ok all iv done to my website is add a layout i created with photoshop and its realllyyy sloww loading ... [url=http://www.runnerselite.com]www.runnerselite.com[/url] is their any way to compress my website or something so it loads faster :(
-
thnajks thats info i needed i wanna make 1 myself :D
-
hey all...i need a phpshow box with admin features..... can any 1 help me???
-
at the moment iv had to change from my wysiwyg website delvliper site spinner and attempt to learn dreamweaver and i was wundering what every 1 else uses and what ur site look like???
-
the marquee i need it an on going thing...it will look good once tis done dnt worrie...what did u mean about number to...the image to show text bit???
-
im gonna try doin it all in dreamweaver
is it easyish to use -
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
-
HELL ALL...
i changed my index.html page to a index.php so that i could use a php script on my site ( the margue so i could have visitors leave messages and it show up in the marquee...yet now when i add text or a picture useing a wysiwyg maker ( sitespinner) i publish the project useing ftp and nothing happens... the site does not get updated.... is it because its a .php site ?? -
ok new problem.... now iv changed it to index.php everything i add to my website doesnt come up when published to web :(...i added i runnin man and it dunt go onto website...why is this... its a jpg file...should this affect it??
-
wahooo its worked
thanks all -
<?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>";
?> -
ok i did that now its comeing up with Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/runnerse/public_html/maq.php on line 16
-
well all i gotta do is enter my code in the this code area on my website (its like a buttin u press and it brings up like a word document where u can enter your codes) iv added the error log if thats a help????
-
still comes up with nothing :S
-
thanks :D yer colour will be added with pictures and stuff... its just that i did start makin the site got content on it then got told the layout was pants and have had to start from scratch...just by askin now i can add to it and keep makin sure it looks good :D thanks m8
what wpuld you suggest i do to the top banner cmgmyr -
hey hey all... i just want ppl to look at my basic layout b4 i add stuff to it so i can change it if need b.... so whats you all think??
[url=http://www.runnerselite.com]www.runnerselite.com[/url] -
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 -
yup ok im really really confuzzeld
i have made the shout box
[code]<style type="text/css">
<!--
body,td,th {
font-size: 14px;
font-weight: bold;
color: #FFFFFF;
}
body {
background-color: #333333;
}
-->
</style><b>
<?php
// You just need to configure these 4 variables to match your server.
include("config/config.php");
// If a user has submitted a post, we want to :
// 1. Validate it
// 2. Strip unwanted html
// 3. Make sure messages and names aren't too long
// 4. Add it to our database.
if($_POST['submit']) {
// 1. Validate it, by checking all the form inputs were filled in
if(!$_POST['author']) {
echo 'Error ! : No name entered';
die;
}
if(!$_POST['eml']) {
echo 'Error ! : No email entered';
die;
}
if(!$_POST['message']) {
echo 'Error ! : No message entered';
die;
}
// 2. Strip unwanted HTML
// Look up the strip_tags() function at
// http://www.php.net/manual/en/function.strip-tags.php for more info
$message = strip_tags($_POST['message'], '');
$eml = strip_tags($_POST['eml'], '');
$author = strip_tags($_POST['author'], '');
// 3. Make sure messages and names aren't too long
// We will use the strlen() function to count the length.
$message_length = strlen($message);
$author_length = strlen($author);
if($message_length > 150) {
echo "Error ! : Your message was too long, messages must be less than 150 chars";
die;
}
if($author_length > 150) {
echo "Error ! : Your name was too long, names must be less than 150 chars";
die;
}
// 4. Add it to our database.
// If the script hasn't died yet due to an error in the inputted data
// we need to add the data to the database
// Lets connect to our database.
mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());
// Select the database.
mysql_select_db($dbname) or die(mysql_error());
// Lets define the date format we want to enter to our database
// go here for more details
// http://www.php.net/manual/en/function.date.php
$date = date("h:i A dS M");
// This will produce 11:02 25th Aug
// Set the query as $query
$query = "INSERT INTO shoutbox (message, author, eml, date, ip)
VALUES ('$message','$author','$eml','$date','$_SERVER[REMOTE_ADDR]')";
mysql_query($query);
mysql_close();
// Show thanks message and take them back to the main shoutbox
echo "Thanks for your post<BR>";
echo "<A HREF='shoutbox.php'>View the shoutbox</A>";
// If they haven't submitted a post, we want to :
// 1. Show the latest shouts
// 2. Show the shout post form
} else {
// 1. Show the latest shouts
// Lets connect to our database.
mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());
// Select the database.
mysql_select_db($dbname) or die(mysql_error());
// Set the query as $query, and get the last 10 posts.
$query = "SELECT message, author, eml, date, ip
FROM shoutbox order by id DESC LIMIT 10";
$result = mysql_query($query);
echo "<TABLE>";
while($r=mysql_fetch_array($result))
{
// To modify the appearance, edit this :
echo "<TR>
<TD><font size='1'>
Posted $r[date] by <A HREF='mailto:$r[eml]'>
$r[author]</A></font></TD>
</TR>
<TR>
<TD><font size='1'>$r[message]</font></TD>
</TR>
<TR>
<TD><HR></TD>
</TR>";
}
echo "</TABLE>";
// 2. Show the shout post form
?><style type="text/css">
<!--
body,td,th {
font-family: BankGothic Lt BT;
font-size: 12px;
}
a:link {
color: #000000;
}
a:visited {
color: #000000;
}
a:hover {
color: #000000;
}
a:active {
color: #000000;
}
-->
</style>
<FORM METHOD=POST ACTION="shoutbox.php">
<TABLE>
<TR>
<TD>Name :</TD>
<TD><INPUT TYPE="text" NAME="author"></TD>
</TR>
<TR>
<TD>Email :</TD>
<TD><INPUT TYPE="text" NAME="eml"></TD>
</TR>
<TR>
<TD>Message :</TD>
<TD><INPUT TYPE="text" NAME="message"></TD>
</TR>
<TR>
<TD> </TD>
<TD><INPUT TYPE="submit" name="submit" value="post"></TD>
</TR>
</TABLE>
</FORM>
<?php
}
?>
</b>[/code]
ok i want to add a marquee on my homepage (index page) just showing some of the new posts...can any one give me code to do this cos wats said above is very confuzzlin haha -
hey hey all...ok i wanna have a shout box where there is a scrolling area like a marquee on the top of my page saying what is happening.... any way i can do this all please please help
shoutbox!!
in PHP Coding Help
Posted
gimme a sec to get info u need :D