putnamehere
09-13-2005, 09:13 AM
Hello, i would like to make a chatbox in php the prob is my host dosent let mysql so i need it without mysql, i have looked at almost all the scripts with no myaql but they dont work, anyone ot some code they could show me to help?
kittycat
09-13-2005, 02:51 PM
Do you mean something like this one? http://www.tisherself.org/tutorials/tagger/tagger_tut.htm
If there's a specific script you're having trouble with post the script and the problem here and someone might be able to help you with it. If you haven't tried the one I posted above it's pretty simple to set up and configure
putnamehere
09-13-2005, 06:13 PM
Heya kittycat, thanks for this link. Now then sorry about my bad english, i posted that in school during ICT hence; the bad english. Hopefuly this post will explain itself a lot more. Again thanks for the link but i dont really want a chatbox script, but i do want a chatbox. I was hopeing that it would be possible to learn how to make one and from ther make Guestbooks, Forums ect ect...
So i am looking for code that will let me post text on html basicly.
Heres a script (News script) that dose what i want it to do,
<?
if($HTTP_POST_VARS['submit']) {
if($HTTP_POST_VARS['password'] == 'pass') {
if(!$HTTP_POST_VARS['name']) {
echo "You must enter a name";
exit;
}
if(!$HTTP_POST_VARS['news']) {
echo "You must enter some news";
exit;
}
if(strstr($HTTP_POST_VARS['name'],"|")) {
echo "Name cannot contain the pipe symbol - |";
exit;
}
if(strstr($HTTP_POST_VARS['news'],"|")) {
echo "News cannot contain the pipe symbol - |";
exit;
}
$fp = fopen('index.phtml','a');
if(!$fp) {
echo "Error opening file!";
exit;
}
$line = date("m.d.y") . "|" . $HTTP_POST_VARS['name'];
$line .= "|" . $HTTP_POST_VARS['news'];
$line = str_replace("\r\n","<BR>",$line);
$line .= "\r\n";
fwrite($fp, $line);
if(!fclose($fp)) {
echo "Error closing file!";
exit;
}
} else {
echo "Bad Password";
}
}
?>
<FORM ACTION="<?=$PHP_SELF?>" METHOD="POST" NAME="newsentry">
Your name:<BR>
<INPUT TYPE="text" SIZE="30" NAME="name"><BR>
The News:<BR>
<TEXTAREA NAME="news" COLS="40" ROWS="5"></TEXTAREA><BR><BR>
News Password:<BR>
<INPUT TYPE="password" SIZE="30" NAME="password"><BR>
<INPUT TYPE="submit" NAME="submit" VALUE="Post it!"><BR>
</FORM>
I have hosted a demo of this here; www.phppaul.t35.com/index.phtml
and heres the probs with it,
1) It asks for a password.
2)It uses '|' to devide the name, time and message.
3)It puts all posts on the same line
and another question, how would i make it so that the name, message and time were all posted within a graphical table?
Thanks for any help i knows it a lot of text to read but i wouldent ask if i wasent stuck.