Scusate ma mi è andato in palla php...
Allora l'errore che mi dà è questo:
Parse error: syntax error, unexpected T_STRING in /web/htdocs/www.***.it/home/classi/form_generator.php on line 18
il codice è questo la prima riga è segnata:
Codice PHP:
<?php //prima riga
error_reporting(E_ALL);
class elementi_form {
var $html;
function elementi_form($tipo = 'text', $attributi = array('nome'=>'default'), $opzioni = array()) {
if (preg_match("/^(text|radio|checkbox|password|hidden|submit|reset|button|image|file)$/", $tipo)) {
$tag_apertura = '<input type="' . $tipo . '" ';
$carat_chiusura = ' ';
$tag_chiusura = '/>';
} elseif (preg_match("/^(textarea|select)$/", $tipo)) {
$tag_apertura = '<' . $tipo . ' ';
$carat_chiusura = '>';
$tag_chiusura = '<\' . $tipo . '>';
} else {
die('Tipo elementi passati non validi'); //riga 18
}
if (!is_array($attributi) || count($attributi) < 1) {
die('Numero errati di attributi!!');
}
$elementi_attributi = '';
foreach ($attributi AS $attributo=>$valore) {
if (empty($attributo) || empty($valore) {
die('Valore o attributo vuoto!!!');
}
:berto: :berto: non c'è un'errore..... o no????