Shoutbox

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Arctic
-


Joined: 24 Sep 2004
Posts: 560

PostPosted: Tue Dec 14, 2004 1:00 am    Post subject: Shoutbox Reply with quote

Does anyone know a shoutbox script that I can use for my website that goes across not up and down? If someone knows please tell me, I'm looking for one right now...
Back to top View user's profile Send private message ICQ Number
Glitch2082
-


Joined: 02 Dec 2004
Posts: 194

PostPosted: Tue Dec 14, 2004 2:09 am    Post subject: Reply with quote

Make a file called box.php and leave it blank, then make a file called shout.php and put this in it:
Code:

<?php include 'box'; ?><br>
<form method=POST action="shoutpost.php">
<input type='text' name='name'><br>
<input type='text' name='msg'><br>
</form>
?>


Now make a file called shoutpost.php and put this in it:
Code:

<?php
// by Glitch

$name=$_POST['name'];
$msg=$_POST['msg'];
$fp = fopen('box.php','a');
if(!$fp) {
echo "Error writing to file";
}
$write="Name: $name <br> $msg";
fwrite($fp,$write);
fclose($fp);
echo "Your post has been made";
?>


I didn't check it but that should work.
Also to see the shoutbox use the shout.php and it will be there. To include it into a page (with frames etc) use the shout.php also (seeing as its the box)
_________________
int main() {
cout << "Im Pro Apache";
cin.get();
}
Back to top View user's profile Send private message Send e-mail
Arctic
-


Joined: 24 Sep 2004
Posts: 560

PostPosted: Tue Dec 14, 2004 2:14 am    Post subject: Reply with quote

Where do I type in the stuff? Top or bottom? ('i"m not sure but it didn't work that well...)

There's no way to enter the information.... like a enter button or something
Back to top View user's profile Send private message ICQ Number
Glitch2082
-


Joined: 02 Dec 2004
Posts: 194

PostPosted: Tue Dec 14, 2004 2:27 am    Post subject: Reply with quote

Under the first input put:
<input type="submit" value="Submit">

Hope this helps!
_________________
int main() {
cout << "Im Pro Apache";
cin.get();
}
Back to top View user's profile Send private message Send e-mail
Arctic
-


Joined: 24 Sep 2004
Posts: 560

PostPosted: Tue Dec 14, 2004 2:29 am    Post subject: Reply with quote

:P, I just remembered I could make a PHP shoutbox script in a pop-up window.

Thanks though, sorry about me wasting your time :(
Back to top View user's profile Send private message ICQ Number
Glitch2082
-


Joined: 02 Dec 2004
Posts: 194

PostPosted: Tue Dec 14, 2004 2:34 am    Post subject: Reply with quote

Waste of time? Nah, I love to do php :D happy to do it for ya'
_________________
int main() {
cout << "Im Pro Apache";
cin.get();
}
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group