【发布时间】:2012-04-20 22:59:33
【问题描述】:
我正在使用基于表单输入重定向用户的表单代码。我从这里得到它:
php - How do I redirect a user based on their form input?
形式:
<form action="index.php" method="get">
<input type="text" name="q" />
<input type="submit" />
</form>
index.php
header("Location: http://example.com/browse/".$_GET['q']);
我遇到的问题是当用户使用 CAPS LOCK 键入时,它不会重定向他们。
有没有什么方法可以在用户提交后将输入更改为小写,这将允许他们正确重定向。
【问题讨论】:
标签: php forms input get lowercase