PHP: User Submitted Data - Manual in Deutsh
PHP: User Submitted Data - Manual in French
PHP: User Submitted Data - Manual in Polish

You Are At PHP: User Submitted Data - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

Chapter 30. User Submitted Data

The greatest weakness in many PHP programs is not inherent in the language itself, but merely an issue of code not being written with security in mind. For this reason, you should always take the time to consider the implications of a given piece of code, to ascertain the possible damage if an unexpected variable is submitted to it.

Example 30-1. Dangerous Variable Usage

<?php
// remove a file from the user's home directory... or maybe
// somebody else's?
unlink ($evil_var);

// Write logging of their access... or maybe an /etc/passwd entry?
fwrite ($fp, $evil_var);

// Execute something trivial.. or rm -rf *?
system ($evil_var);
exec ($evil_var);

?>

You should always carefully examine your code to make sure that any variables being submitted from a web browser are being properly checked, and ask yourself the following questions:

By adequately asking these questions while writing the script, rather than later, you prevent an unfortunate re-write when you need to increase your security. By starting out with this mindset, you won't guarantee the security of your system, but you can help improve it.

You may also want to consider turning off register_globals, magic_quotes, or other convenience settings which may confuse you as to the validity, source, or value of a given variable. Working with PHP in error_reporting(E_ALL) mode can also help warn you about variables being used before they are checked or initialized (so you can prevent unusual data from being operated upon).

hurtownia odzieży, końcówki kolekcji, wizy do rosji, terapia uzależnień, wiza do rosji, ośrodek leczenia uzależnień, car audio, W124/W202/W140/R129/W210/W208/, Struktury danych i techniki ob, Darmowy katalog, rozrywka, Klawiatury
Multitools wirówka praca-zywiec.be Kabury i pokrowce krzesła
noni | rent haus | wózki sklepowe | kredyt hipoteczny | pogoda na weekend | Asus A7PRO Bios 1.11 Driver for Windows 9X/ME/NT/2 | Haft

Another Useful functions:


zend.variables | zend-api.zend-u-delete-global-variable | zend-api.zend-print-variable | zend-api.zend-get-compiled-variable-value | zend-api.zend-get-compiled-variable-name | zend-api.zend-delete-global-variable | security.variables | reserved.variables | migration4.variables | language.variables.variable | language.variables.scope | language.variables.predefined | language.variables | language.variables.external | functions.variable-functions | function.variant-xor | function.variant-sub | function.variant-set | function.variant-set-type | function.variant-round | function.variant-pow | function.variant-or | function.variant-not | function.variant-neg | function.variant-mul | function.variant-mod | function.variant-int | function.variant-imp | function.variant-idiv | function.variant-get-type | function.variant-fix | function.variant-eqv | function.variant-div | function.variant-date-to-timestamp | function.variant-date-from-timestamp | function.variant-cmp | function.variant-cat | function.variant-cast | function.variant-and | function.variant-add | function.variant-abs | function.stats-variance | function.stats-covariance | function.mb-convert-variables | function.import-request-variables | function.define-syslog-variables | class.variant |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.