Sisi, fatto forse ho sbagliato qualcosa ho caricato il file jquery e il file jquery form.
Sempre nel head ho inserito lo script principale:
codice:
<script type="text/javascript">
// prepare the form when the DOM is ready
$(document).ready(function()
{
// bind form using ajaxForm
$('#htmlForm').ajaxForm({
// target identifies the element(s) to update with the server response
target: '#htmlExampleTarget',
// success identifies the function to invoke when the server response
// has been received; here we apply a fade-in effect to the new content
success: function()
{
$('#htmlExampleTarget').fadeIn('slow');
}
});
});
</script>
Poi ho caricato il form:
codice:
<form id="htmlForm" action="my_page.php" method="post">
<input type="text" id="prova" name="prova"/> <input type="submit" value="Aggiungi"/>
</form>
Infine ho scritto:
Codice PHP:
if(isset($_POST['prova']))
{
$stampa = $stampa.", ".$_POST['prova'];
echo $stampa;
}
è giusto?