PHP Query String without Question Mark

AddThis Social Bookmark Button

Nice urls without question mark in PHP

Most of the time when I want to pass a variable in php I just use a question mark, you can see an example of this on my flickr original image url retriever. But, it’s always nice to keep your urls clean and get rid of the question marks from the url box. In fact, nice urls not only look professional but they are very search engine friendly and get indexed faster. So, how do you pass query strings and get rid of the question marks to keep nice urls?

Consider the simple form below:

<form action=”name.php” method=”post”>
Name: <input type=”text” name=”name” />
<input type=”submit” />
</form>

Now, create a php file called name.php and retrieve the value using $_POST variable:

Simple and easy!

Popularity: 3%


Tags:


If you enjoyed this post, please consider to leave a comment.

Comments

No comments yet.

Leave a comment

(required)

(required)