get_param ()

function get_param ($var_name, $default = '', $mode = '')

Use this function to read values from form which is using GET method, or from URL.

$var_name is the name of the variable to be read from.

$default is the default value to be assigned if the variable doesn't exist.

$mode is how to read the variable:

  • noslash = remove slashes from value.
  • nohtml = remove all HTML tags.
  • filterhtml = remove selected HTML tags defined in configuration panel.
  • html = allow HTML tags.
  • BY DEFAULT, get_param will add slashes, encode HTML tags with htmlspecialchars, thus making it SQL ready.

Example 1

require './includes/user_init.php';
echo get_param ('number', 5);

If you call the script with test.php?number=10, it will output '10'.

Posted On: Aug-19-2010 @ 07:00am
Last Updated: Jan-01-1970 @ 07:00am

There is no comment. Why not be the first?

More Comments/Post Your Own


Latest Comments

  • Guest on Forum
    “noFollow links.” - Jun 19
  • username on Forum
    “Sponsor or Premium user” - Jun 14
  • on Forum
    “Template not found! contact webmaster” - Feb 24
  • admin on 01. Administration Panel
    “Untitled” - Jan 24
  • on 01. Administration Panel
    “Can't Login to Admin” - Jan 23

Most Commented

Online Users

There are 151 users online.


Connect with us on Facebook


Subscribe to our newsletter for the latest updates and exciting promotions!