douguai7291 2010-09-08 17:11
浏览 106
已采纳

使用POST在PHP中传递表单详细信息的问题

This is a piece of code on home.php

<form action="./Login" method="post">
Email Address: <br />
<input type="text" name="username" tabindex="1" /><br />
Password: <br />
<input type="password" name="password" tabindex="2" /><br />
<input type="hidden" name="home" value="yes" />
<div class="options">
<input type="submit" value="" name="LoginCheck" class="submit_n" />
</div>
</form>

On submitting isset($_POST['LoginCheck']) on login.php return false.

I usually write the form part & processing part on the same file & then this seems to work correctly. However for this case i.e processing on other page this does not seem to work.

This is probably a minor problem but what am I doing wrong?

  • 写回答

5条回答 默认 最新

  • dongqiu5184 2010-09-08 17:56
    关注

    I got this working. I have no clue why this worked? Kindly Explain!!

    By default all directory access is to index.php [As configured by me in Apache]

    So when I say action="./Login" it would go the index.php but for some reason wont remember where it cam from so the POST data isn't there.

    I changed it to action="./Login/index.php" & now everything works fine. WHY??????

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器