如何在我的php和mysql网站上从url访问用户配置文件 [英] how to access user-Profile from url in my php and mysql website

查看:115
本文介绍了如何在我的php和mysql网站上从url访问用户配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友

i已经在这个问题很长一段时间了,我在mysql数据库中有一个名为user_profile的表,我有一个名为profile page的网页可以将个人信息保存到数据库中。也就是说每个用户都有自己的帐户。我现在的问题是使用url访问用户个人资料页面,

例如:www.mydomain.com/username。

a非常清楚的例子是Facebook页面系统的操作,只需输入

www.facebook.com/mypagename即可访问我的页面。

有什么我需要了解的,请我帮忙。

谢谢。

hi friends
i have been on this issue for a very long time now, i have a table in mysql database which is called the user_profile, and i have a web page called profile page from which users can put personal info and save to the database. That is to say each user has his own account. My problem now is accessing users profile page using url,
for example: www.mydomain.com/username.
a very clear example is the operation of the Facebook page system, where i can access my page by just typing
"www.facebook.com/mypagename".
is there something i need to understand, please i need your assistance.
Thanks.

推荐答案

这个问题的一个解决方案是使用参数,你需要在url中包含参数,例如www.mydomain .com / page.php?username = usernamevalue,在page.php中你应该得到参数,在这种情况下是用户名,你可以用它来查询数据..如果你不希望参数显示在网址中你可以用ajax来执行这个动作
One solution for this question is to use parameter, you need to include parameter in the url for example, www.mydomain.com/page.php?username=usernamevalue, in page.php you should get the parameter which in this case is username and you can use it to query data..if you don't want the parameter to be showed in the url you can use ajax to perform this action


这篇关于如何在我的php和mysql网站上从url访问用户配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