So I download the last version of CF, and I found an old bug I met already in the previous... possible?!
Upload file failed.
Here's the auto generated script:
<?php
$database =& JFactory::getDBO();
srand((double)microtime()*10000);
$inum = "I" . substr(base64_encode(md5(rand())), 0, 16);
$database->setQuery( "INSERT INTO #__chronoforms_1 VALUES (
'' , '".$inum."','". date('Y-m-d')." - ".date("H:i:s")."', '".$_SERVER['REMOTE_ADDR']."' , '".JRequest::getVar('name','', 'post', 'string', '' )."' , '".JRequest::getVar('titolo','', 'post', 'string', '' )."' , '".JRequest::getVar('descrizione','', 'post', 'string', '' )."' , '".JRequest::getVar('email','', 'post', 'string', '' )."' , '".JRequest::getVar('allegato','', 'post', 'string', '' )."' , '".JRequest::getVar('tema','', 'post', 'string', '' )."' , '".JRequest::getVar('tag','', 'post', 'string', '' )."' , '".JRequest::getVar('region','', 'post', 'string', '' )."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
for this form:
[quote]
<fieldset class="ccform"><legend><strong>Your artwork</strong>
</legend>
<dl class="ccform">
<dt class="ccform"> <label for="name">Author:<b>*</b></label>
</dt>
<dd class="ccform"><input name="name" id="name" type="text">
</dd>
<dt class="ccform"><label for="titolo">Title:<b>*</b></label>
</dt>
<dd class="ccform"><input name="titolo" id="titolo" type="text"> </dd>
<dt class="ccform"><label for="descrizione">Description:</label>
</dt>
<dd class="ccform"><textarea cols="30" name="descrizione" id="descrizione" style="height: 63px; width: 100% " rows="3"></textarea> </dd>
<dt class="ccform"> <label for="email">Your e-mail:<b>*</b></label>
</dt>
<dd class="ccform"><input name="email" id="email" type="text">
</dd>
<dt class="ccform"><label for="allegato">Attach your artwork:<b>*</b></label></dt>
<dd class="ccform"> <input name="allegato" id="allegato" type="file"> <br>
<span class="hint">Maximum size 10MB<span class="hint-pointer">