php code no longer hidden

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acronym54
    New Member
    • Jun 2009
    • 6

    php code no longer hidden

    I recently noticed that my php code is no longer hidden when viewing the page with view-source on Explorer. What happened?
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Originally posted by acronym54
    I recently noticed that my php code is no longer hidden when viewing the page with view-source on Explorer. What happened?
    Sounds like your PHP isn't being processed. Without more information, we're only guessing, though.

    Comment

    • acronym54
      New Member
      • Jun 2009
      • 6

      #3
      The code is as follows:
      1) The php item that sets the cookie works fine and does not show in view-source.
      2) The php item for the include works fine, but it appears in view-source and is a big problem since the next page name becomes visible.

      3)The main page code is:
      <?php
      setcookie( "auth", "Austreal5" );
      ?>

      Code:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.wc.org/TR/xhtml1/DTD/xhtml-transitional.dtd">
      
      <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
      
      <head>
      <title>System</title>
      <link rel="stylesheet" href="styledemo.css" type="text/css">
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      <meta name="robots" content="noindex">
      </head>
      
      <body align="center" bgcolor="#336699">
       
       <table border="2" bordercolor="white" align="center" width="600">
        <tr>
         <td align="center" bgcolor="white">
         <img border="0" src="http://bytes.com/images/mainlogo.jpg" width="400" height="117">
         </td>
        </tr>
       </table>
      
       <table border="0" bordercolor="navy" align="center" width="600" bgcolor="white">
        <tr>
         <td align="center">
         <p>
         PASSWORD PAGE 
         </p>
      
      <?php
      include("includes/pwform.php");
      ?>
        
      
         </td>
        </tr>
       </table>
       
      </body>
      </html>
      
      4)The include "pwform.php" is:
      <FORM ACTION="pwprocessor.php" METHOD="POST">
         <p>
         
         UserID: <INPUT TYPE="text" NAME="userid"  MAXLENGTH="10" SIZE="10">
      
         Password: <INPUT TYPE="password" NAME="password"  MAXLENGTH="10" SIZE="10">
         <br>
         <br>
         <INPUT TYPE="submit" VALUE="Submit">
      
         <INPUT TYPE = "RESET">
         </p>
         </FORM>
      Thanks for your help.
      acronym54
      Last edited by Markus; Jul 1 '09, 10:33 AM. Reason: Added [code] tags.

      Comment

      • ragonz
        New Member
        • Jul 2008
        • 24

        #4
        silly post

        sorry for asking silly question, but where can i find link to post new thread in this forum. i looked for it already, but got no clue. sorry again.

        regards

        Comment

        • acronym54
          New Member
          • Jun 2009
          • 6

          #5
          new thread

          I believe if you click topics, then PHP, then answers you will get there.

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            Originally posted by acronym54
            The php item for the include works fine, but it appears in view-source and is a big problem since the next page name becomes visible.
            as far as I can see there is no PHP code in "pwform.php " only HTML, thus no PHP code is exposed. (any output (e.g. HTML code) will be visible)

            Comment

            • acronym54
              New Member
              • Jun 2009
              • 6

              #7
              How about the include on lines 30,31,and 32.

              Comment

              • acronym54
                New Member
                • Jun 2009
                • 6

                #8
                Oh yes, I see what you mean now that I look at it again. Any ideas how I can hide that destination page name on line 43?

                Comment

                • Dormilich
                  Recognized Expert Expert
                  • Aug 2008
                  • 8694

                  #9
                  Originally posted by acronym54
                  Any ideas how I can hide that destination page name on line 43?
                  you only can make it harder to see, but you can't comletely hide it. but why would you need the form processor to be hidden?

                  Comment

                  • acronym54
                    New Member
                    • Jun 2009
                    • 6

                    #10
                    I finally see that the password and userid are hidden by being in php code on the processing page AFTER the password page, so I have not had a problem all along. Live and learn. Thanks for your help Dormillich. Without your questions I probably would never have seen the obvious.

                    Comment

                    Working...