I'm create a simple page with php type and code:
echo "<form method=\"post\" action=\"/index.php?page=fb\" >";
echo "<b>field text</b><br>";
echo "<input class=\"form\" name=\"totic\" size=\"42\" type=\"text\"/>";
echo "<br>";
echo "<b>field textarea</b><br>";
echo "<textarea name=\"msg\" cols=80 rows=6></textarea>";
echo "<br>";
echo "<div class=\"center\"><input type=\"submit\" name=\"submit\" value=\"Send\"/></div>";
echo "</form>";
echo "</center>";
If I'm put something to textarea and press Send, I'm get error:
QuoteThe topic or board you are looking for appears to be either missing or off limits to you.
PHP version is:5.2.17
No any mods.
SMF Version: 2.0.11
SP Version: 2.3.6
Pages in simpleportal not support forms or I do something wrong?
global $scripturl;
echo '
<form method="post" action="', $scripturl, '?page=fb">
<b>field text</b><br />
<input class="form" name="totic" size="42" type="text" />
<br />
<b>field textarea</b><br />
<textarea name="msg1" cols="80" rows="6"></textarea>
<br />
<div class="center"><input type="submit" name="submit" value="Send" /></div>
</form>';
You can not use "msg" as the name attribute for any of your input tags as this conflicts with SMF's ../Sources/Display.php file.
The above is your code but using the msg1 attribute in its stead.
Quote from: Chen Zhen on January 15, 2016, 06:20:00 PM
global $scripturl;
echo '
<form method="post" action="', $scripturl, '?page=fb">
<b>field text</b><br />
<input class="form" name="totic" size="42" type="text" />
<br />
<b>field textarea</b><br />
<textarea name="msg1" cols="80" rows="6"></textarea>
<br />
<div class="center"><input type="submit" name="submit" value="Send" /></div>
</form>';
You can not use "msg" as the name attribute for any of your input tags as this conflicts with SMF's ../Sources/Display.php file.
The above is your code but using the msg1 attribute in its stead.
Yes, in this way all is right. Thanks!