Tips and Tricks in PHP

I am sharing some tips and tricks with you here, with the experience I have had in programming

# If you are uploading any files using form , always use enctype=”multipart/formdata”  in the form tag.

For eg.   <form name=”myform” method=”post” enctype=”multipart/formdata“>

If you don’t use the above attribute , you will be not able to upload the file onto the sever

# if some of your form values are not submitting, then the first thing you should check is whether the all the elements are lying with the <form>

and </form> tag . Sometimes the form tag structure look good but the tag structure does not form well , when the DOM creation take place ie the page rendering.

Leave a Reply

Your email address will not be published. Required fields are marked *