il codice di tutta la pagina:


<?php virtual('/Connections/symbio.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO reg (nome, indirizzo, email, cat, sugg, `desc`) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['textfield'], "text"),
GetSQLValueString($_POST['textfield2'], "text"),
GetSQLValueString($_POST['textfield3'], "text"),
GetSQLValueString($_POST['categoria'], "text"),
GetSQLValueString($_POST['textarea'], "text"),
GetSQLValueString($_POST['categoria_suggerita'], "text"));

mysql_select_db($database_symbio, $symbio);
$Result1 = mysql_query($insertSQL, $symbio) or die(mysql_error());

$insertGoTo = "http:://www.commercialevirtuale.com/reg_ok.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento senza titolo</title>
<script type="text/javascript">
<!--
function scambio(id){
if (document.getElementById){
if(document.getElementById(id).style.display == 'none'){
document.getElementById(id).style.display = 'block';
} else {
document.getElementById(id).style.display = 'none';
}
}
}
-->
</script>
</head>

<body>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="right">
<form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<label>Nome sito
<input type="text" name="textfield" />
</label>



<label>Indirizzo
<input type="text" name="textfield2" />
</label>
</p>



<label>Email
<input type="text" name="textfield3" />
</label>
</p>


<label>Categoria </label>
<select size="1" name="categoria">
<option>abbigliamento</option>
<option>auto&moto</option>
<option>casa&giardino</option>
<option>cibo&bevande</option>
<option>elettronica</option>
<option>film&dvd</option>
<option>fotografia</option>
<option>giocattoli</option>
<option>gioielli</option>
<option>informatica</option>
<option>internet</option>
<option>libri&riviste</option>
<option>musica</option>
<option>salute&benessere</option>
<option>sport</option>
<option>telefonia</option>
<option>viaggi&vacanze</option>
<option>videogiochi</option>
<option>servizi</option>
<option>suggerisco nuova categoria</option>
</select></p>
<p align="right">
<div style="border:0px solid orange; width:389px; text-align:left; height:40px">
<p style="text-align: right"><a href="#" onclick="scambio('testo1'); return false">
<font size="2">Clicca se vuoi inserire una nuova categoria</font></a></p>
</div>



<label>Descrizione
<textarea name="textarea"></textarea>
</label>
</p>



<label>
<input type="submit" name="Submit" value="Invia" />
</label>
</p>
<div id='testo1' style="border-left:0px dotted orange; border-right:0px dotted orange; border-bottom:0px dotted orange; width:390px; border-top: medium none; display:none; height:21px">
<p align="right"><label><font size="2">inserisci una nuova categoria </font></label>
<input type="text" name="categoria_suggerita" size="30"></p></p>
</div>
<input type="hidden" name="MM_insert" value="form1">
<div>



</form>
</div></td>
<td></td>
</tr>
<tr>
<td>

ATTENZIONE: IGNORATE I MESSAGGI D'ERRORE DOPO AVER PREMUTO SU TASTO &quot;INVIA&quot;. I DATI SARANNO REGISTRATI UGUALMENTE. </p>


DOPO AVER REGISTRATO IL VOSTRO SITO CLICCATE QUI. IMPORTANTI ISTRUZIONI </p></td>
<td> </td>
</tr>
</table>
</body>
</html>