473,385 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to create page parameter?

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 1654
realin
254 100+
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
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 100+
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
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 100+
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
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)...
1
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="#" ...
3
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...
3
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. ///...
4
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...
0
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:...
1
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...
4
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...
40
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...
11
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.