donglou1866 2012-06-14 15:58
浏览 52

我想将php / mysql应用程序转换为wordpress插件

I have a php/mysql web application.I want to convert it in a wordpress plugin.How can I make link of one php file to another file. For example I have plugin tw. tw.php is its index file and the other file name is tw1.php.

first page

/* plugin name:tw
 plugin url:httpL://csr.estheticsolutions.com.pk
*/

//tell wordpress to register the demolistposts shortcode
add_shortcode("demo-list-posts", "demolistposts_handler");

  function demolistposts_handler()  
    {
    //run function that actually does the work of the plugin
     $demolph_output = my_function();
     //send back text to replace shortcode in post
      return $demolph_output;
     }


 function my_function()
     {
?>
          <html>
          <body>          


               <form   action="tw1.php" method="post">
                       <input  type="text" name="fname"  >
                       <input type="submit" value="Submit" >
                </form>


          </body>
          </html>
 <?php


  }


 ?>

second page

<?php

 $First_Name=$_POST['fname'];
echo $First_Name;

?>

when i submit value in tw.php ,an error appears tw1.php not found(404) in wordpress folder,then i paste the file tw1.php in that(wordpress) folder and submit, posted value get in new page without wordpress theme.

  • 写回答

2条回答 默认 最新

  • dongyu4908 2012-06-21 02:33
    关注

    Create a table with name=people with columns: id, firstname, lastname, DateofBirth, addressid, fatherid, motherid. Have suitable column properties with each column.

    评论

报告相同问题?

悬赏问题

  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)