Connecting Tech Pros Worldwide Help | Site Map

php code no longer hidden

  #1  
Old June 30th, 2009, 04:43 PM
Newbie
 
Join Date: Jun 2009
Posts: 6
I recently noticed that my php code is no longer hidden when viewing the page with view-source on Explorer. What happened?
  #2  
Old June 30th, 2009, 07:33 PM
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,858
Provided Answers: 9

re: php code no longer hidden


Quote:
Originally Posted by acronym54 View Post
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.
  #3  
Old July 1st, 2009, 02:19 AM
Newbie
 
Join Date: Jun 2009
Posts: 6

re: php code no longer hidden


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" );
?>

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.wc.org/TR/xhtml1/DTD/xhtml-transitional.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  5.  
  6. <head>
  7. <title>System</title>
  8. <link rel="stylesheet" href="styledemo.css" type="text/css">
  9. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  10. <meta name="robots" content="noindex">
  11. </head>
  12.  
  13. <body align="center" bgcolor="#336699">
  14.  
  15.  <table border="2" bordercolor="white" align="center" width="600">
  16.   <tr>
  17.    <td align="center" bgcolor="white">
  18.    <img border="0" src="http://bytes.com/images/mainlogo.jpg" width="400" height="117">
  19.    </td>
  20.   </tr>
  21.  </table>
  22.  
  23.  <table border="0" bordercolor="navy" align="center" width="600" bgcolor="white">
  24.   <tr>
  25.    <td align="center">
  26.    <p>
  27.    PASSWORD PAGE 
  28.    </p>
  29.  
  30. <?php
  31. include("includes/pwform.php");
  32. ?>
  33.  
  34.  
  35.    </td>
  36.   </tr>
  37.  </table>
  38.  
  39. </body>
  40. </html>
  41.  
  42. 4)The include "pwform.php" is:
  43. <FORM ACTION="pwprocessor.php" METHOD="POST">
  44.    <p>
  45.  
  46.    UserID: <INPUT TYPE="text" NAME="userid"  MAXLENGTH="10" SIZE="10">
  47.  
  48.    Password: <INPUT TYPE="password" NAME="password"  MAXLENGTH="10" SIZE="10">
  49.    <br>
  50.    <br>
  51.    <INPUT TYPE="submit" VALUE="Submit">
  52.  
  53.    <INPUT TYPE = "RESET">
  54.    </p>
  55.    </FORM>
Thanks for your help.
acronym54

Last edited by Markus; July 1st, 2009 at 11:33 AM. Reason: Added [code] tags.
  #4  
Old July 1st, 2009, 03:29 AM
Newbie
 
Join Date: Jul 2008
Posts: 22

re: php code no longer hidden


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
  #5  
Old July 1st, 2009, 04:27 AM
Newbie
 
Join Date: Jun 2009
Posts: 6

re: php code no longer hidden


I believe if you click topics, then PHP, then answers you will get there.
  #6  
Old July 1st, 2009, 06:40 AM
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,485
Provided Answers: 9

re: php code no longer hidden


Quote:
Originally Posted by acronym54 View Post
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)
  #7  
Old July 2nd, 2009, 02:28 AM
Newbie
 
Join Date: Jun 2009
Posts: 6

re: php code no longer hidden


How about the include on lines 30,31,and 32.
  #8  
Old July 2nd, 2009, 02:32 AM
Newbie
 
Join Date: Jun 2009
Posts: 6

re: php code no longer hidden


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?
  #9  
Old July 2nd, 2009, 06:32 AM
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,485
Provided Answers: 9

re: php code no longer hidden


Quote:
Originally Posted by acronym54 View Post
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?
  #10  
Old July 2nd, 2009, 07:15 AM
Newbie
 
Join Date: Jun 2009
Posts: 6

re: php code no longer hidden


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.
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why browser stop responding to this code? Charles Packer answers 6 August 12th, 2008 11:55 PM
php extensions and windows... specifically extension_dir Chris Paul answers 3 December 5th, 2005 12:45 AM
PHP Mail pee2pee answers 6 July 17th, 2005 01:46 AM