php mysql数据库问题 [英] Php mysql database problem
问题描述
我想使用PHP建立一个门户网站,因为它有用户注册和登录,当用户登录时,它有一个仪表板页面,其中包含一个表格,其详细信息发送到数据库,特定用户可以读取/更新/删除该数据他的帐户的其他页面。
有人可以告诉我数据库的结构应该是什么吗?
我尝试了什么:
我目前正在使用PHP Session登录并创建了两个数据库dblogin(用户详细信息)并检查(仪表板表单详细信息),我无法获取特定用户的数据,因为我无法找到可以根据用户获取表单数据的参数。
I want to make a web portal using PHP as it has user registration and login and when user login it have a dashboard page which contains a form whose details goes to database and that specific user can Read/Update/Delete that data on other page of his account.
Can anybody please tell me that what should be the structure of the database?
What I have tried:
I am currently using PHP Session for login and created two database dblogin(user details) and check(dashboard form details) and i am not able to fetch that data for the specific user as I am not able to find parameter through which i can fetch the form data according to user.
推荐答案
你需要回到基础。我将概述这种方法,因为完整的答案大约是一本关于网络应用程序开发的书的5章。
首先,你需要呈现一个呈现的HTML页面用户的登录表单。该表单应包含用户名和密码字段。如果你不知道的话谷歌会发现如何制作这样的表格。
上面提到的表格背后是你的PHP,确实PHP基本上是喷出来的找出有问题的HTML。
提交表单时,会引发一个PHP调用,该调用应该提供用户名和密码变量。例如,如果您已发布变量user和password,则可以使用
You need to go back to basics. I'll outline the approach because a full answer is about 5 chapters of a book on web-app development.
Firstly you will need to render an HTML page that presents a login form to the user. That form should include the Username and Password fields. Google-it to discover how to make such a form if you don't know.
Behind the above-mentioned form sits your PHP, indeed the PHP is basically squirting out the HTML in question.
When the form is submitted this raises a PHP call which should supply username and password variables. For example if you have posted variables "user" and "password" you can obtain these in PHP using
user =
_REQUEST ['user'在PHP中获取这些变量]和
_REQUEST['user'] and
这篇关于php mysql数据库问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!