图像上传时未定义的索引错误

时间:2018-05-13 00:51:03

标签: php mysql

我得到未定义的索引错误第14行。不确定我在这里缺少什么。一直在看这个。任何帮助赞赏。不确定它是如何得不到['image]的索引的。我已经拿出代码来捕获错误,希望能让这部分工作。

<!doctype html>
<html>
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
<div class="form-group">
    <form action="subjsearch.php" method="post">
        <div class="form-group row">
            <label for="fn" class="col-md-1 col-form-label">FirstName:</label>
      <div class="col-sm-10">
        <input type="text" id="fn" name="firstname">
        </div>
        </div>

        <div class="form-group row">
            <label for="ln" class="col-md-1 col-form-label">LastName:</label>
            <div class="col-sm-10">
        <input type="text" id="ln" name ="lastname">
        </div>
        </div>

        <div class="form-group row">
            <label for="bday" class="col-md-1 col-form-label">D.O.B:</label>
            <div class="col-sm-10">
        <input type="text" id="bday" name="dob" size = "7">
        </div>
        </div>

        <div class="form-group row">
            <label for="mn" class="col-md-1 col-form-label">Moniker:</label>
            <div class="col-sm-10">
        <input type="text" id="mn" name="moniker">
        </div>
        </div>

        <div class="form-group row">
            <label for="img" class="col-md-1 col-form-label">Picture:</label>
            <div class="col-sm-10">
        <input type="file" id="img" name="image">
        </div>
        </div>
        <input type="submit" name="submitBTN" value="Submit">
        <input type="submit" name="searchBTN" value="Search">
        <input type="reset" name="resetBTN" value="Reset">
    </form> 
    </div>
</body>
</html>

我的表格:

$id_foro

0 个答案:

没有答案