View previous topic :: View next topic |
Author |
Message |
Arctic -
Joined: 24 Sep 2004 Posts: 560
|
Posted: Tue Dec 14, 2004 1:00 am Post subject: Shoutbox |
|
|
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 |
 |
 |
Glitch2082 -
Joined: 02 Dec 2004 Posts: 194
|
Posted: Tue Dec 14, 2004 2:09 am Post subject: |
|
|
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 |
|
 |
Arctic -
Joined: 24 Sep 2004 Posts: 560
|
Posted: Tue Dec 14, 2004 2:14 am Post subject: |
|
|
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 |
 |
 |
Glitch2082 -
Joined: 02 Dec 2004 Posts: 194
|
Posted: Tue Dec 14, 2004 2:27 am Post subject: |
|
|
Under the first input put:
<input type="submit" value="Submit">
Hope this helps! _________________ int main() {
cout << "Im Pro Apache";
cin.get();
} |
|
Back to top |
|
 |
Arctic -
Joined: 24 Sep 2004 Posts: 560
|
Posted: Tue Dec 14, 2004 2:29 am Post subject: |
|
|
: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 |
 |
 |
Glitch2082 -
Joined: 02 Dec 2004 Posts: 194
|
Posted: Tue Dec 14, 2004 2:34 am Post subject: |
|
|
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 |
|
 |
|