sirstrumalot Posted June 2, 2009 Share Posted June 2, 2009 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'. 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 time. Meaning, if I hit "create signature" it pops up for a file called 'mysignature_php', if I hit cancel, and click "create signature" again, it will render it as a .jpg with the proper file name. Ideas? missedvisit.php 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 session_start(); mysignature.php 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? Link to comment https://forums.phpfreaks.com/topic/160639-session-problem/ Share on other sites More sharing options...
[email protected] Posted June 3, 2009 Share Posted June 3, 2009 I was wondering if you have the session _start function before any other header calls or other output to the browser. Just something I saw in a book I was reading. Ex. from by book <?php session_start(); $_SESSION['hello'] = 'Hello World'; echo $_SESSION['hello']; ?> referencing a variable set on a prior page: <?php session_start(); echo $_SESSION['hello']; ?> should say Hello World (if I typed it in ok) Link to comment https://forums.phpfreaks.com/topic/160639-session-problem/#findComment-848224 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.