acidhoss
11-01-2002, 07:19 PM
Well hello all,
I got a PHP question: I've set up PHP on windows ME and everytime i try getting a script to take form input, i get errors on all of the form elements. Example (this is a script a friend of mine wrote) :
<?
//BVSD Tag Board
//
//
//http://bvsd.********
require ("config.php");
//Strip Slashes
$username = stripslashes($username);
$message = stripslashes($message);
//Check to see if all fields were filled in.
if ( empty($username)) {
$postname = $anonyname;
}
else {
$postname = $username;
}
if ( empty($URL)) {
$nameformat = "<font color=\"#336699\"><B>$postname</b></font>»";
}
elseif ($URL == "http://") {
$nameformat = "<font color=\"#336699\"><B><a href=\"$sitelink\" target=\"_blank\">$postname</a></b></font>»";
}
else {
$nameformat = "<font color=\"#336699\"><b><a href=\"$URL\" target=\"_blank\">$postname</a></b></font>»";
}
if ( empty($message)) {
$msg = $anonymsg;
}
else {
$msg = $message;
}
//Post to datebase
$logit = "$nameformat $msg<br>\n";
$fp = fopen ("tagboard.txt", "a+");
fwrite ($fp, $logit);
fclose ($fp);
header("location: tags.php")
?>
Any idears? Also, Im running on apache 1.3.1and it won't parse the php includes files.
I got a PHP question: I've set up PHP on windows ME and everytime i try getting a script to take form input, i get errors on all of the form elements. Example (this is a script a friend of mine wrote) :
<?
//BVSD Tag Board
//
//
//http://bvsd.********
require ("config.php");
//Strip Slashes
$username = stripslashes($username);
$message = stripslashes($message);
//Check to see if all fields were filled in.
if ( empty($username)) {
$postname = $anonyname;
}
else {
$postname = $username;
}
if ( empty($URL)) {
$nameformat = "<font color=\"#336699\"><B>$postname</b></font>»";
}
elseif ($URL == "http://") {
$nameformat = "<font color=\"#336699\"><B><a href=\"$sitelink\" target=\"_blank\">$postname</a></b></font>»";
}
else {
$nameformat = "<font color=\"#336699\"><b><a href=\"$URL\" target=\"_blank\">$postname</a></b></font>»";
}
if ( empty($message)) {
$msg = $anonymsg;
}
else {
$msg = $message;
}
//Post to datebase
$logit = "$nameformat $msg<br>\n";
$fp = fopen ("tagboard.txt", "a+");
fwrite ($fp, $logit);
fclose ($fp);
header("location: tags.php")
?>
Any idears? Also, Im running on apache 1.3.1and it won't parse the php includes files.
