Manual of PHP

 
 
 

Web map

 
rim   rim
arrowReady frontarrow of Codes PHParrow Formatting of a chain

 

Formatting of a chain To print E-mail
Script PHP that formats a chain to be introduced in a database, to make sure that does not spoil a judgment SQL.

How many times have you been frightened that a chain that you are going to introduce in a field of a table does not have the correct format, and have checked it, and checked again... and then you discover that it has given an error on having introduced it because there were not valid characters?

Since you can already breathe with mitigation because with the script that we provide your headaches to you they have the few days:

function str_asegurar ($cadena) {
//I eliminate tags HTML and PHP
$cadena = strip_tags ($cadena);
//I eliminate the character quotation mark, which can spoil a judgment
$cadena = str_replace ("'", "'", $cadena);

return $cadena;
}


After having executed the script, only it stays to realize the insertion judgment.

Miguel Angel Alvarez
http://www.desarrolloweb.com/articulos/1440.php?manual=6

 

 
Front
Chapters of the Manual of PHP
Introduction to PHP
Variables
My First Script PHP
Operators in PHP
Structures of Control
Functions in PHP
Code inclusion
Counterfoils (array)
Chains of Characters
Classes
Dates
Entry and Exit
Operations with Files
The language SQL and PHP
Connection with MySQL
Meetings
Forms with PHP
To practise in line
List of practices in line
FAQ
Frequent questions
Codes PHP
List of Codes PHP
Forums
Forums PHP
Other Manuals
Manuals of other languages
 
   
 
 
MySpaceScripts.info - Sitemap - Contact us - Sitemap - Contact us - Sitemap - Contact us

DMC Poland , Patek Philippe Replika Uhren , Moto brands , GlobeSpot.Net Web Directory , auto.moto-point.co.uk , verizon wireless prepaid , Replica Watches