Jump to content

Session Variables


markwjones

Recommended Posts

Hi,  thanks for that but tried both print and all and both don't seem to work...  It's strange as it will print values from normal variables but it won't seem to pring values from a session variable.  As I said, it works fine with firefox.  Do you think it is a CSS issue or Internet Explorer?

Link to comment
https://forums.phpfreaks.com/topic/210353-session-variables/#findComment-1098637
Share on other sites

---- HERE IS THE PHP FILE CALLED 'member.php' ----

 

<?php

session_start();

$member_ref = $_SESSION["member_ref"];

$ref_print =  (string) $member_ref;

 

// print text:.

$font = 'fonts/arial.ttf';

// pick color for the text

$fontcolor = imagecolorallocate($image, 44, 85, 177);

$fontsize = 14;

$x = 112;

$y = 106;

imagettftext($image, $fontsize, 0, 100, 100, $fontcolor, $font, $ref_print);  //print Cusomter ref session variable.

 

// png image type

header("Content-Type: image/png");

 

// display image in png

imagepng ($image);

?>

 

--- HERE IS THE HTML FILE ---

 

<head>

 

<link rel="stylesheet" type="text/css" href="../main_fbl.css" media="all" />  **I Have tried with print as well.

 

</head>

<body>

 

<img src="member.php" />

 

<hr style="page-break-before:always" />

 

</body>


Link to comment
https://forums.phpfreaks.com/topic/210353-session-variables/#findComment-1098647
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.