Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

web Page change without .htm

Posted on 2005-05-11
6
Medium Priority
?
187 Views
Last Modified: 2012-05-05
I am trying to build a web site with dynamic page changing. I mean that I don't want to create each page with ".htm".

Can I do like.....

when I click menu on top of my web page, that page is changed by CGI code. It is like a built by template.

That site will ahve same format like picture on top and board at bottom.
0
Comment
Question by:manrippo
  • 2
  • 2
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
Promethyl earned 375 total points
ID: 13979480
Yeah. You can do something like this with PHP.

<!-- page stuff-->

<?
switch($_GET[type]) {
case 'a':
          // do a stuff
          break;
case 'b':
          // do a stuff
          break;
case 'c':
          // do a stuff
          break;
}

?>
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 13980197
appears to be a typo:
switch($_GET[type]) {

must be:
switch($_GET[$type]) {
0
 

Author Comment

by:manrippo
ID: 13988389
For example

http://www.aaa.com/sitemap.asp?id=Manage%26nbsp%3BAccount

http://www.aaa.com/sitemap.asp?id=Manage%26nbsp%3BSite

This is the thing that I have asked you guys!!

If you see the addresses, they are just differnet at the end of the addresses like "Account" and Site".

How could I do that by coding?

Can I use PHP or asp? Something else?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 13988498
seems strange your url, maybe could be:
http://www.aaa.com/sitemap.asp ?id=Manage&type=Account
0
 
LVL 7

Expert Comment

by:Promethyl
ID: 13988866
Nah, it wasn't a typo. Bad form, sure, but not a typo. Since $type is empty, you are sending $_GET[] with that code, which results in nothing. I was looking for a get variable named type. Diablo has been on me to properly quote vars, and I missed the boat again.

<?
switch($_GET['id']) {
case 'Manage':
          // do management stuff
          break;
case 'View':
          // do a stuff
          break;
case 'Nothing':
          // do a stuff
          break;
}

?>
0
 

Author Comment

by:manrippo
ID: 14040856
Where do I put those code? Each page or ?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question