[UPDATE]Session problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sirstrumalot
Forum Commoner
Posts: 27
Joined: Mon May 18, 2009 10:26 pm

[UPDATE]Session problems

Post by sirstrumalot »

All,

I have three files, one file 'missedvisit.php' is a form. This form is used to POST data to a .csv file. It is on this form that a session is created to obtain the name of the person filling out the form. From there, the person clicks next after obtaining the posted .csv file and goes to a signature capture. This signature capture 'capture.php' uses a flash tool with the PHP POST method to make an image. It calls 'mysignature.php' to process the code for the file. The session_start is called in the capture.php, which POSTS to the mysignature.php, rendering a jpeg. In Firefox and Chrome, I have no issues with the session carrying over the name and naming the jpeg. But in IE7, it just names the file 'mysignature_php'. Here's the code for each page:

missedvisit.php

Code: Select all

session_start();
$f = addslashes($_POST['firstname']);
$m = addslashes($_POST['middlename']);
$l = addslashes($_POST['lastname']);
date_default_timezone_set ("America/Chicago");
$d = date("mdY-Hi");
$_SESSION['name'] = $f.$m.$l."_".$d;
capture.php

Code: Select all

session_start();
mysignature.php

Code: Select all

session_start();
//down a few lines
//
$patient = $_SESSION['name'];
$file = $patient.".jpg";
header("Content-type:image/jpeg");
header("Content-Disposition: attachment; filename=$file");
imagejpeg($img, "", 100);
 
PLEASE HELP?

[UPDATE]

Okay, so I was playing around and I noticed that when I post the signature capture in capture.php the 2nd time, the file is named properly. Just not the first. Meaning, if I hit "create signature" is pops up for a file called 'mysignature_php', if I hit cancel, it will render it as a .jpg with the proper file name. Ideas?
Post Reply