hi there, i have this files:
JAVASCRIPT
$(document).ready(function(){
$('a').click(function(){
$('div').load("formular.html",function(){
$('input[type="submit"]').click(function(){
$('form').submit();
});
});
});
});
formular.html
<form action="gigi.php" name='formular' method="post" enctype="multipart/form-data" />
<input type="file" name="fisier" />
<input type="submit" value="trimite" />
main html file
<a href="#">click</a>
<div></div>
PHP(gigi.php)
$nume = $_FILES['fisier']['tmp_name'];
print $nume;
what I'm trying to do is to load the formular.html on "a" click, and then to submit the imported form. BUT..if I'm not using the submit() method and I try to click the submit button...NOTHING happens (it won't load the gigi.php in the browser). Using the submit method, it looks like the form is submitted (the gigi.php is loaded in the browser) but the form data is not passed to php page (so i get the "undefined index..." error). This is an example with a file input, but I tried with text too... and it still doesn't work. SO I REALLY NEED HELP :D thanks guys