What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP Shoutbox help

PHP Shoutbox help
Author: Message:
M73A
Veteran Member
*****

Avatar


Posts: 3213
Reputation: 37
34 / Male / Flag
Joined: Jul 2004
O.P. RE: PHP Shoutbox help
quote:
Originally posted by toddy
why would you want new shouts at the top??
you'd have to have the input field at the top too, other wise u would mean that you'd have to view it on full window, or keep scrolling down to add new shouts.
yeah i managed to move the input field at the top too:P

i want the new ones ontop so i dont have to keep clearing it if it gets to long, it will just scroll for ages but the newest ones will be on view :)

heres the indexy one
code:
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>

<body style="overflow-x:hidden;overflow-y:scroll;">

<//------- Start copying from this point -------->

<table class="shoutBox">
<tr><td class="shoutBox">
<p class="heading"><b>.:: ShoutBox ::.</b></p>
<p>
<center>
<form name="shoutForm" method="POST" action="addShout.php">
Name: <input type="text" name="user" size="15"><br>
Shout: <input type="text" name="shout" size="15"><br>
<input type="submit" value="Send!">
</center>
<hr>
<?php

  $fp = fopen("shouts.txt","r");
  while(($shout = fgetcsv($fp,1000,":")) !== FALSE) {
   
     echo "<b>".$shout[0]." : </b>".$shout[1]."<br>";
  }

  fclose($fp);
?>
</p>

</form>
</td></tr>
</table>

<//------- Finish copying from this point -------->

</body>
</html>






And heres the 'Add shout.php' one

code:
<?php

  /* -------------------------------------------------------

                           ShoutBox v1.1
                     By: Mark Lethbridge, 2007

     -------------------------------------------------------

     Install notes:
     Only thing that needs to be changed in this file is the
     line: $shoutbox_page = "index.php";
     You simple change "index.php" into the correct page
     that the shoutbox will appear in.

     -------------------------------------------------------- */

   $fp = fopen("shouts.txt","a");
   fwrite($fp,$_POST['user'].":".$_POST['shout']."\n");
   fclose($fp);
   $shoutbox_page = "http://pps3.awardspace.com/Shoutbox/index.php";
   header("Location: $shoutbox_page");

?>

[Image: lost7ru.gif]
06-08-2007 06:33 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP Shoutbox help - by M73A on 06-08-2007 at 06:05 PM
RE: PHP Shoutbox help - by vikke on 06-08-2007 at 06:14 PM
RE: PHP Shoutbox help - by toddy on 06-08-2007 at 06:22 PM
RE: PHP Shoutbox help - by M73A on 06-08-2007 at 06:33 PM
RE: PHP Shoutbox help - by Nathan on 06-08-2007 at 06:35 PM
RE: PHP Shoutbox help - by M73A on 06-08-2007 at 06:37 PM
RE: PHP Shoutbox help - by Nathan on 06-08-2007 at 06:49 PM
RE: PHP Shoutbox help - by M73A on 06-08-2007 at 06:54 PM
RE: PHP Shoutbox help - by Veggie on 06-08-2007 at 07:13 PM
RE: PHP Shoutbox help - by M73A on 06-08-2007 at 07:14 PM
RE: RE: PHP Shoutbox help - by Veggie on 06-08-2007 at 07:16 PM
RE: PHP Shoutbox help - by Veggie on 06-08-2007 at 07:18 PM
RE: PHP Shoutbox help - by M73A on 06-08-2007 at 07:19 PM
RE: PHP Shoutbox help - by Ezra on 06-08-2007 at 07:24 PM
RE: PHP Shoutbox help - by M73A on 06-08-2007 at 07:25 PM
RE: RE: PHP Shoutbox help - by vikke on 06-08-2007 at 07:43 PM
RE: PHP Shoutbox help - by Nathan on 06-08-2007 at 07:44 PM
RE: PHP Shoutbox help - by Ezra on 06-08-2007 at 07:44 PM
RE: PHP Shoutbox help - by M73A on 06-08-2007 at 09:30 PM
RE: PHP Shoutbox help - by ShawnZ on 06-08-2007 at 09:49 PM
RE: PHP Shoutbox help - by Ezra on 06-08-2007 at 09:52 PM
RE: PHP Shoutbox help - by M73A on 06-08-2007 at 10:07 PM
RE: PHP Shoutbox help - by Ezra on 06-08-2007 at 10:23 PM
RE: PHP Shoutbox help - by M73A on 06-08-2007 at 10:32 PM
RE: PHP Shoutbox help - by Nathan on 06-09-2007 at 10:08 AM
RE: PHP Shoutbox help - by Felu on 06-09-2007 at 10:27 AM
RE: PHP Shoutbox help - by M73A on 06-09-2007 at 06:13 PM
RE: PHP Shoutbox help - by Nathan on 06-09-2007 at 07:03 PM
RE: PHP Shoutbox help - by M73A on 06-09-2007 at 09:42 PM
RE: PHP Shoutbox help - by Nathan on 06-09-2007 at 10:11 PM
RE: PHP Shoutbox help - by M73A on 06-09-2007 at 10:14 PM
RE: PHP Shoutbox help - by Ezra on 06-09-2007 at 11:56 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On