i am trying to create a message commentin system, All seems to have gone well except that after the user enters the message and submits in order to make the php script work the data has to be fowarded to url/comment.php
but i want the user to see index.php?content=comment.php.
if i change the line <form action="/Site/Posts/comment.php" method="POST"> to the above" ?content=" the script no longer works
please help
<html>
<head>
<title>comment</title>
<SCRIPT LANGUAGE="php"> $post="5805.html"; </SCRIPT>
<SCRIPT LANGUAGE="php"> $comments="comment.html"; </SCRIPT>
<SCRIPT LANGUAGE="php"> @ require_once ($post); </SCRIPT>
<SCRIPT LANGUAGE="php"> @ require_once ($comments); </SCRIPT>
<SCRIPT LANGUAGE="php">
if ($POST["post"])
{
if ($POST["name"]=="")
{
}else{
$file=fopen("comment.html", "a+");
$today = date("F j, Y");
$entry="Posted on: ";
$entry.=$today;
$entry.="\n";
$entry.="Name: ";
$entry.=$POST["name"];
$entry.="\n";
$entry.="Comments: ";
$entry.=$POST["comments"];
$entry.="\n";
$entry.="\n";
$entry.="\n";
$entry=stripslashes($entry);
fwrite($file,$entry);
fclose($file);
}
}
if ($POST["post"])
{
if ($POST["name"]=="")
{
echo " can't write nothing !";
}}else{
$file=fopen("comment.html", "r");
$contents=nl2br($contents);
fclose($file);
}
</SCRIPT>
<form action="/Site/Posts/comment.php" method="POST">
Name::<input type="text" name="name" "><br>
Comments::<Textarea cols=50 rows=5 name="comments"></textarea><br>
<input type="submit" name="post" value="Spit it out already ">
<a href="?current=main.php">Back to main</a>
</head>
link to ?current site
http://www.binaryc.net/?current=Posts/comment.php
link to comment.php
http://24.190.67.254:81/Site/Posts/comment.php