processador mysqli simples

<?php$database_server = “localhost”;$database_user = “XXX”;$database_password = “XXX”;$dbase = “XXX”;$mysqli = new mysqli($database_server, $database_user, $database_password, $dbase);/* check connection */if (mysqli_connect_errno()) { printf(“Connect failed: %sn”, mysqli_connect_error()); exit();}$insert = “INSERT INTO `leads` ( …

Continuar lendo

E-mail simples de PHP, validação de URL e IP

o email echo filter_var(’email@domain.com’, FILTER_VALIDATE_EMAIL); // email@domain.comecho filter_var(‘domain.com’, FILTER_VALIDATE_EMAIL); // false URL echo filter_var(‘http://rogeriolino.com’, FILTER_VALIDATE_URL); // http://rogeriolino.comecho filter_var(‘rogeriolino.com’, FILTER_VALIDATE_URL); // false IP echo filter_var(‘127.0.0.1’, FILTER_VALIDATE_IP); // 127.0.0.1echo filter_var(‘127.0.1’, FILTER_VALIDATE_IP); // …

Continuar lendo