View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


LinkBack Search this Thread
Old 06-13-2005, 01:10 AM   #1
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Rep: Reputation: 30
php function to open an html page

Hello everybody,

I have this php code in a script which has a switch statement:

 include "/usr/local/include/php/fns.php";
<head><title>Bla blah Blah</title></head>
<body bgcolor="pink">
     case "pgpr":
     case "alpha":
     case "vpt":
Is there a php function which can directly open a given html page. In above case, I want that in case "ppr" a form (say ppr_form.html) should open, similarly for case "alpha" a form - alpha_form.html, should be opened. I believe there is some php function which should do it.

Can anyone guide a greenhorn like me?

Thanks in advance.

Prabhat Soni

Last edited by prabhatsoni; 06-13-2005 at 01:19 AM.
Old 06-13-2005, 06:05 AM   #2
Registered: Feb 2004
Location: Sighisoara/Cluj-Napoca (Romania)
Distribution: CentOS 4, Fedora Core 6
Posts: 781

Rep: Reputation: 31

You can use:
PHP Code:
case "pgpr":
This will include the content of "ppr_form.html" at that place in your main page.

Or redirect to a new page, this will show only "ppr_form.html" as new page without including it in your main page:
PHP Code:
case "pgpr":
header("Refresh: 0;url=ppr_form.html");
Cheers, Boby!
Old 06-13-2005, 11:32 PM   #3
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Thanks Boby,
You have been of immense help.

Prabhat Soni


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
html page maker prabhakar_kushwaha Linux - Software 3 10-14-2005 09:17 PM
PHP: html Form Select function problem camlinux Programming 2 05-15-2005 08:23 PM
Passing one php function result as a parameter to another php function davee Programming 13 09-12-2004 12:08 PM
HTML page break? patpawlowski Programming 4 02-12-2004 10:30 AM
Creating a simple html page from php? lucastic Linux - General 4 11-05-2003 08:48 AM

All times are GMT -5. The time now is 02:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration