Forums: How to display user's logo on the top of each page - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to display user's logo on the top of each page

#1 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15840
  • Joined: 03-February 03

Posted 21 July 2014 - 10:23 PM

Let's say your have logo field in your login table and want to display it at the top of each page when this user logs in. Sample login table structure:

ID Username Password Logo


Logo field is setup as File/Image under 'Edit as' settings so users can upload their logos.

1. AfterSuccessfulLogin event

Save logo field value in session variable

$_SESSION["logo"]=$data["logo"]; 



2. Header file

Display image saved in session variable.

<?php
$filesArray = my_json_decode($_SESSION["logo"]); 
echo "<p align=center><IMG src='".$filesArray[0]['name']."'></p>";
?>

Best regards,
Sergey Kornilov
0

#2 User is offline   GregJ 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 81
  • Joined: 05-December 13

Posted 01 January 2015 - 12:39 PM

One quick note:

The field logo in this user table is NOT a blob field as I had assumed. Make it a varchar 500 and save yourself a few days of pain trying to make this work.
0

#3 User is offline   ruzgarajans 

  • Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 20-September 17

Posted 14 February 2018 - 05:03 PM

View PostGregJ, on 01 January 2015 - 12:39 PM, said:

One quick note:

The field logo in this user table is NOT a blob field as I had assumed. Make it a varchar 500 and save yourself a few days of pain trying to make this work.

hi, sorry ı cant speak english...

does this work?
no viewing...
pls help me
0

#4 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15840
  • Joined: 03-February 03

Posted 14 February 2018 - 06:12 PM

Yes, it does work. You need to contact support directly.
Best regards,
Sergey Kornilov
0

#5 User is offline   ruzgarajans 

  • Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 20-September 17

Posted 14 February 2018 - 10:22 PM

View Postadmin, on 14 February 2018 - 06:12 PM, said:

Yes, it does work. You need to contact support directly.

thank you,

small jobs must be finished,
after, I will contact the support team for major issues..

demo has not finished yet.. :)
thank you..
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic