Code: Select all
<form action="" method="post" enctype="multipart/form-data">
<label>Name</label> <input name="name" value="randname"/>
<label>Intro</label> <textarea name="intro">Intro</textarea>
<label>Main</label> <textarea name="main">Main</textarea>
<img src="image.jpg" />
<input type="file" name="image">
<input name="submit" type="submit" value="Submit" />
<input name="submitted_edit" type="hidden" value="TRUE" />
</form>
When I press the Submit button, the form reloads the same page over and over again, and if I change any of the text fields, each time they get updated on the database correctly.
However, it does not work as spotlessly if, each time, I change the image field by selecting a new photo: when I press the Submit button over and over again, sometimes the page stalls, it doesn't go through and I can see in the status bar the text "contacting localhost". This happens totally randomly; sometimes the form goes through, the image path gets copied and updated, and the page reloads fine. Other times, as I already said, it stalls, and only by pressing the Submit button a second time I manage to make the form reload the page and do what it's supposed to do. It doesn't depend on the picture, since it happens also when I change the existing picture to the same picture: sometimes it works fine at the first try, other times it takes 2 clicks of the submit button to go through.
Do any of you have any idea of what could cause this behaviour? It's driving me insane. Maybe the error is written to a log somewhere? Thanks in advance for any help.