Jump to content

Recommended Posts

I'm Complete Newbie to PHP but understand it

Just a short question... Could someone give show
me a small bit of html code in a php file..

What i am doing, im editing a login script that i just
wrote thanks to a tutorial from here on phpfreaks,
and want to edit the members area...

Here is the code for the members area at the min

[code]<?php
session_start();

echo "Welcome ". $_SESSION['first_name'] ." ". $_SESSION['last_name'] ."!
    You have made it to the members area!<br /><br />";

echo "Your user level is ". $_SESSION['user_level']." which enables
    you access to the following areas: <br />";

if($_SESSION['user_level'] == 0){
    echo "- Forums<br />- Chat Room<br />";
}
if($_SESSION['user_level'] == 1){
    echo "- Forums<br />- Chat Room<br />- Moderator Area<br />";
}

echo "<br /><a href=logout.php>Logout</a>";

?>[/code]

Also I have multiple pages that will be linked to this
members area, how will i keep them private???

Thank you for all your help

Kieron
Link to comment
https://forums.phpfreaks.com/topic/18122-php-html/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.