2016-11-08 6 views
-2

私の問題は、私がブログを作りたいということです。私はコーディングに本当に新しいので、私はあまり良くありません。私の主な問題は、HTMLファイルのテキスト領域からPHPファイルにコードを送信することです。このファイルは修正する方法がわからないことがあります。 (あなたがものを書く)blog.htmlファイルのhtmlファイルのテキスト領域から別のphpファイルにデータを転送

this is a image of the file where someone types their blog it is a html file.

this is the image of the storage place or where all the blogs will be put. It is a phpfile

コード格納領域のための

<!DOCTYPE html> 
 
\t \t <body> 
 
\t \t <h2 style="background-color:blue;color:white"> 
 
\t \t TheBlog 
 
\t \t </h2> 
 
\t </head></font> 
 
\t \t \t <p> <center><h5 style="background-color:blue;color:white"> 
 
\t \t \t This is where you can type the text!</p> 
 
\t \t \t </h5></center> \t 
 
\t \t \t <form action="Storage-Area-For-Blog.php" method="post"> 
 
\t \t \t <textarea name="txtcomment" cols="160" rows="40"></textarea> 
 
    <input type="submit" value="Publish"> 
 
    <input type="reset" name="Clear"> 
 
    </form> 
 
\t <h5><ul> 
 
\t \t \t <li><a href="Blog-Homepage.html">Home</a></li> 
 
\t \t \t <li><a href="Blog-Creating-Process.html">Creation Process</a></li> 
 
\t \t </ul></h5> 
 
\t \t </body>--> 
 
</html> \t

コード

<!DOCTYPE html> 
 
\t <body> 
 
\t \t <?php echo $_POST['txtcomment']; ?> 
 
\t </body> 
 
</html>

+2

これは、HTMLフォーム101であるあなたがしたいこといくつかのチュートリアルを取ってください。 –

+1

質問を編集して_directly_コードを質問に追加してください。スクリーンショットは検索可能ではなく、コピーできず、アクセシビリティが貧弱です。 – Chris

答えて

0

ファイル

<!DOCTYPE html> 
<html> 

<body> 
    <h2 style="background-color:blue;color:white"> 
     TheBlog 
     </h2> 

    <h5 style="background-color:blue;color:white; text-align: center"> 
       This is where you can type the text!</h5> 

    <form name="test" action="process_form.php" method="post"> 
     <textarea name="txtcomment" id="txtcomment" cols="160" rows="40"></textarea> 
     <br> 
     <input type="submit" value="Publish"> 
     <input type="reset" name="clear"> 
    </form> 
    <h5><ul> 
      <li><a href="blog-homepage.html">Home</a></li> 
      <li><a href="blog-breating-process.html">Creation Process</a></li> 
     </ul></h5> 
</body> 
</html> 

form.htmlファイルprocess_form.php

<!DOCTYPE html> 
<html> 
    <body> 
     <?php echo $_POST['txtcomment']; ?> 
    </body> 
</html> 

この作品...

+0

私のコードをコピーしました。他に何が必要ですか? – DaFois

+0

ありがとうございます。ただし、htmlファイルのテキストは、そのphpファイルには表示されません。あなたはそれについて何か知っていますか? – Synote

+0

あなたはあなたのコード、pとh5のオーバーラップするタグ、非推奨のタグ、bodyタグ内の閉じた頭部に多くのエラーがあるところで、タグ – DaFois

関連する問題