Hello to all, first I am really sorry if i posted this thread in wrong section or something like that... :)
So i wanted to get some help from other people who uses PHP language. I want to ask for the best and secure way to do this. All kind websites uses the` http://webname?test=home,'rules','terms'` and so on. So how can i do the same thing a secured way and with more comfortable way than i know.
I know a way like this:
if($_GET['test']=='rules')
{
do something...
} else if($_GET['test']=='terms')
{
do something...
}
And soo on.
So how can i do like by ?test=... to do something without goving to another files like `http://webname/index.php' or http://webname/rules.php`... :)?
karolismf
0
Newbie Poster
Recommended Answers
Jump to Postkarolismf, you are wanting to URL rewrite (aka MOD_REWRITE), this is done via .htaccess file.
So for example you could turn this url:
www.somewebsite.com/index.php?s1=43&s4=44
Into something like:
www.somewebsite.com/43/44
Jump to PostWell if you want to execute an action you will always have to load a new file or reload the current file. The only exception is if you use AJAX to dynamically load a file (you know, like for example the search completion that Google uses, that's AJAX).
So, if …
All 7 Replies
Squidge
101
Newbie Poster
karolismf
0
Newbie Poster
minitauros
151
Junior Poster
Featured Poster
karolismf
0
Newbie Poster
minitauros
151
Junior Poster
Featured Poster
karolismf
0
Newbie Poster
minitauros
151
Junior Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.