MOSTAGHASSI
asked on
How can define this $_GET["page"] variable on my page?
Hello;
Above a page i have used these 2 lines:
but in error log of php i get a notice that :
please let me know that where and how can define the variable 'page'?
Thanks
Above a page i have used these 2 lines:
$pagenum = utf8_decode(htmlspecialchars($_GET["page"])); //these 2`lines are for injection protection.
$pagenum = mysql_real_escape_string($pagenum);
but in error log of php i get a notice that :
PHP Notice: Undefined index: page
please let me know that where and how can define the variable 'page'?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is how and why you want to move to the MySQLi or PDO extensions. It's important to move to the currently supported extensions because after Jan 1, 2017, there is no supported PHP release that continues to support MySQL.
https://www.experts-exchange.com/articles/11177/PHP-MySQL-Deprecated-as-of-PHP-5-5-0.html
PHP external variables are handled this way:
http://php.net/manual/en/reserved.variables.get.php
http://php.net/manual/en/language.variables.external.php
See also:
http://php.net/manual/en/book.filter.php
https://www.experts-exchange.com/articles/11177/PHP-MySQL-Deprecated-as-of-PHP-5-5-0.html
PHP external variables are handled this way:
http://php.net/manual/en/reserved.variables.get.php
http://php.net/manual/en/language.variables.external.php
See also:
http://php.net/manual/en/book.filter.php
ASKER
Thanks for all comments,specially regarding mysqli.
You are welcome.
Open in new window
http://php.net/manual/en/reserved.variables.get.php