I have a register and login code, but i don't know when the user register to automatically make user page.Can anybody help me?
web3 0 Junior Poster in Training
Recommended Answers
Jump to PostMake a seperate page (profile.php perhaps) and use the unique field in the database (Usually an ID of some sort) in the query string, for example, profile.php?user=usersID.
In the profile.php page, pull the required data from the database and display it as required.
Jump to PostJust remember to protect it with a session id, so that you can't change anybody else's profile. View but not edit.
Jump to PostMany problems with your code there...
There appears to be no protection on your query at all...
Try replacing this:$id = $_GET['id'];
with this:
if (is_int($_GET['id'])) { $id = $_GET['id']; // Add the rest of the script here. } else { // …
All 9 Replies
Will Gresham 81 Master Poster

diafol
Will Gresham commented: +1, I assumed he meant a page to display info, not edit :) +2
web3 0 Junior Poster in Training
nadnakinam 0 Junior Poster in Training
web3 0 Junior Poster in Training
web3 0 Junior Poster in Training
Will Gresham 81 Master Poster
web3 0 Junior Poster in Training
Will Gresham 81 Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.