473,662 Members | 2,596 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create page parameter?

23 New Member
Hello all..

This is very simple question I think. :)
How to create multiple page navigation?
e.g:
- index.php?page= home
- index.php?page= download
- index.php?page= contact

Thank you very very much..

and Merry Christmas!
Dec 23 '07 #1
5 1664
realin
254 Contributor
Hello all..

This is very simple question I think. :)
How to create multiple page navigation?
e.g:
- index.php?page= home
- index.php?page= download
- index.php?page= contact

Thank you very very much..

and Merry Christmas!

hi frozenade,

You can do it using simple switch-case.
an example would be ::

[PHP]

<?php
if($_GET){
$action=$_GET['page']
}

switch($action) {

case 'download':

//your code stuff goes here
break;

case 'contact':

//your contact code goes here
break;

default:
//this you can use for home option

} //switch ends here

?>

[/PHP]

cheers !!
Dec 23 '07 #2
frozenade
23 New Member
hi..
it works. thank you very very much.. :)

one more question please, I hope you dont mind. :)
if 'default' use to 'home' page, how to set if user type wrong paremeter then it will show the custom error 404 msg?


thank you in advance.
Dec 24 '07 #3
realin
254 Contributor
hi..
it works. thank you very very much.. :)

one more question please, I hope you dont mind. :)
if 'default' use to 'home' page, how to set if user type wrong paremeter then it will show the custom error 404 msg?


thank you in advance.
it is not mandatory that you put homepage's content into defualt, its just as i thought.. cause either way user is entering a wrong parameter, meaning he is trying be smart.. LOG HIS IP 5-7 times and then put a temp ban .. otherwise u can always show HOME page.. why we need to show 404 error page.. rest it all depends on ur design and technique u using ;)

cheers !!
Dec 24 '07 #4
frozenade
23 New Member
oh, I see now..
404 msg isn't necessary, cause wrong parameter will bring to default.

thank you very much. :)

Merry Christmas!
Dec 25 '07 #5
realin
254 Contributor
oh, I see now..
404 msg isn't necessary, cause wrong parameter will bring to default.

thank you very much. :)

Merry Christmas!
anytime dude,
merry xmas :)
Dec 25 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3520
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET) template. Briefly -------------------------------------------------------------------------------------------- I need to create dynamically some controls on the forms, and display these
1
2250
by: Ajar | last post by:
Hi, Using urllib2,ClinetForm and ClinetCookie modules I have logged into my ISPs web site and managed to fetch the first page. Now, on this page there is this link: <a href="#" onclick="check(4);return false;" class="zi01">Service Records</a> I need to click this link from python code. How do I do it? check(4) is
3
2643
by: IMS.Rushikesh | last post by:
Hi Friends, I need a XPath query, whcih ll return me subset of data.... check below xml stream <label id="MyExpenseDetails_lbl" xlink:role="terseLabel">Short Expense Details</label> <label id="MyExpenseDetails_lbl" xlink:role="displayLabel">Expense Details</label> <label id="InternalExpense_lbl" xlink:role="displayLabel">Internal
3
1500
by: msnews.microsoft.com | last post by:
Hello All, I am trying to write Web Controls and in most of the samples I came across, I am seeing the following function where a HTML string is written to create HTML Controls. /// <summary> /// Render this control to the output parameter specified.
4
2436
by: TS | last post by:
When i try to access the page class or parent properties inside a server control that is nested in another server control, they are null. I don't even call CreateChildControls for the parent control until its pre-render event, so i know the parent control is on the page. Any ideas? thanks
0
1923
by: Luqman | last post by:
I have copied the following code from Internet, and copied it to a file named : test.aspx, and copied that file to c:\Inetpub\wwwroot Directory. When I type on my Internet explorer: http:\\localhost\test.aspx, following error occured: The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
1
2346
by: rushikesh.joshi | last post by:
Hi All, I want some charting functionality in my ASP.NET application. I want to show a multiple bar on my web page. It's based on down time of different servers. like server1: down betn 4 AM to 5 AM and 6 PM to 7 PM server2: down betn 7 AM to 7:30 AM server3: down betn 3 AM to 5 AM and 2 Pm to 3 PM
4
10506
by: John Daly | last post by:
Does anyone know how to create an image (JPEG) from an HTTPResponse object? I am working on system that has a map pop up from our GIS department. I want create an image at runtime from this popup and display that image on the main page instead of opening a new window. This image will be a memory stream only, but will need to be kept from page to page, and printer if required. Any help will be much appreciated. If anyone knows of any...
40
2336
by: Angus | last post by:
Hello I am writing a library which will write data to a user defined callback function. The function the user of my library will supply is: int (*callbackfunction)(const char*); In my libary do I create a function where user passes this callback function? How would I define the function?
11
2938
by: =?Utf-8?B?UGV0ZXIgSw==?= | last post by:
I am working with Visual Studio or alternately with Expression Web. I need to create about 50 aspx pages with about 1200 thumbnali images, typically arranged in three to four groups per page, having hyperlinks to the corresponding full size images. Can anybody point me to locations in MSDN or elsewhere giving the references to attach, the commands & objects for creating or opening the pages and possibly available classes? I have done...
0
8435
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8768
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1754
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.