Digital Fox
Digital Fox
  • Видео 51
  • Просмотров 629 415
How to save messages from a contact form to a JSON file using PHP | PHP & JSON Tutorial
In this tutorial we are going to use PHP to collect the data from
a contact form and save the messages in a JSON file.
Also we will have an inbox page to display, reply or delete a message.
If you follow along you can download the styles.css file from here:
digitalfox-tutorials.com/youtube-files/storing-form-data-in-json-file-styels.css.zip
You can buy me a coffee and get the whole source code in a zip file.
www.patreon.com/Digitalfox13/shop/saving-messages-from-contact-form-in-213474?Link&
Thanks for your support guys and girls.
Просмотров: 315

Видео

Upload - Display and Delete Images from the Database in PHP | PHP and MySQL Tutorial
Просмотров 5786 месяцев назад
We're going to create a small application that allows us to upload image files to the server, store their names in a database, display the uploaded images in the browser, and provide us with the option to delete them. Also we will display errors to the user when something goes wrong. This is basic PHP and MySQL stuff that we need to know. If you feel like saying thanks, you can buy me a coffee ...
Drag and Drop image files with instant preview using JavaScript and the Drag and Drop API
Просмотров 6367 месяцев назад
In this tutorial, I am going to show you how to drag and drop image files from your computer into the browser and get an instant preview using only vanilla JavaScript. You are going to learn how to use the dragenter, the dragover , the dragleave, and the drop event listeners to drag the files into a designated drop-area and handle them. Also you will learn how to use the dataTransfer object to ...
How to properly validate an uploaded image file using PHP | PHP file Validation tutorial
Просмотров 1,2 тыс.7 месяцев назад
In this video i m going to show you how to be sure, that the uploaded file is an image. We are going to properly validate an uploaded image using php. The code that we are going to write can easily used in a live project. We are going to check if the file is a real image, and not something else like a pdf, or text file, or some malicious script file that someone has changed the file-extension t...
Display JSON data in Chart.js with JavaScript | Change dynamically the chart types in Chart.js
Просмотров 9 тыс.9 месяцев назад
In today's tutorial we are going to see how to create charts from JSON files, using the Chart.js library and javascript. Also we are gonna see how to change the type of a chart with a simple click of a button. Chart.js getting started link: www.chartjs.org/docs/latest/getting-started/ You can read the article and download the source code from my website: digitalfox-tutorials.com/tutorial.php?ti...
Send Email from localhost with PHP using PHPMailer and Gmail SMTP server
Просмотров 27 тыс.9 месяцев назад
In this video we are going to create a contact form, and we will using PHPMailer and Gmail's mail server to send emails from our localhost server. Download PHPMailer from Github: github.com/PHPMailer/PHPMailer Create an Google App Password: support.google.com/accounts/answer/185833?hl=en You can buy me a coffee and get the whole source code in a zip file. www.patreon.com/Digitalfox13/shop/send-...
Creating dynamic web pages using PHP and MySQL | Part 2 | Coding the back-end
Просмотров 6 тыс.10 месяцев назад
In today's Tutorial we will see how to create dynamic content using php and mysql. This is the second part of a two-part tutorial. In the first part we created the front-end of a simple shop, and in this part we will create the dynamic content using php and mysql. We are going to create a simple shop , and we are going to create it from scratch. Download the products folder and the database tab...
Creating dynamic web pages using PHP and MySQL | Part 1 | Coding the front-end
Просмотров 17 тыс.Год назад
In today's Tutorial we will see how to create dynamic content using php and mysql. This will be the first part of a two-part tutorial. In the first part we are going to deal with html and css to create the front-end of a simple shop, and in the second part we will create the dynamic content using php and mysql. We are going to create a simple shop , and we are going to create it from scratch. D...
How to upload multiple images with PHP | PHP tutorial
Просмотров 10 тыс.Год назад
In this video we are going to see, how easy it is to select and upload multiple files to the server with php. Sometimes we want to make things easier for our users, and want to give them the option to upload multiple files at once, but when it comes to it, we think that this must be a very difficult task. Its not, watch the video and find out for yourself. You can read the tutorial on my websit...
How to upload a file without using a form with Ajax
Просмотров 1,3 тыс.Год назад
In this video we are going to send a file to the server without the use of a form element. We are going to use the FormData object in Javascript, and an Ajax request to send a file to the server. And from there we are going to use php to save it in a folder. I also have an article on my website which you can read: digitalfox-tutorials.com/tutorial.php?title=How-to-create-a-simple-php-and-mysql-...
Creating a simple pagination using php and mysql
Просмотров 25 тыс.Год назад
In this tutorial we are going to explain step by step, how to create a pagination using php and mysql. You can read the article here: digitalfox-tutorials.com/tutorial.php?title=How-to-create-a-simple-php-and-mysql-pagination You can buy me a coffee and get the whole source code in a zip file. www.patreon.com/Digitalfox13/shop/php-and-mysql-pagination-132996?source=storefront
How to loop through arrays and display html code inside paragraphs and tables with php.
Просмотров 3,5 тыс.Год назад
We are going to loop through simple (indexed arrays), and multidimensional associative arrays and display the data inside html elements. You can also read the article on my website: digitalfox-tutorials.com/articles.php?article=How-to-loop-through-an-array-and-display-html-code-with-php If you feel like saying thanks, you can buy me a coffee. www.buymeacoffee.com/digitalfoxb
How to send a javascript object to a php file using the fetch method |
Просмотров 28 тыс.Год назад
We are going to send a javascript object with a post request to a php file using the fetch method. Also we are going to see how to catch the php response in the javascript file. There will be a back and forth transaction, from the javascript file to the php file. You can also read the article on my website: digitalfox-tutorials.com/tutorial.php?title=How-to-send-a-javascript-object-to-php My fa...
Creating the front-end of a five star rating system with javascript, html, and css.
Просмотров 7 тыс.Год назад
we are going to create the front end of a rating system and store the ratings in the browser's local storage. In this way if the user comes back to the page the ratings he made will be still there. You can read the article on my website. There you will find also the tutorials source code. digitalfox-tutorials.com/tutorial.php?title=Creating-the-front-end-of-a-rating-system-with-css-and-javascri...
How to create a page scroll progress bar indicator with javascript
Просмотров 2 тыс.Год назад
Hi guys, in this video we are going to create a horizontal scroll indicator, which will show us how much we have scrolled down the page. If you thing that it's something difficult to achieve, i have to tell you that we only need six lines of javascript code to make this to work. There is an article on my website that you can read, and also you can download the source code: digitalfox-tutorials....
How to write a function to generate a secure, random, password with php.
Просмотров 1,5 тыс.Год назад
How to write a function to generate a secure, random, password with php.
Create a password strength indicator with JavaScript | Password strength checker
Просмотров 1,8 тыс.Год назад
Create a password strength indicator with JavaScript | Password strength checker
Reset forgot password and delete account | PHP and MySQL secure login system | Part 3
Просмотров 2,8 тыс.Год назад
Reset forgot password and delete account | PHP and MySQL secure login system | Part 3
Log-in and log-out a user | PHP and MySQL secure login system | Part 2
Просмотров 4,9 тыс.Год назад
Log-in and log-out a user | PHP and MySQL secure login system | Part 2
Register the user in the database | PHP and MySQL secure login system | Part 1
Просмотров 15 тыс.Год назад
Register the user in the database | PHP and MySQL secure login system | Part 1
How to create, write, read, and delete files in php | PHP filesystem tutorial.
Просмотров 4,3 тыс.2 года назад
How to create, write, read, and delete files in php | PHP filesystem tutorial.
How to toggle a click event in javascript | Toggle a mouse click
Просмотров 6 тыс.2 года назад
How to toggle a click event in javascript | Toggle a mouse click
How to get random items from an array using php.
Просмотров 2,3 тыс.2 года назад
How to get random items from an array using php.
Filtering database data with a select dropdown menu using javascript and php
Просмотров 17 тыс.2 года назад
Filtering database data with a select dropdown menu using javascript and php
Edit JSON files with PHP
Просмотров 3,6 тыс.2 года назад
Edit JSON files with PHP
Instant preview multiple images | Part two.
Просмотров 3642 года назад
Instant preview multiple images | Part two.
Instant preview multiple images | Part one.
Просмотров 4572 года назад
Instant preview multiple images | Part one.
How to create a simple animated responsive navigation menu, with HTML, CSS, ad JavaScript
Просмотров 1752 года назад
How to create a simple animated responsive navigation menu, with HTML, CSS, ad JavaScript
How to zip compress files with php.
Просмотров 2 тыс.2 года назад
How to zip compress files with php.
Log and Register users in a JSON file | PHP and JSON tutorial
Просмотров 14 тыс.2 года назад
Log and Register users in a JSON file | PHP and JSON tutorial

