sqlpage.header(name)
Introduced in SQLPage 0.7.2.
Reads a header with the given name from the request. Returns the value of the header as text, or NULL if the header is not present.
Example
Log the User-Agent
of the browser making the request in the database:
INSERT INTO user_agent_log (user_agent) VALUES (sqlpage.header('user-agent'));
Parameters
name
The name of the HTTP header to read.
basic_auth_password
basic_auth_username
cookie
current_working_directory
environment_variable
exec
fetch
hash_password
header
link
path
persist_uploaded_file
protocol
random_string
read_file_as_data_url
read_file_as_text
request_method
run_sql
uploaded_file_mime_type
uploaded_file_name
uploaded_file_path
url_encode
variables
version