programming_language.php?id=1
The URL given above us POST global id variable and returns 1 value. Yes, this is functional. Because after this step, we'll just make that query given below for getting datas:
SELECT * FROM table_name WHERE id=1
But we all know that the uses of the above is suck for nowadays. For that reason, we need to get URL given below:
programming-language-php.html php-programming-language
We have to create a .htaccess file on the server side for generating an URL for above, that goes:
Options +FollowSymLinks RewriteEngine On ReWriteRule (.*) programming_language.php?id=$1 [L, QSA]
.htaccess file runs programming_language.php page and gets id value as SEF structure in the (.*) statement. According to these conditions lets make a PHP file for using SEF!
$var = $_POST["id"]; //getting URL data with using POST global variable echo $var;
When we run the PHP page as www.whateverstdioe.com/php, we can see php on the screen. Because of there is a similarity between www.whateverstdioe.com/php and www.whateverstdioe.com/id=php. See you next article!
This comment has been removed by a blog administrator.
ReplyDelete