I have a form like this
<form role="form" class="form-inline" action='pageadd.php' method='post' enctype='multipart/form-data'>
<table class='formTable'>
<tr>
<td>Name</td>
<td>:</td>
<td><input type="text" maxlength='140' class="form-control" size='50' name='title' /></td>
</tr>
<tr>
<td>Photo</td>
<td>:</td>
<td>
<input type="file" name='myphoto'/><br/>
</td>
</tr>
<tr>
<td>Content</td>
<td>:</td>
<td>
<textarea name='content' style='width:100%;height:240px;'></textarea>
</td>
</tr>
<tr>
<td colspan='3'><input type="submit" class="btn btn-success" name='save' value='Save' /></td>
</tr>
</table>
</form>
i prefer photo upload is optional
but the problem is when there is no photo uploaded, the form is not working, anyone know or ever found same problem?
Aucun commentaire:
Enregistrer un commentaire