The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
All I want is a basic script that allows information that is submitted through a text box to appear on the site.
When I say basic I mean basic as in monkey_man's old chat scripts he used to have on his site.
Anybody know of any basic tutorials that could explain how to do this?
I've got a feint idea of what to do, just not how to do it!
Thanks.
Stupid / or \, whatever one that was anoying me.
Thanks again.
Replace ...
fputs($fp, $Data);
... with ...
fputs($fp, "$Data\n");
... or ...
fputs($fp, "\n$Data");
I've been looking around for ages as I wanted to find this out myself but all I could find was that /n is a new line and something to do with setting $string = "/n";
How would I go by changing this code to make it write to a new line?
if ($Data) {
$File = "quotes.txt";
if (file_exists($File)) {
$fp = fopen($File, "w");
flock($fp, 2); # Lock the File.
fputs($fp, $Data);
flock($fp, 3); # Release the File Lock.
fclose($fp);
print "
All done!
\n";} else{
print "
can't find file.
\n";}
} else {
print "
Nothing Entered
\n";}
?>
I just want to test the basics and get the site with a nice layout before I do anythig to it.
http://members.lycos.co.uk/phi11ip/mainpage.php
That's VERY basic but I've got only a little bit of code on that page with two bits...
I just want to see how things work and get a nice picture going.
Anyway, thatnks for your help. I'll ask again if I need help.
$Data = str_replace("<img ", "
This should change the
Chris.
That now allows me to add pictures to the HTML code that I input without them being completely buggered up!
Got a nice little layout designed. I've just got to fill up the spaces now...
However, you'll be unable to use the basic to place the text within a page, you'll need to use:
$File = "whatever.inc";
if (file_exists($File)) {
$fp = fopen($File, "r");
flock($fp, 1); # Lock the File.
$Content = fread($fp, filesize($File));
$Content = stripslashes($Content);
flock($fp, 3); # Release the File Lock.
fclose($fp);
print "$Content\n";
} else {
print "
Can't include the text, file doesn't exist or can't be opened.
\n";}
?>
I rememeber someone mentioning it here, just can't remember what it was...
I just want to get a page working so that I can easily update the main text on my site by going to a text box. I'll probably make a guestbook soon when I can be bothered.
So far though it's gonna look pretty good. I've got a nice little design going.