- Objetivo:
- Deberás crear un formulario en php tal como se muestra en el video cargado al final de ésta página, haciendo uso de diferentes tipos de inputs.
- Al final del formulario, existen 3 inputs de tipo file (que sirven para subir archivos) donde subiremos imágenes desde nuestra computadora, el primero tiene que subirse con el mismo nombre de la imagen que se encuentra en tu computadora, el segundo añadirá un número identificador al nombre de tu imagen y el tercero validará si existe en tu carpeta ese nombre de tu imagen y en el caso de que no exista, no le agregará ninguna identificación y en el caso de que si exista, le agregará un identificador al nombre de la imagen.
- Al dar al botón de enviar, imprimirá en pantalla el valor que ha obtenido del formulario, en el caso de los archivos bastará con imprimir el array del archivo.
- Estructuración de carpetas:
- No te olvides de mantener tus archivos lo más organizados posibles, también tendrás una carpeta para las imágenes que vayas a subir, se tendrán que ir a esa carpeta en el momento que le des al botón de enviar.
- No te olvides de tener tu proyecto dentro de la carpeta htdocs de xampp o mamp y de encender el servidor.
- Temas a practicar:
- Para este ejercicio usaremos la pedagogía activa, en su máximo nivel, donde tú buscarás todo lo que necesites para poder manejar formularios en PHP.
- CSS (diseño a tu gusto).
- Purpose:
- You will have to create a form in php as shown in the video uploaded at the end of this page, making use of different types of inputs.
- At the end of the form, there are 3 entries of the file type (which are used to upload files) where we will upload images from our computer, the first must be uploaded with the same name as the image found on your computer, the second will add an identifier number to the name of your image and the third party will validate if that name of your image exists in your folder and if it does not exist, it will not add any identification and if it does exist, it will add an identifier to the name of the image.
- By clicking on the send button, it will print the value obtained from the form on the screen. In the case of files, it will be enough to print the file array.
- Folder structure:
- Don't forget to keep your files as organized as possible, you will also have a folder for the images that you are going to upload, they will have to go to that folder when you click on the send button.
- Don't forget to have your project inside the xampp or mamp htdocs folder and to turn on the server.
- Topics to practice:
- For this exercise we will use active pedagogy, at its highest level, where you will look for everything you need to be able to handle forms in PHP.
- CSS (free design).