Skip navigation
msycpu2
Currently Being Moderated

Php session Code and Dreamweaver Template

May 21, 2012 11:12 PM

Tags: #php #template #dreamweaver

I have a page that I created in dreamweaver.  It's a php page that has sessions, the file is from a Dreamweaver template that I created and am using.  However, when I update the master template file, the items before the Doctype keeps erasing.

 

I have some php includes that are useful for post variables.  How can I tell dw not to delete those sections.  I can't create an editable region before the head? Is there a way?

 

Thanks for you help.

 

Sample Code:

<?php

          include ("./includes/file1.inc");

          session_start();

          if(isset($_SESSION['code'])){

                    header("location:rsvp_file2.php");

          }

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 
Replies
  • Currently Being Moderated
    May 22, 2012 12:52 AM   in reply to msycpu2

    I'm not clear in what you are saying?

     

    Are you saying you want to insert this block of php code on all the pages made from the master template file but when you insert it into the master template file and save the file the block of php code does not appear on any of the page made from the template?

     

    If that is the case then  do a 'find and replace' Find>Find and Replace. Find the doctype:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

     

    and replace it in all the pages with:

     

    <?php

              include ("./includes/file1.inc");

              session_start();

              if(isset($_SESSION['code'])){

                        header("location:rsvp_file2.php");

              }

    ?>

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points