nice video but i have a question. in this video you overwrite the txt file. but i want to add more data in text file and dont want to delete existing data
Good day. I looked at your tutorial and managed to do everything except for one small problem. I converted the textarea into an input field. That all worked out. however, I need 2 input options that both write in the log.txt. So far I haven't found a solution to this.
Hi Finn, really very easy when you know how. Maybe string concatenation is the direct that you need. stackoverflow.com/questions/24780677/file-put-contents-with-multiple-variables
My two cents for anyone interested: file_put_contents can accept a third parameter "flag". You can specify if you want the file to keep adding data instead of erasing it (like a log, a list, etc). In the example of this video, it will be something like this: file_put_contents($file, $comment, FILE_APPEND); For more info about file_put_contents() you can visit the php wiki and see the technical stuff as well as the examples.
Thank you for this video! I have a question how do i have to store multiple inputs separated with a “ ,” . And i wanna store each user info on a separate line?
@@veryacademy i mean the user have to enter his name, family name, school name . The php should store these info separated by “ ,” in the txt file. And each line represents a different user and their info
Thank you for taking your time to share your knowledge
My pleasure!
Thank you for the video.
Do we need two php files for that, or is it possible in one php file?
Just one
nice video but i have a question. in this video you overwrite the txt file. but i want to add more data in text file and dont want to delete existing data
stackoverflow.com/questions/103593/using-php-how-to-insert-text-without-overwriting-to-the-beginning-of-a-text-fil
Good day. I looked at your tutorial and managed to do everything except for one small problem. I converted the textarea into an input field. That all worked out. however, I need 2 input options that both write in the log.txt. So far I haven't found a solution to this.
Hi Finn, really very easy when you know how. Maybe string concatenation is the direct that you need. stackoverflow.com/questions/24780677/file-put-contents-with-multiple-variables
Thank you!!, but where is the place to close the file? imagine we create and update many files, what would happen with the memory?
Se puede hacer sin localhost ?? 👉 NO QUIERO USAR XAMPP
My two cents for anyone interested:
file_put_contents can accept a third parameter "flag". You can specify if you want the file to keep adding data instead of erasing it (like a log, a list, etc).
In the example of this video, it will be something like this: file_put_contents($file, $comment, FILE_APPEND);
For more info about file_put_contents() you can visit the php wiki and see the technical stuff as well as the examples.
Thanks Emanuel, I forgot about this tutorial!
@@veryacademy thanks to you man, your tutorial saved me. Cheers from Argentina
Thank you for this video! I have a question how do i have to store multiple inputs separated with a “ ,” . And i wanna store each user info on a separate line?
Hi Sara, sorry, not quite sure as to what you mean by store multiple inputs and store each user info on a separate line - store it where?
@@veryacademy i mean the user have to enter his name, family name, school name . The php should store these info separated by “ ,” in the txt file. And each line represents a different user and their info
i know Im kinda off topic but does anybody know a good site to watch newly released tv shows online?
@Bronson Davion Flixportal :)
@Adrian Leandro Thank you, I signed up and it seems to work :D I appreciate it!
What program are you using to code?
Visual Studio Code
🫶thanks