Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 为图书馆学校做一个书面联系人_Php_Html_Fwrite - Fatal编程技术网

Php 为图书馆学校做一个书面联系人

Php 为图书馆学校做一个书面联系人,php,html,fwrite,Php,Html,Fwrite,我试图用PHP制作联系人簿, 这个网站为我的学校,我是一名初中老师 但是我不能编写PHP代码/对不起 Index.php here.html 非常感谢。 数据Telah di输入。 塞克迪西 删除表的echo并使用fwrite 嗯,先生。不能写多布尔表1个表,不能写两个tag@YuyunSuriaPriangga-检查更新的代码。更改$fs=fopendata.html,w;不工作:w命令正在工作,但我不需要w命令。我将在一个表中添加数据,其中一个表不会再生成一个表 <?php

我试图用PHP制作联系人簿, 这个网站为我的学校,我是一名初中老师 但是我不能编写PHP代码/对不起

Index.php

here.html

非常感谢。 数据Telah di输入。 塞克迪西 删除表的echo并使用fwrite


嗯,先生。不能写多布尔表1个表,不能写两个tag@YuyunSuriaPriangga-检查更新的代码。更改$fs=fopendata.html,w;不工作:w命令正在工作,但我不需要w命令。我将在一个表中添加数据,其中一个表不会再生成一个表
    <?php
    if(!empty($errorMessage)) 
    {
        echo("<p>There was an error with your form:</p>\n");
        echo("<ul>" . $errorMessage . "</ul>\n");
    } 
?>
<form action="file.php" method="post">
    <p>
        Name<br>
        <input type="text" name="aa" maxlength="50"  />
    </p>
    <p>
        Contact <br>
        <input type="text" name="ab" maxlength="50"  />
    </p>
    <p>
        Books<br>
        <input type="text" name="ac" maxlength="50"  />
    </p>            
    <input type="submit" name="formSubmit" value="Submit" />
</form>
if(empty($errorMessage)) 
{
    $fs = fopen("data.html","w");
    fwrite($fs, "<table > <tr><th>No</th> <th>Name</th> <th>Contact</th> <th>Books</th></tr>");
    fwrite($fs,"
    <tr>
         <td> ".$varaa. "</td>
        <td>" .$varab. "</td>
        <td>" .$varac. "</td>
    </tr>");
    fwrite($fs, "</table >");
    fclose($fs);

    header("Location: here.html");
    exit;
}