【问题标题】:form action URL is not working in php codeigniter表单操作 URL 在 php codeigniter 中不起作用
【发布时间】:2017-05-03 05:38:58
【问题描述】:

当前网址:http://localhost/expressfly/betaversion1/index.php/users/pricing/8/No

当表单被提交时,它应该被重定向到一个不同的 URL,但是表单操作中传递的 URL 被连接到当前 URL。

请注意:表单是写在控制器里的

<form id='provider_pay_form' class='form-horizontal' action='index.php/users/reduce_amount/$currentSegment2' enctype='multipart/form-data' method='post' onsubmit='paynow();'>

【问题讨论】:

  • 给出完整路径或尝试 ./index.php...
  • 在提交时您将指向 paynow() 显示您用 paynow() 编写的脚本;或删除后尝试
  • 请添加整个表单代码(包括 paynow() 函数)以支持您的问题。

标签: php forms codeigniter


【解决方案1】:

删除此操作onsubmit='paynow();' 并更改此操作action='&lt;?php echo base_url();?&gt;index.php/users/reduce_amount/'

在隐藏字段$currentSegment2中设置这个变量值然后尝试运行

【讨论】:

    猜你喜欢
    • 2017-09-17
    • 2014-12-01
    • 1970-01-01
    • 2017-09-01
    • 2014-06-02
    • 2016-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多