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

  • Home
  • SEARCH
  • 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 7180999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:27:54+00:00 2026-05-28T17:27:54+00:00

I have a login script with a Twitter-like posting script and I tried to

  • 0

I have a login script with a Twitter-like posting script and I tried to insert the user name into the posts but that didn’t work. They are both using the same database but I can’t figure out why. Here is the php.

    <?php

session_start();

require_once 'database.php';

if (isset($_SESSION['user'])){

echo "Welcome ".$_SESSION['user'];

?>


<?php
$posts = show_posts($_SESSION['userid']);

if (count($posts)){
?>

Now the posts part

<table class="imagetable">
<table align="center" border='0' cellspacing='0' cellpadding='5' width='300'>
<td background="cell-blue.jpg"> 
<?php
foreach ($posts as $key => $list){
    echo "<tr valign='middle'>\n";

    echo "<td>".".$_SESSION['user']" . "<p>'s BFFL is</p>".$list['body'] ."<br/>\n  "; 
    echo "<small>".$list['stamp'] ."<hr>"."</small></td>\n"; 
    echo "</tr>\n"; 
}
?>
</table>

I’m a noob to php, and I can’t get why it’s not working… I just want the name of the user to be in the post.

  • 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-05-28T17:27:55+00:00Added an answer on May 28, 2026 at 5:27 pm

    There was an extra period (concat operator) before your session variable. I cleaned it up for you.

    echo "<td>" . $_SESSION['user'] . "<p>'s BFFL is</p>" . $list['body'] . "<br/>\n";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a login script that verifies a username/password against data in a 'user'
I have a login script that does this: $_SESSION['username']=$username; $_SESSION['password']=$password; If the user logged
I have a login script that when successful, should check to see if the
I have the following shell script registered in my Login Items preferences but it
I have php scripts that do things like register, login, upload. I would like
I have a a login in script that is a little to complicated for
I am using a PHP login script that challenges user for username & password.
Hello i have a login script and a register script but im storing the
In my login script I have put a checkbox that people can check if
I have a login script and I log users that fail excessively. In my

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.