doujiang3997 2010-07-15 13:28
浏览 42
已采纳

如何从用户提交的数据库条目创建新网页?

I'm creating a dictionary database using php and MySQL. The user can search for a name, if it's there it brings up a list of matching links (eg: http://mydictionary/name.php) and then the user can click on said link and they are transported to a webpage that get's its information from the database. If there is no entry for the name in the database then the user is invited to make their own entry. I can get this to work using a html input form and then the php file to save it into the database.

The problem I have is that when this newly entered name is searched for, the link won't be active as it leads to a non-existent page. Can I get php to create the new url for me? Or does anyone know a way around this problem?

Many thanks!

  • 写回答

3条回答 默认 最新

  • doue2666 2010-07-15 13:39
    关注

    What you need to do is create an .htaccess file and mod_rewrite.

    This post will help you get started.

    http://www.desiquintans.com/cleanurls

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

报告相同问题?