2016-12-03 17 views
0

我有一個問題想與大家分享。 我開發了一個WordPress的自定義頁面,這裏是頁面http://muhammadimran.info/testing/的鏈接,當我嘗試點擊新文檔按鈕並嘗試提交表單時,它給我錯誤。這裏是我的代碼爲這個請告訴我,我怎麼能在行動中給予的鏈接在WordPress如何在點擊提交按鈕後將數據傳輸到另一個頁面

<div class="modal-content"> 
    <div class="modal-header"> 
    <button type="button" class="close" data-dismiss="modal">&times;</button> 
    <h4 class="modal-title">Modal Header</h4> 
    </div> 
    <div class="modal-body"> 
    <form action="home1.php" enctype="multipart/form-data" method="POST"> 
       <div class="form-group"> 
        <label for="name1">Name</label> 
        <input name="name" class="form-control" type="text" /> 
       </div> 
       <div class="form-group"> 
        <label for="title">Title</label> 
        <input name="title" class="form-control" type="text" /> 
       </div> 
       <div class="form-group"> 
        <label for="Startdate">Start Date</label> 
        <input id="datepicker" class="form-control" class="datepicker" type="text" name="start" required="" /> 
       </div> 
       <div class="form-group"> 
        <label for="Enddate">End Date</label> 
        <input id="datepicker1" class="form-control" class="datepicker" type="text" name="end" required="" /> 
       </div> 
       <div class="form-group"> 
        <label for="Users">Users</label> 
        <input type="text" class="form-control" name="users" /> 
       </div> 
       <div class="form-group"> 
        <label for="Fileupload">File Upload</label> 
        <input type="file" class="form-control" name="file" class="file" name="file" required=""> 
       </div> 
       <input type="submit" id="submit" class="btn btn-primary submitbutton" name="submit"> 

      </form> 
    </div> 
    </div> 

+0

你開發的插件? –

回答

0

您應該遵循beloe步驟:

  1. 創建模板: HOME1帶文件名的模板home1.php

  2. 創建一個頁面並選擇最近創建的模板(Home1模板)。

  3. <form action="http://siteur/templateur/" enctype="multipart/form-data" method="POST"> 
    
  4. 替換形式的行動

    <form action="home1.php" enctype="multipart/form-data" method="POST"> 
    

    在home1.php

    print_r($_POST);

相關問題