Комментарии

  • @SwitchedOn
    @SwitchedOn 3 дня назад

    Excellent way to help us concentrate is some banging techno music. Good choice.

  • @rakibulhasanroki4089
    @rakibulhasanroki4089 6 дней назад

    Shown success buy my db table is still empty😔 What can i do for solve this problem?

  • @user-nu8jk9wz5z
    @user-nu8jk9wz5z 9 дней назад

    thnak you

  • @HosseinAletomeh
    @HosseinAletomeh 14 дней назад

    excellent

  • @SelfMasteryZone697
    @SelfMasteryZone697 15 дней назад

    Thank you for this tuto, I have one question though, maybe I'm too tired and I didn't notice but did we use the 4th argument $image_type?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 15 дней назад

      You're absolutely right. I didn't use the $image_type variable, there was no need to. I got the image type using the 'finfo' function from the $image_temp variable, so there was no need to include in the code '$image_type = $image['image']['type']' in the first place. Good observation.

    • @SelfMasteryZone697
      @SelfMasteryZone697 14 дней назад

      @@DigitalFox-tutorials thank you for clarification

  • @rahmana5813
    @rahmana5813 18 дней назад

    How make connection to get the data from database?

    • @Gabrielrezcp
      @Gabrielrezcp 15 дней назад

      You can create an api to return data from the database in json format

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 15 дней назад

      You can use PHP and mysql to get the data from the database and then you can fetch the data using the 'fetch' method in JavaScript. Actually i was already thinking to make a tutorial on this topic.

    • @dhirajsingh7899
      @dhirajsingh7899 7 дней назад

      ​@@DigitalFox-tutorialsplease make a video on this using mongodb database

    • @aryanYadav-er7qt
      @aryanYadav-er7qt 4 дня назад

      ​@@DigitalFox-tutorialswaiting for the tutorial

  • @khalafnasirov
    @khalafnasirov 24 дня назад

    For page of numbers <?php for ($i = 0; $i < $pages; $i++) { ?> <li class="page-item"><a class="page-link" href="?page_num=<?php echo ($i + 1) ?>"><?php echo ($i + 1) ?></a></li> <?php } ?>

  • @khalafnasirov
    @khalafnasirov 24 дня назад

    i wrote For previous button ?page_num=<?php echo ($current_page == 1) ? 1 : ($current_page - 1) ?> For next button ?page_num=<?php echo ($current_page == $pages) ? $pages : ($current_page + 1) ?>

  • @moqeemahmad5475
    @moqeemahmad5475 29 дней назад

    value added tutorials please.

  • @vuthasokban5898
    @vuthasokban5898 Месяц назад

    got problem with exception file because it couldn't be found even thought it was existed. can you tell me how to solve that ?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 26 дней назад

      Hey check for any typo in the lines of code where you include the namespaces in the script.php file. Check out the code on my website: digitalfox-tutorials.com/tutorial.php?title=Send-Email-in-PHP-using-PHPMailer-and-Gmail

  • @domnsync
    @domnsync Месяц назад

    Hello, thanks for the tutorial. I use app password but it's not working. It was working before, suddenly stopped. Is it xoauth2 related?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials Месяц назад

      Hey, I am not sure but check your Gmail settings. Make sure that you have two step verification enabled.

    • @domnsync
      @domnsync Месяц назад

      It's already enabled. I've found out that xoauth2 setting is needed. There's no other way. I'm trying to implement it to my project.

  • @ahmedelkhateeb4213
    @ahmedelkhateeb4213 Месяц назад

    you are a great person, you solved a big problems I faced with a very smart, simple and organized way. thank you so much

  • @claytonzulu4054
    @claytonzulu4054 Месяц назад

    You areeeeee awessssssoooooooommmmmeeeee!

  • @kopilkaiser8991
    @kopilkaiser8991 Месяц назад

    Thank you for showing the many ways to manipulate the select element in javaScript 💯⭐️⭐️⭐️⭐️⭐️

  • @kennethm.380
    @kennethm.380 Месяц назад

    What text editor are you using? Brackets? Sublime? Note++?

  • @Ann-t1n
    @Ann-t1n Месяц назад

    thanks its really helpful

  • @frank_bastelt
    @frank_bastelt Месяц назад

    Very good video. Thank you for your perfect training.

  • @stripewarrior
    @stripewarrior Месяц назад

    Best video I have found on this. Thank you. Vamos Greece ❤️

  • @MS39550
    @MS39550 Месяц назад

    You are such a LIVESAVER🫡

  • @RodolphoArrudanogoogle
    @RodolphoArrudanogoogle Месяц назад

    Excellent.

    • @RodolphoArrudanogoogle
      @RodolphoArrudanogoogle 29 дней назад

      Now I'm watching this video for the second time and giving it a better thought. Instead of creating the password and sending it, I would just send a link to a password creating page. In that page, I would take the new password, generate the hash and then direct the user to the login page. Additionally, I would build logic into the function that if the password has already been reset, a message would inform the user about it. So the password would not be accessible in the user's inbox, nor the reset link could be used more than once. That would force a bad actor to access the victim's inbox again, which may fail due to actions taken by the email service provider or the user themselves later on.

  • @RodolphoArrudanogoogle
    @RodolphoArrudanogoogle Месяц назад

    what a nice tutorial to watch. Thanks for making this!

  • @lilarkzuli2948
    @lilarkzuli2948 Месяц назад

    THANKS I REALLY NEED THIS, other tutorials suggest use things like node or react but is really difficult for me to do, so THANKS

  • @AYOUB_Ak1887
    @AYOUB_Ak1887 Месяц назад

    Thank you my Indian brother for best teaching ❤

    • @DigitalFox-tutorials
      @DigitalFox-tutorials Месяц назад

      Thank you, but i am actually from Greece.

    • @AYOUB_Ak1887
      @AYOUB_Ak1887 Месяц назад

      @@DigitalFox-tutorials Excuse me bro , I thinked you are from India 😅🤦🏻‍♂️

    • @DigitalFox-tutorials
      @DigitalFox-tutorials Месяц назад

      No worries, we are all brothers.

  • @ismailchiba3513
    @ismailchiba3513 Месяц назад

    very simple and clear thanks

  • @HakanGalip
    @HakanGalip Месяц назад

    Hey Digital Fox your video helps me solving a problem that i can not solve for a year... Thanks a lot and it is very good that teachers gives their inputs to others...

  • @abdurahmanaqlan9634
    @abdurahmanaqlan9634 Месяц назад

    my requests keep getting blocked by CORS policy, why is that?

  • @Mohammed-ix5je
    @Mohammed-ix5je Месяц назад

    Amazing!

  • @Sj-yf2jg
    @Sj-yf2jg 2 месяца назад

    can you share the source code link?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 2 месяца назад

      Hey, I have an older video and tutorial. You can get the source code from there. It's not exactly the same code, but it does the same thing. digitalfox-tutorials.com/tutorial.php?title=Storing-form-data-in-a-json-file-with-php

    • @Sj-yf2jg
      @Sj-yf2jg 2 месяца назад

      @@DigitalFox-tutorials ok and thanks for the reply bro

  • @majeedpanahi5783
    @majeedpanahi5783 2 месяца назад

    I do have a question though. Why would a developer go through this long coding while he/she can use the Bootstrap 5 libraries? What is the advantage of one over another?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 2 месяца назад

      Hey, i know it's more convenient to use bootstrap, not only to create a pagination but other stuff to, but you must also know basic programming stuff like this one.

  • @majeedpanahi5783
    @majeedpanahi5783 2 месяца назад

    Thank you. Pagination is well explained in a professional-like manner.

  • @smartpaulo0176
    @smartpaulo0176 2 месяца назад

    Perfect video but a question came to mind: can I do this evaluation system but save the value in a database like MariaDB, PostgreSQL?

  • @krab1cka1
    @krab1cka1 2 месяца назад

    Hello, I tried to copy every move you did. When i reload script.php page it does say "Mail is send" but when I check my webmail there is no new mail - Ive checked spam folder, etc. but nothing. Do you think you can help me? Also, dont you have to set your SMTP server somewhere? Or its not related to this.

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 2 месяца назад

      Yes when we use the mail function in php we have also to be sure that our SMTP settings are correct. But don't bother much with the mail function. Check this tutorial on how to use the PHPMailer library to send emails using Gmail's SMTP server. digitalfox-tutorials.com/tutorial.php?title=Send-Email-in-PHP-using-PHPMailer-and-Gmail

  • @ReanNetwork2024
    @ReanNetwork2024 2 месяца назад

    It would be great if there were a part 3.

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 2 месяца назад

      You mean like shopping cart and checkout page? Yes i thought about it.

  • @ektatiwari9969
    @ektatiwari9969 2 месяца назад

    best explained and to the point i have searched alott but do not able to fetch the record from json file... but u are saviour thanks a tonnnnnnn ❣❣..if someone watched this and follow the steps no other video is required.

  • @svrthardware9038
    @svrthardware9038 2 месяца назад

    How to make dynamic product details page using same ajax script If user touches on the list it must open dynamic product detail page

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 2 месяца назад

      Hey, check this out i think it's what you need. digitalfox-tutorials.com/tutorial.php?title=Creating-dynamic-web-pages-using-PHP-and-MySQL

  • @blackxebecsv1
    @blackxebecsv1 2 месяца назад

    your video is very useful

  • @muhammadadilhussain7727
    @muhammadadilhussain7727 2 месяца назад

    What if the JSON, is not given by me but it is extracted from the oracle data base with perl code and I am retrieving the data in json form in javascript, then how can I achieve this dynamic list selection task any hint? Nice video though :)

  • @prafulbagde7634
    @prafulbagde7634 2 месяца назад

    Works like a charm

  • @desuno2609
    @desuno2609 2 месяца назад

    So for me this doesn't work, CORS actively blocks the request. How do I circumvent this?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 2 месяца назад

      Hey, sorry for the late response. I think that in a local environment the problem occurs when we use visual studio's live server. I am not 100% sure, but i read that somewhere. Set up a localhost server like MAMP or XAMPP to try it out.

    • @desuno2609
      @desuno2609 2 месяца назад

      @@DigitalFox-tutorials no problem, thanks for replying! it was indeed a problem with visual studio live server. i got it fixed eventually 👍

  • @SaiRam-mo6pu
    @SaiRam-mo6pu 2 месяца назад

    It supports localhost by xampp server ??

  • @ndenosharo
    @ndenosharo 3 месяца назад

    Please how do i write all those descriptions in the database?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 2 месяца назад

      Normally we have a CMS (content management system) from where we upload the products. But in our case here you have to go and write everything in the database manually.

  • @ndenosharo
    @ndenosharo 3 месяца назад

    Video is perfect. Anything always help me to add to my others. How do i write all those descriptions in the database please to read and fetch

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 2 месяца назад

      Thank you. Normally we have a CMS (content management system) from where we upload the products. But in our case here you have to go and write everything in the database manually.

    • @ndenosharo
      @ndenosharo 2 месяца назад

      @@DigitalFox-tutorials Thank you. I did some quick research and i found the different CMS include excel and the bench system. Could you Recommend me to any tuition or tips on how to write the descriptions products directly in the DB manually including the images or videos so as to fetch these combine informations. Thanks

  • @MarkHanna-u2s
    @MarkHanna-u2s 3 месяца назад

    big thanks to you you are a life saver

  • @marcofloriano
    @marcofloriano 3 месяца назад

    Amazing tutorial nice job

  • @Yem17
    @Yem17 3 месяца назад

    Literally worked first try, thank you!

  • @Bengt-xw9yj
    @Bengt-xw9yj 3 месяца назад

    Instead of the username, my runtime console just logs the content of the PHP file. I assume the PHP script is not even being executed. Is this related to the server configuration, or what could be the problem here?

  • @Bengt-xw9yj
    @Bengt-xw9yj 3 месяца назад

    Instead of the username, my runtime console just logs the content of the PHP file. I assume the script is not even being executed. Is this related to the server configuration, or what could be the problem here?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 3 месяца назад

      You are correct, by displaying the PHP file's content the script is not executed. Check if your localhost server is running. Also i have the impression that if you use VS code with a live server it might not work. Hope it helps.

    • @Bengt-xw9yj
      @Bengt-xw9yj 3 месяца назад

      @@DigitalFox-tutorials Thank you, it was in fact a server configuration issue. I just got confused because I had the same problem both with my VS Code live server and my actual server.

  • @TG_2
    @TG_2 3 месяца назад

    It says its not iterable

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 3 месяца назад

      I think there is maybe a typo in your code. Get the source code from my website and compare it to yours. digitalfox-tutorials.com/tutorial.php?title=Fetch-data-stored-in-a-json-file-with-JavaScript

  • @benderblender8510
    @benderblender8510 3 месяца назад

    Hey there, my product page is not working. It keeps saying $title is undefined, but my category page work just as good.. Any Solution?

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 3 месяца назад

      Make sure that you are sending the title query string along with the GET request from the index file and also from the category page. <p class="title"> <a href="product.php?title=<?php echo urlencode($product['title']) ?>"> <?php echo $product['title'] ?> </a> </p> I thing that's the problem. Or check your spelling maybe there is a typo.

  • @yomnayoyo-yl4nu
    @yomnayoyo-yl4nu 3 месяца назад

    Hi thank u but i need the code i cant found it in youre website

    • @DigitalFox-tutorials
      @DigitalFox-tutorials 3 месяца назад

      Hey, i updated the link in the description . I didn't notice that it was broken. Sorry.