Neo-Anime Forums
Neo-Anime Forums
March 29, 2024, 03:20:44 am
Welcome, Guest. Please login or register.

Login with username, password and session length
 
  Home Help Gallery Staff List Calendar Members Login Register  

Message Board Script

Pages: [1]   Go Down
  Print  
Author Topic: Message Board Script  (Read 84 times)
0 Members and 1 Guest are viewing this topic.
Kadaj
καλλιχτι
*
Offline Offline

Posts: 414


It was ever thus...


View Profile
Badges: (View All)
Combination Topic Starter Poll Voter
« on: March 18, 2010, 09:22:34 pm »

I finally got PHP up and running, and here is my first script in over a year. The simplest ones always appear the most elegant to my eyes.

Before: http://img7.imageshack.us/img7/7008/screenshotnamoroka.png

After: http://img638.imageshack.us/img638/5175/screenshotnamoroka1.png

Script/Files:

Code:
<?php
//Save as fopen2.php
include("fopen1.php");
echo 
"\n\n";
$date mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"));

&
#160; &#160; &#160; &#160; $var1 = "<br \>//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br \><b>" . $_POST['string1'] . "</b><br \>";
&#160; &#160; &#160; &#160; $var2 = "<i>Script called at " . date("H:i:s") . " on " . date("m/d/Y", $date) . "; " . $_POST['string2'] . "</i><br \><br \>";
&#160; &#160; &#160; &#160; $var3 = "<div style='width:575px;'>" . $_POST['string3'] . "</div>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//";

$data sprintf("%s %s %s\n"$var1$var2$var3);

file_put_contents('chat1.txt'$dataFILE_APPEND);

require(
"chat1.txt");
?>

Code:
<?php //Delete this line and save as fopen1.php ?>
<form action="fopen2.php" method="post">
Name: <input type="text" name="string1" value="Username" />
<br \>
Subject: <input type="text" name="string2" value="Re: Chat 1" />
<br \>
Message: <br \>
<textarea rows="6" cols="70" name="string3"></textarea>
<br \>
<input type="submit" value="Post Message" />
</form>

Code:
<h3>~#Chat 1</h3>
<br \>
<?php //Delete this line from < on. Save as chat1.txt ?>
« Last Edit: March 30, 2010, 07:28:44 pm by Kadaj » Report Spam   Logged

I hold you in the highest regard, my friends.

Share on Facebook Share on Twitter


Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal


Submit Express Inc.Search Engine Optimization

Search Engine Submission - AddMe
Theme Provided by

Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy