Jump to content

help with shoutbox


fullyloaded

Recommended Posts

hi

i have this shoutbox im trying to edit what i want to do is change this bit of code so the textbox for your name is not a text box but just the name and still work lol hope you know what im talking about and also im trying to ad smileys to it any idea how thanks

<input name="name" value="Your Name" onclick="this.value=''">

 

<?php
$file = "shout.dat";
$open = fopen($file, "a");
$name = $_POST['name'];
$comment= $_POST['comment'];
$url = $_POST['url'];
if($name != "" || $comment != "")
{
if($url != ""){
fwrite($open, "<b><a href='$url'>$name</a></b>>>");}
else{fwrite($open, "$name>>");
}
fwrite($open, "$comment<hr>");
}
echo "<script>window.location='read.php#bot'</script>";
?>

Link to comment
https://forums.phpfreaks.com/topic/38242-help-with-shoutbox/
Share on other sites

hi here you go

<iframe src="read.php#bot" name="read" width="63%" height="30%"></iframe>
<form method="POST" action="say.php" target="read">
<input name="name" value="Your Name" onclick="this.value=''"><br>
<input name="url" value="Your Website" onclick="this.value=''"><br>
<input name="comment" value="Your Message" onclick="this.value=''"><br>
<input type="submit" value="punch it" style="font-size: 10px"><input type="button" onclick="read.location=read.location" value="Refresh" style="font-size: 10px">
</form>

<?php
$file = "shout.dat";
$open = fopen($file, "a");
$name = $_POST['name'];
$comment= $_POST['comment'];
$url = $_POST['url'];
if($name != "" || $comment != "")
{
if($url != ""){
fwrite($open, "<b><a href='$url'>$name</a></b>>>");}
else{fwrite($open, "$name>>");
}
fwrite($open, "$comment<hr>");
}
echo "<script>window.location='read.php#bot'</script>";
?>

Link to comment
https://forums.phpfreaks.com/topic/38242-help-with-shoutbox/#findComment-183212
Share on other sites

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.