Jump to content

Session Variables


markwjones

Recommended Posts

...anyone know anything about Internet Explorer not printing values from session variables.  It works on Firefox but not on Internet Explorer.  The session variable value works find on the web page but click on Print preview and it dissapears and will not print.

Link to comment
Share on other sites

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