Quick Search for:  in language:    
EXACT,well,shows,pages,kind,ofits,function,ca
   Code/Articles  |  Newest/Best  |  Community  |  Jobs  |  Other  |  Goto  | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
PHP Stats

 Code: 107,779. lines
 Jobs: 40. postings

 How to support the site

 
Sponsored by:

 
You are in:
 

Does your code think in ink?
Login





Latest Code Ticker for PHP
Click here to see a screenshot of this code!Debug Window
By Hohl David on 12/30

(Screen Shot)

Click here to see a screenshot of this code!Add Google search technology to your site without Google branding.
By Sean Cannon on 12/29

(Screen Shot)

PHP System Function
By Ruben Benjamin on 12/29


Click here to see a screenshot of this code!MySQL GuestBook 1.0
By Uis on 12/27

(Screen Shot)

Click here to see a screenshot of this code!MySQL Guestbook
By Uis on 12/27

(Screen Shot)

Click here to see a screenshot of this code!MySQL Guestbook
By Uis on 12/27

(Screen Shot)

Click here to see a screenshot of this code!PHP Chat
By Kevin Harris on 12/25

(Screen Shot)

Preload whole directory of images
By Roland Osbeck on 12/23


Sessions
By Michael 'plasma' McMullen on 12/23


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

two pages in one! (or more)

Print
Email
 
VB icon
Submitted on: 12/2/2003 10:13:42 AM
By: Stefan Kassa  
Level: Beginner
User Rating: Unrated
Compatibility:PHP 4.0

Users have accessed this code 296 times.
 
(About the author)
 
     well this EXACT one shows two pages in one kind of its a function i call open_site( sitename ); that opens the site with an include command pretty simple, maybe to simple. will update it
 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

    //**************************************
    //     
    // for :two pages in one! (or more)
    //**************************************
    //     
    Free to use modify etc, just include my name :) Red_Dragon.
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

    //**************************************
    //     
    // Name: two pages in one! (or more)
    // Description:well this EXACT one shows
    //     two pages in one kind of
    its a function i call open_site( sitename );
    that opens the site with an include command
    pretty simple, maybe to simple. will update it
    // By: Stefan Kassa
    //
    // Returns:the site wanted
    //
    // Assumes:it not really that good but i
    //     wanted to show ppl it could be done the 
    //     simple way :-)
    //
    // Side Effects:***** up site, i think t
    //     his may NOT be a good solution to conver
    //     t your site to...to save place...or prev
    //     ent ppl from downloading the content or 
    //     anything...only for testing and develop 
    //     further
    //
    //This code is copyrighted and has    // limited warranties.Please see http://
    //     www.Planet-Source-Code.com/vb/scripts/Sh
    //     owCode.asp?txtCodeId=1185&lngWId;=8    //for details.    //**************************************
    //     
    
    <?php
    function open_site( $anch )
    {
    include("header.html");
    if ( $anch == 1 )
    {
    include("1.html");
    }
    elseif ( $anch == 2);
    {
    include("2.html");
    };
    }
    print "<br>";
    open_site( 2 );
    print "<br><br><br>";
    print "Example 2<br>";
    open_site( 1 );
    ?>

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
12/3/2003 1:33:14 PM:
you should be carefull if using this 
script to show external pages as it's a 
big security risk to include pages you 
do not control.
just my 0.02
siech
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | PHP Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.