Тёмный
No video :(

Displaying Images from a MySQL Database using PHP 

Adam Thomas
Подписаться 2,6 тыс.
Просмотров 12 тыс.
50% 1

This is a video walk through of placing image content inside a MySQL database and then using PHP and SQL to extract the content from the MySQL database into an HTML webpage.
Full Tutorial: codeadam.ca/le...
Code: github.com/cod...
PHP: www.php.net/
---
Website: codeadam.ca/
Twitter: / codeadamca
Instagram: / codeadamca
GitHub: github.com/cod...
Music: The Lounge from Bensound.com

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 27   
@256gardenofgod8
@256gardenofgod8 3 года назад
Just solved my problem thanks
@spotshot8867
@spotshot8867 Год назад
thank you
@prasannasilva7754
@prasannasilva7754 3 года назад
Thank you very much
@genosthegreat7870
@genosthegreat7870 3 года назад
Thank u But the screen is so small
@codeadamca
@codeadamca 2 года назад
I know, I'm sorry. My fonts are larger in more recent videos! Maybe I'll get around to fixing the old ones one day.
@hebaadelali
@hebaadelali Год назад
Worked! thank u
@amonkasokomba7508
@amonkasokomba7508 Год назад
It's hard to see, why don't you zoom in on the area you are talking about. If you want to teach people, You don't have to put the small screen showing the face. Just show want you are talking about and your voice in the background.
@codeadamca
@codeadamca Год назад
Sorry! I do increase my font size in more recent videos.
@Bint_e_Iqbal
@Bint_e_Iqbal Год назад
It worked! Thanks. But can we resize the image? I don't know the coding for that can we resize these images? I want to make it smaller
@codeadamca
@codeadamca Год назад
Yep! You can resize is using CSS or the WIDTH attribute. Or you can resize the image using something like WideImage (wideimage.sourceforge.net/).
@spacerabbitk
@spacerabbitk Год назад
I doun't understans why moving the images from the main folder sends broken images on the webpages, if they are supposed to be called from the database not from the main folder
@codeadamca
@codeadamca Год назад
The images references are in the database. But the actual images are in the filesystem. The URLs generated using the database references still needs to reference the actual location of the images. So if the images are in an "images" folder and the file name is in the database (field.jpg) we need to combine those to to get a working image in your HTML.
@lionelfloriani8874
@lionelfloriani8874 Год назад
@@codeadamca So what's the point of all of this? I don't get it sorry. Why not just use the HTML way to display the images if those aren't stocked directly on the server?
@codeadamca
@codeadamca Год назад
@@lionelfloriani8874 This is just an intro to using images and a database. But eventually you could create an application where someone logs in, uploads their image (like Instagram, Facebook, etc...), PHP saves the image in a folder, places the reference in the database, and next time the page loads, it includes the new image. So the page content was updated without anyone touching any code.
@lionelfloriani8874
@lionelfloriani8874 Год назад
@@codeadamca Oh ok! Sorry, I didn't mean to be rude or anything, I just didn't understand :p I am currently on my path to be WebDeveloper, there is so much stuff to know/understand sometimes I get lost. Thanks for answering and for your videos :)
@hitech9661
@hitech9661 2 года назад
Hi, I have a question, can you create a code which changes a logo from a normal one to another one with santa hat during a given period
@codeadamca
@codeadamca 2 года назад
You could, you would just need to create a PNG image with that Santa hat, that lines up when placed on top. The term you want to Google is "watermark". I use a small PHP library called WideImage for simple image manipulation with PHP. WideImage as a few tools to add watermarks. wideimage.sourceforge.net/
@heythere_696
@heythere_696 2 года назад
it read the name & the file name but it don't show the image. 🥺
@codeadamca
@codeadamca 2 года назад
If you're testing your files by uploading them to your server, make sure you upload the files too! If that doesn't help, I would need to see your code to help.
@100bitCoding
@100bitCoding 2 года назад
IDE Font size is so small, couldn't see properly
@codeadamca
@codeadamca 2 года назад
I know. More recent videos the text is larger. Sory!
@threalinsideout1368
@threalinsideout1368 2 года назад
What about the second example... I need the second example. The first is not safe
@codeadamca
@codeadamca 2 года назад
I did not do the second version in this video, but I did in the Creating a PHP CMS videos, you could check those out if you're still looking.
@threalinsideout1368
@threalinsideout1368 2 года назад
@@codeadamca thank you, I've already figured it out. Thank you for your contribution 🙂
@edueuller5976
@edueuller5976 3 года назад
didn't solve my problem at all dude, worse of all times, but tks lol
@codeadamca
@codeadamca 2 года назад
Sorry it didn't help!
Далее
Displaying YouTube Videos from MySQL Database
12:53
Просмотров 6 тыс.
Would I still use PHP in 2023?
9:51
Просмотров 32 тыс.
Displaying Content from a MySQL Database in a Webpage
21:01
Setting up a LAMP Stack from Scratch using Docker
28:24
How to display images with PHP dynamically
5:33
Просмотров 23 тыс.