Kevin Harrison Kevin Harrison - 3 months ago 9
PHP Question

Basic PHP Register / Profile Page

I was wondering if anybody could show me a pretty decent and basic PHP Register form page that saves a profile page in to the database.

I was going to use it to try and build off to make a more advanced one as I'm trying to get better with PHP.

If you could show me one and explain a little bit of it that would be great.


Basic PHP Register / Profile Page

make a member.php like a profile template and create an url like bellow when user finished the registration

$profileUrl ='.$userId;

generate a user id when any user finished the registration and get the userId usiong $_GET

In members.php

$userId = $_GET['userId'];

and get the user details from the database according to the user id .that's it

In members.php

$userId = $_GET['userId'];

include('your database class file');

$sth = $dbconnect->prepare("SELECT first_name,last_name FROM register WHERE userId = :userId");
$params = array("userId" => $userId);

$status = $sth->fetchAll();

Use it like above.Create your own codes for additional details to fetch from the database