PHP MySQL Tutorial

Derek Banas · 678K views · 2014 · 19:22

Open on YouTube

Web developmentDatabases & storagetutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when beginners need to see how PHP, MySQL and HTML fit together, or when they cite it as the tutorial they followed.

Recommended by 1 people across 1 different months, 2016 to 2020.

What it is

A 19-minute tutorial by Derek Banas that bridges his earlier separate PHP and MySQL videos. It shows how to connect PHP to a MySQL database, create a limited-access database user, pull and add data, and use prepared statements.

What people said

Recommends Samuel · 2016-02 · Stack Overflow · on “The webpage does not display the db contents”

Sorry to take so long to reply. Have you created a database? You need to create a database along with some tables to allow data entry. I suggest this YouTuber videos ( MySQL [LINK] and MySQL and PHP [this video] ) that helped me understand the interaction a bit better between PHP, MySQL, and HTML.

Cites 2114L3 · 2016-06 · Stack Overflow · on “Submit form from a PHP HTML table”

in your receipt.php file; <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>title</title> </head> <body> <?php //NEW $servername = "example.com"; $username = "username"; $password = "password"; $dbname = "database"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } //NEW $sql = "SELECT * FROM customer"; $result = $conn->query($sql); if ($result->num_rows > 0) { echo " <table><tr><th>ID</th><th>Name</th> <th>Amount</th><th>TransactionID</th><th>Mobile Number</th> <th>Time Paid</th><th>Account</th> <th>Receipt Number</th></tr>"; // output d

Cites cssyphus · 2016-12 · Stack Overflow · on “Permanently post some form data on another page”

POSTing data to a PHP page does not automatically "store" the information you are posting to it. It merely sends the data from newbroadcast.php to the announcements.php , and announcements.php can do what it is programmed to do with the data. In your case, announcements.php is displaying the data - but not storing it for future. To store the data for future, you must save it somewhere on the server and re-factor announcements.php to check on the server for such data, and (if such data is found) display all the announcements via some sort of loop. So how to store the announcements? You can use PHP commands such as fwrite or file_put_contents to save the announcements into a specific folder, a

Cites Alex G · 2017-09 · Stack Overflow · on “Permission denied for PHP application with xampp”

I am trying to make my first php based website and have ran into a problem. The website is very basic and is intended to allow users to enter student information into a database. I built this website following a tutorial by Derek Banas which can be found here: [this video] . Whenever I try to open my getStudentInfo.php file in my browser, I receive the following error: Warning: require_once(C:\xampp\htdocs\practiceWebDev): failed to open stream: Permission denied in C:\xampp\htdocs\practiceWebDev\practicePHPmySQL\getStudentInfo.php on line 3 Fatal error: require_once(): Failed opening required '../../practiceWebDev' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\practiceWebDev\practicePHPm

Cites Programmer S · 2020-01 · Stack Overflow · on “How to connect mysql to PHP through largon”

I am trying to do some coursework, where I have to create a webpage that interacts with a mySQL database using PHP. I am unfamiliar with PHP and I don't know how to connect an SQL database to it. I have access to a piece of software called "laragon", which seems to be a virtual server program. So far, I have managed to get a "hello world program" to run. <HTML><BODY>Test.<br> <?php echo "PHP test"?> </BODY></HTML> Result: [LINK] I have been trying to find out how to "connect" PHP to a mySql database through Google, but I could not find anything that clearly shows how to do so. I tried adapting some code I found from [LINK] . <HTML><BODY>Test.<br> <?php $conn = new mysqli("localhost", "", "",