Okee dokee. I just started coding PHP, and with a few sucessful projects, I'm ready to start on a bigger one. I want to make a form where the user(I already have login process done) enters HTML code into a text area and it saves it as $user.htm . Here's the code so far. Note: I do not want the form being submitted to PHP_Self, but to a different .php file. The login page is not available, as it is a .swf flash file.
Here is the page:
http://mnet.danmattia.net/mproject/webdesign.php (Sorry, not allowing non registered people in)
The flash login form POST s the user.
<HTML>
<HEAD>
<TITLE>Web Design</TITLE>
<STYLE TYPE="text/css">
<!--
@import url(default.css);
-->
</STYLE>
<?php
$user = $POST['user'];
?>
</HEAD>
<BODY>
<CENTER><H1>Design your own web page, <?php echo $user; ?>.</H1></CENTER>
<CENTER><H2>EDIT:</H2></CENTER>
<CENTER>
<FORM ACTION="<?php echo $SERVER['PHP_SELF'] ?>" METHOD="POST">
<TEXTAREA NAME="htm" ROWS="20" COLS="75"></TEXTAREA><BR>
<INPUT TYPE="submit" VALUE="Save">
<INPUT TYPE="hidden" NAME="user" VALUE="<?php echo $user ?>">
</FORM>
</CENTER>
<CENTER><H2><A HREF="<?php echo $user ?>.htm" TARGET="_blank">VIEW</A></H2></CENTER>
</BODY>
</HTML>