bonjour a tous
j'ai fait un formulaire dans lequel je souhaiterai permettre aux membres qui s'inscrit de poster une photo , cette photo devra avoir une taille de 1 Mo Max
et 300 sur 300 pix.
mon formualire html est le suivant :
je souhaiterai le code php qui va avec , un code qui me protégerai contre les hackers et autres virus..., qui respecterai la taille des images
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 <form action="traitementimage.php" method="post" enctype="multipart/form-data" name="photo" id="photo"> <table width="41%" border="0"> <tr> <td colspan="3">Veuillez choisir votre photo, cliquez sur 'Charger' puis suivez les instructions.</td> </tr> <tr> <td width="19%">Choisir votre photo</td> <td width="36%"><label> <input type="file" name="fichier" id="fichier"/> </label></td> <td width="45%"> </td> </tr> <tr> <td> </td> <td><label> <input type="submit" name="submit" id="submit" value="Charger" /> </label></td> <td> </td> </tr> <tr> <td colspan="3"><p class="Style1">Seulement des fichiers aux extensions <strong>gif, jpg, jpeg et png</strong>. Taille maximu :1 Mo</p></td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </form>
merci bcp
Partager