Jump to content

meltingpoint

Members
  • Posts

    194
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

meltingpoint's Achievements

Member

Member (2/5)

0

Reputation

  1. Placed the below in the .htaccess file and it works perfectly! <FilesMatch ".(pdf)$"> FileETag None <ifModule mod_headers.c> Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" </ifModule> </FilesMatch> Excellent! Keith
  2. I would like to say away form appending the url if possible. Is there a way to serve it up with php so as to pull the newest updated file? If yes, can you point me in the direction as to how that is done. I have a support ticket with my host to see if it is something they can change on their end for me. Thanks- Keith
  3. I have a website where I allow people to submit a .pdf file and it is then displayed in an iframe or in a pdf object in a div. The names of the files always stay the same, and are uploaded to a specific folder. Problem is- when they upload a new .pdf file....the browser always displays the old .pdf file. Deleting temp files- doesn't change. <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> does not work Is there a way to make sure that the current and updated pdf file gets served to the browser and it displays it? Any suggestions would help. Andy
  4. Sorry all- I was coding it correctly- it was a problem with my WYSIWYG program. All fixed now.
  5. Actually- I did define the $pdf variable like so; $pdf = $_GET['pdf']; This is done at the very start of the page. So $pdf does infact echo out Whatever.pdf
  6. I am trying to dynamically display an embeded pdf on a page with a variable that is passed via the $_GET method link- http://www.mysite.com/pdf_display_page.php?pdf=Whatever.pdf <embed src="http://www.mysite.com/reviews/<?php echo $pdf;?>" width="585px" height="400px"> It does not work. Testing the $_GET variable does show the Whatever.pdf Is it because of the double quotes somehow?
  7. Thanks- stared too long at the problem. Cheers-
  8. This works: if($ABC == 'Yes' and $X != $Y){ echo "Error"; exit(); } I need to evaluate one more set of variables in this statement like so; This does not work: if($ABC == 'Yes' and $X != $Y or $Z != $Y){ echo "Error"; exit(); } So basically I need to echo an error if $ABC == Yes and both $X and $Z do not equal $Y If gives an error because it is obviously not correct. I do not know how to make it correct. Any suggestions?
  9. Syntax good- another part of code was faulty. Cheers
  10. I want to check to see if two variables are NOT empty and if so- assign a new variable if(!empty($net_op_call) and !empty($f_name)){ $net_start = 'Yes'; } Is this syntax correct as it is not setting the variable - $net_start
  11. In your second if statement- if the session time has expired you have it re-direct to the login page. Where are you destroying the session in the 2nd if statment? The session id is still set- just the time will trigger a redirect. I would include ; $_SESSION['login_time'] = ""; $_SESSION_DESTROY(); in the 2nd if statement. That way it is all gone for sure. Just a thought.
  12. I really do not know. You are piece-mealing code out a little at a time. I am not sure what is included on each page nor do I know what is on menu.php and Safe.php. You said you added ob_start() along time ago. I assume that this script was working for a while and now has issues. If that is the case, what exactly have you changed?
  13. <?php include_once("connect.php"); if(isset($_SESSION['user_id'])) { $sql = "UPDATE users SET lastactive = NOW() WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'"; mysql_query($sql); // updates the last activity of user if ($_SESSION['login_time'] < strtotime('-60 minutes')) { $_session['login_time'] = "";//-------to kill for sure the variable session_destroy(); header("Location: signup.php"); exit; } } ob_start() is for output buffering. Don't know all your code so not sure if you need it or are using it properly. Give the above a try
  14. <?php session_start(); $_session['login_time'] = "";//-------to kill for sure the variable session_destroy(); ?> The above should go at the very top of your logout page
×
×
  • 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.