单击提交按钮后如何将数据一页发送到另一页

时间:2016-12-03 08:52:50

标签: php jquery wordpress forms

我有一个问题想与大家分享。 我在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>

1 个答案:

答案 0 :(得分:0)

你应该遵循以下的步骤:

  1. 创建模板: Home1模板,文件名为home1.php

  2. 创建一个页面并选择最近创建的模板(Home1 Template)。

  3. 替换表单操作

    class A {} 
    class B {}
    $dynamicClassName = "A";
    eval("class DynamicParent extends $dynamicClassName {}");
    
    class C extends DynamicParent{
       // extends success
       // Testing
       function __construct(){
            echo get_parent_class('DynamicParent'); exit; //A :)
       }
    }
    

    <form action="home1.php" enctype="multipart/form-data"  method="POST"> 
    
  4. home1.php中的
  5. <form action="http://siteur/templateur/" enctype="multipart/form-data" method="POST">