Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7877257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:18:59+00:00 2026-06-03T03:18:59+00:00

I’m taking a crack at my PHP again but I’ve gotten stuck on some

  • 0

I’m taking a crack at my PHP again but I’ve gotten stuck on some inline. I’m using a members script which I learnt at http://www.1stoptutorials.com/Membership_Course.html.

My table has the following fields: userid, first_name, last_name, email_address, username, password, dob, guardianid, user_level, signup_date, last_login, activated.

What I’m wanting to do is use data from my table when the user logs in, but for some reason all that I’m able to access for some reason is the first name and last name fields. None of the others are working.

This is my current PHP in the header

<?php
require_once ('verify.php'); 
// Start output buffering:
ob_start();
// Initialize a session:
session_start();
// If no first_name session variable exists, redirect the user:
if (!isset($_SESSION['first_name'])) {  
$url = BASE_URL . ''; // Define the URL.
ob_end_clean(); // Delete the buffer.
header("Location: $url");
exit(); // Quit the script. 
}
?>

and it’s being closed in the bottom. Now to login, they use their username and password, but I want to know why I can only use their first and last names? Also how do I embed inline? I’m using the following currently.

<p style="color:White;">
  Welcome 
  <strong>
    <a href="profile.php?id=<? echo $_SESSION['userid'] ?>" style="font-family:Arial, Helvetica, sans-serif;color:White;">
      <? echo $_SESSION['first_name'] ." ". $_SESSION['last_name'] ?>
    </a>
  </strong>
  &nbsp;&nbsp;-&nbsp;&nbsp;Home&nbsp;&nbsp;|&nbsp;&nbsp;
  <a href="photo.php" class="link">Photos</a>
  &nbsp;&nbsp;|&nbsp;&nbsp;
  <a href="video.php" class="link">Videos</a>
  &nbsp;&nbsp;|&nbsp;&nbsp;
  <a href="logout.php" class="link">Log Out</a>
</p>

But of course only the names are coming up in my output page, not the id or any other fields.

Can anyone help or do I need to post some more info?

Or can anyone suggest a better login script?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:19:02+00:00Added an answer on June 3, 2026 at 3:19 am

    Just because the script you learned from told you to only use first_name does not mean you have to keep on using the same thing. You can use any field you used while storing the data. Most efficient will be storing user_id.

    About the inline part, it is debatable. Some prefer inline PHP, some inline HTML. Use what makes you more comfortable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.