简单的形式不起作用

时间:2016-05-14 12:33:44

标签: php sql wordpress forms

我刚刚在Wordpress中创建了自定义表单,以便快速添加一些注释。 我写了简单的表格:

func recurce(node)
  if(node is null) return 0
  exclude_current_node = sum of recurce of all node's children
  //satisfy even number of child property 
  if(odd number of childeren's)
      include_current_node = sum of recurce of all node's children except child with lowest value+value of node
  else
      include_current_node = sum of recurce of all node's children+value of node
  return max(exclude_current_node,include_node)

它在管理页面中的显示非常好:http://prntscr.com/b3x3e3

但是当我试图发表评论时,它的工作不正常:(

以下是我的行动代码:

<form method='post' method='xxxx.com/global/wp-content/themes/theme/autoblog/skryptkom.php'>
    <h3>Wpisz komentarze</h3>
     <p>
        <textarea name="komentarzex" rows="10" cols="30">
1 komentarz = 1 linia
        </textarea>
     </p>
    <h3>Wpisz nazwy uzytkowników</h3>
     <p>
        <textarea name="uzytkownicxy" rows="10" cols="30">
1 uyztkownik = 1 linia
        </textarea>
     </p>       
    <h3> Dodatkowe ustawienia</h3>
    Ile komentarzy musi mieć wpis aby dodało do niego dodatkowe komentarze: <input type="text" name="ilekomentarzy" value="0"><br>
    Do ilu wpisów dodack komantarze? : <input type="text" name="ileposotownaeraz" value="200"><br>
    Wpisz przedzial ile ma dodać komentarzy do wpisu : od <input type="text" name="odkoms" value="5"> do <input type="text" name="dokoms" value="20"><br>
      <p>
         <input type="submit" value="Dodaj komentarze" name="dodajmeykurwa" />
      </p>
</form>

我做错了什么?

1 个答案:

答案 0 :(得分:0)

您的表单开始标记上有重复的方法属性:

此:

<form method='post' method='xxxx.com/global/wp-content/themes/theme/autoblog/skryptkom.php'>

应该是:

<form method='post' action='xxxx.com/global/wp-content/themes/theme/autoblog/skryptkom.php'>