douxie9471 2013-11-22 13:19
浏览 24

PHP在发送到“动作”之前验证表单

I've ended up in a situation I've not been in before. A client has forms provided by a third party company who take care of various newsletters and other admin tasks when forms are submitted, but amazingly they have NO validation. The form action goes straight to another server and not to the server I'm working on. Therefore I don't see how I can add some validation myself..

Ideally, I need to vet the form for spam and validate a captcha code, and then send to the original form action. I've added some front-end validation with jS, but this is of course only for enhancing the UI and not for serious validation.

Does anyone know if I can do anything with PHP..? Many thanks.

  • 写回答

1条回答 默认 最新

  • doukuilian8365 2013-11-22 13:22
    关注

    You could basically submit the form to a PHP page of yours, validate there, and if correct send back the request server-side to the original target (3rd party site). Strange though that a provider doesn't offer any kind of validation...

    评论

报告相同问题?

悬赏问题

  • ¥20 求用stm32f103c6t6在lcd1206上显示Door is open和password:
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类