I have my form in J RC1.
It works pretty fine.
I wanna set up RC4.
I copy the form (via database)
and simply NO DATA are stored.
If I generate a new one, it will work but no uploading file!!!
No file uploaded, and as well no filename stored in the table.
Other fields are ok.
Here's the code I copied from the original.
- Code: Select all
<?php
$database =& JFactory::getDBO();
$database->setQuery( "INSERT INTO #__chronoforms_5 VALUES (
'' , '". date('Y-m-d')." - ".date("H:i:«»s"«»)."', '".$_SERVER['REMOTE_ADDR']."' , '".$_POST['name']."' , '".$_POST['email']."' , '".$_POST['ricetta']."' , '".$_POST['ingredienti']."' , '".$_POST['preparazione']."' , '".$_POST['consigli']."' , '".$_POST['origine']."' , '".$_FILES['allegato']['name']."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>
- Code: Select all
<h2>Ricette per palati Multi Culturali</h2>
<p><fieldset class="orange"><legend class="orange"><strong>Benintegra il palato!!</strong></legend>
Inviaci una ricetta tipica dei tuoi luoghi di origine.
Benintegrati preparerà per tutta la comunità la
scheda della tua ricetta, da stampare, conservare, preparare e....
gustare!!<br>
<strong>Fai sentire come si mangia a casa tua!</strong></fieldset></p>
<p><fieldset class="orange"><legend class="orange"><strong>Lo Chef</strong>
</legend>
<dl class="ccform">
<dt class="ccform"> <label for="name">Il tuo nome:<b>*</b></label>
</dt>
<dd class="ccform"><input name="name" id="name" type="text">
</dd>
<dt class="ccform"> <label for="email">La tua e-mail:<b>*</b></label>
</dt>
<dd class="ccform"><input name="email" id="email" type="text">
</dd>
<dt class="ccform"><label for="ricetta">La ricetta:<b>*</b></label>
</dt>
<dd class="ccform"><input name="ricetta" id="ricetta" type="text"> </dd>
</dl>
</fieldset></p>
<p><fieldset class="orange"><legend class="orange"><strong>Ingredienti</strong>
</legend>
<dl class="ccform">
<b>Campo obbligatorio*</b>
<dt></dt>
<dd><textarea cols="30" name="ingredienti" id="ingredienti" style="height: 63px; width: 612px;" rows="3"></textarea>
<span class="hint">Se usate dei preparati non
comuni, dite in linea di massima cosa sono o
come sono fatti.<span class="hint-pointer"> </span></span>
</dd>
</dl>
</fieldset></p>
<p><fieldset class="orange"><legend class="orange"><strong>Come si fa?</strong>
</legend>
<dl class="ccform">
<b>Campo obbligatorio*</b>
<dt></dt><dd><textarea cols="30" name="preparazione" id="preparazione" style="height: 63px; width: 612px;" rows="3"></textarea>
</dd>
</dl>
</fieldset></p>
<p><fieldset class="orange"><legend class="orange"><strong>Consigli in Cucina</strong>
</legend>
<dl class="ccform">
<dt></dt>
<dd class="ccform"><textarea cols="30" name="consigli" id="consigli" style="height: 63px; width: 612px;" rows="3"></textarea>
<span class="hint">Qualche dritta per fare diventare il tutto più buono e appetitoso?!<span class="hint-pointer"> </span></span>
</dd>
</dl>
</fieldset></p>
<p><fieldset class="orange"><legend class="orange"><strong>Origine</strong>
</legend>
<dl class="ccform">
<label for="origine">Indica la Regione, il
Paese o
l'Area Geografica di provenienza del tuo piatto.<b>*</b></label><br>
<dt></dt>
<dd class="ccform"> <input name="origine" id="origine" type="text">
</dd>
</dl>
</fieldset></p>
<p><fieldset class="orange"><legend class="orange"><strong>Come si presenta?</strong></legend>
<dl class="ccform">
<label for="allegato">Allega una foto del tuo
piatto!
Servirà a distinguerlo. Puoi provare ad inviare anche le
foto del tuo cellulare.</label><br>
<dt></dt>
<dd class="ccform"> <input name="allegato" id="allegato" type="file">
<br>
<small>*.jpg, *.png, *.gif, *.tif
</small><span class="hint">Dimensioni Max 3072
Megabyte<span class="hint-pointer"> </span></span></dd>
<br>
</dl>
</fieldset>
<p><input value="Invia" name="submit" type="submit"><input value="Cancella" name="reset" type="reset">
Edited to add code tags and remove some empty lines<br><br>Post edited by: GreyHead, at: 2007/12/26 19:47

