Тёмный

How to Connect PHP to MySQL Database using XAMPP 

Solution Cone
Подписаться 24 тыс.
Просмотров 249 тыс.
50% 1

Learn How to Connect PHP to mysql database using xampp ..
Full Playlist: • How to Connect PHP to ...

Наука

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

 

5 авг 2015

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 163   
@knsense
@knsense 8 лет назад
Good job bro! Really clear instructions, best video out there for connecting to database using xampp!
@SolutionConeOfficial
@SolutionConeOfficial 8 лет назад
+Khalil Najjar Thanks and welcome :)
@sophietsai3284
@sophietsai3284 7 лет назад
thank you, simple and useful and helpful!
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
Welcome.. Mny More to come
@DrawSoEasy
@DrawSoEasy 7 лет назад
I really love this video :)
@jeffersondelossantos6222
@jeffersondelossantos6222 4 года назад
Thank you, From Philippines
@SolutionConeOfficial
@SolutionConeOfficial 4 года назад
You are most welcome to Solutioncone... 🇮🇳 🤝 🇵🇭
@jlclavijocanada
@jlclavijocanada 2 года назад
Excellent tutorials, question Can I do this with my website, accessing a remote local ms-sql-server database?
@LeonSafal
@LeonSafal 7 лет назад
Thank You !! u are too helpful
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
Welcome...
@daniel_gallardo808
@daniel_gallardo808 7 лет назад
Looked everywhere for a simple solution, this worked the first try. Thank you so much!!! Quick question, if i wanted to create a mySQL table and insert data using a php page I made instead of making one through phpMyAdmin and adding data would that work?
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
+Daniel Gallardo yes definitely it will work
@MAYURROKDE
@MAYURROKDE 7 лет назад
Tutorial is good. Thanks for making. But i would request you to increase video quality as we are having little bit problem to see some PHP scripts. and it seems you have not shared annoted doc as you mentioned in the video.
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
Sure.. Will upload entire new video series for Core Php. Bootstrap, and many more
@Royowski01
@Royowski01 6 лет назад
Thank you for this clearful tutorial
@SolutionConeOfficial
@SolutionConeOfficial 6 лет назад
Most Welcome
@krishnakantsinghBundela
@krishnakantsinghBundela 7 лет назад
excellent tutorials....moreover in hindi its much understandable..ty for this.....I have one query ...I am making a web page for students to see solution of questions. I have takes all questions and answers in png form seperately. Now i want them to fill a scrollable form with option to get there desired question and answer. For ex, they will choose fst class, then subject, then chapter, then exercise, and then question. then after clicking submit button both pics must be displayed in a panel. Please tell me how to do this.
@mockingbird3809
@mockingbird3809 7 лет назад
Good job buddy I support you
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
+Harsath Bill Gates thank u
@dinmukhammadbekzhan9584
@dinmukhammadbekzhan9584 4 года назад
Update: If you get an error that says 'call to undefined function mysql_connect()', it means that this function was already removed in newer versions. Use mysql_connect() or PDO functions instead. See official documentation on php dot net. Also, if you're a mac user, you might have problems accessing htdocs repository. In XAMPP application go to 'Volumes' tab and press 'Mount'. A new directory will open under Locations in you Finder. Press there, go to lampp folder and you will find htdocs there. Good luck!
@SolutionConeOfficial
@SolutionConeOfficial 4 года назад
You can use mysqli_connect() instead
@Azlanabbas
@Azlanabbas 7 лет назад
thanks bro it helps a lot and anyone who is facing regarding the error "Call to undefined function mysql_connect()" try using this
@andrey.deocampo
@andrey.deocampo 6 лет назад
Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\manex.php on line 8 Connected Why it's like this bro? Thank you in advance
@thabogodfreygqeba2782
@thabogodfreygqeba2782 7 лет назад
Appreciated a lot bruhh
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
Welcome ... Enjoy the full series
@chanakakasun9468
@chanakakasun9468 7 лет назад
Good one for a beginner
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
Welcome...
@sevgiince7452
@sevgiince7452 8 лет назад
it is an old version of xammp. But it may be useful. Thanks
@whatsup7130
@whatsup7130 6 лет назад
thanks good job man
@SolutionConeOfficial
@SolutionConeOfficial 6 лет назад
Welcome..
@shwetachavan751
@shwetachavan751 6 лет назад
I selected xampp control from my local disk and clicked on php and apache after doing that when i try to browse localhost it's not showing localhost/xampp
@mao-weinilsson2718
@mao-weinilsson2718 7 лет назад
hi can you pls explain where you put mysql file and where you put php file?
@neeraj_v7070
@neeraj_v7070 4 года назад
Thank you bro !!
@SolutionConeOfficial
@SolutionConeOfficial 4 года назад
Welcome
@vaishakvaishu1151
@vaishakvaishu1151 6 лет назад
India❤
@MR.JUNE99
@MR.JUNE99 4 года назад
OH Thank you Soo much💖🤭🤭🥳🤭🙋✌️✋
@SolutionConeOfficial
@SolutionConeOfficial 4 года назад
Welcome to Solutioncone
@rajendrashendekar5581
@rajendrashendekar5581 5 лет назад
Thank you!!
@SolutionConeOfficial
@SolutionConeOfficial 5 лет назад
Welcome
@finding_truthcompany7257
@finding_truthcompany7257 5 лет назад
Can we create database without phpMyAdmin. I mean is there any other alternative other than phpMyAdmin
@ghulamzainab7786
@ghulamzainab7786 7 лет назад
i have downloaded xamp and localhost home page is not opening . i dont know what to do next?? i already have a prototype designed on which i will work. please guide soon
@andrewjbidlen1325
@andrewjbidlen1325 7 лет назад
Why do you need quotes around $username when you use it as a parameter for mysql_connect, but not when you use $db as a parameter for mysql_select_db?
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
See in PHP Output : $a 1 1 Means if you include double quotes then its same as not including a quote. You can use any one of the conventions..
@sudhakarreddychintareddy1328
@sudhakarreddychintareddy1328 7 лет назад
may I known what to do if not showing the add new account in uer account
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
Which account ?
@1gk
@1gk 3 года назад
Thank you, but could you update the PHP script to the new format using mysqli_ , instead of mysql ?
@SolutionConeOfficial
@SolutionConeOfficial 3 года назад
Yes. I will update it
@mwitadaud7767
@mwitadaud7767 6 лет назад
thanks alot.
@SolutionConeOfficial
@SolutionConeOfficial 6 лет назад
Welcome
@aditiaparna8528
@aditiaparna8528 4 года назад
Rishta kya kehlata hai soundtrack in the background proves that in all Indian households, the remote belongs to the women, hence men are confined to connect MySQL and PHP :P
@SolutionConeOfficial
@SolutionConeOfficial 4 года назад
LOL 😆
@md.arafathossain6815
@md.arafathossain6815 7 лет назад
Hello bruther , i am a new member of your centeen . I want to learn how to create a MySQL Database using XAMPP.
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
+Md. Arafat Hossain okk I will make a series on it.. That will help you
@asmrtist9058
@asmrtist9058 4 года назад
Where can I access dbhost & username and look up the password though? Would be great to know
@Ravisharma-is6tt
@Ravisharma-is6tt 7 лет назад
thanks man..
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
+Ravi sharma welcome
@vincentwalsh1123
@vincentwalsh1123 Год назад
Thanks, however it didn't connect until I changed mysql to mysqli . The "i" is important.
@SolutionConeOfficial
@SolutionConeOfficial Год назад
Welcome
@ItsPheenix
@ItsPheenix 7 лет назад
If I want to use a seperate sql database how would I do that?
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
mssql_connect($host, $username, $pass, $db) Refer : php.net/manual/en/function.mssql-connect.php
@Itssilver1
@Itssilver1 8 лет назад
Fatal error: Call to undefined function mysql_connect() in C:\xampp\htdocs\test3\conn.php on line 7 i need help for this !
@SolutionConeOfficial
@SolutionConeOfficial 8 лет назад
+Argjend Bytyqi Start using mysqli functions for MySql uses
@prajwalshetty9968
@prajwalshetty9968 4 года назад
After using mysqli I get error like "The server requested authentication method unknown to the client [caching_sha2_password]. Please help me with this @solutioncone
@eraback2024
@eraback2024 3 года назад
@@prajwalshetty9968 same error bro u get solutions of this error
@prajwalshetty9968
@prajwalshetty9968 4 года назад
After using mysqli I get error like "The server requested authentication method unknown to the client [caching_sha2_password]. Please help me with this
@rajkumargadam1259
@rajkumargadam1259 7 лет назад
Thank you
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
Welcome
@QuickMediaSolutionDelhi
@QuickMediaSolutionDelhi 8 лет назад
Parse error: syntax error, unexpected '$pass' (T_VARIABLE) in C:\xampp\htdocs\galactica\connect.php on line 5 why shows this error
@SolutionConeOfficial
@SolutionConeOfficial 8 лет назад
+Quick Media Solution can you show entire code of the connect.php file, so that we can help you
@relaxing_beats1
@relaxing_beats1 6 лет назад
I am using ubuntu 16.04. My XAMPP folder is located in opt directory,in which directory do I need to save the php file .
@SolutionConeOfficial
@SolutionConeOfficial 6 лет назад
I think in mnt -> www
@Yash-Gaikwad
@Yash-Gaikwad 5 лет назад
/opt/lampp/htdocs xampp will look for your files in htdocs dir, put your files in htdocs, and then you can browse localhost/yourfilename.php
@jnaz602
@jnaz602 7 лет назад
Why didn't you put a double quote on $db? and why does it still works?
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
+Pixelite just to slow that.. "$var" Is valid one.. And '$var' is not.. So you can use.. "$var" or $var but not '$var'
@HEMANTBISHT1000
@HEMANTBISHT1000 7 лет назад
love you buddy :D
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
+Hemant Bisht enjoy bro
@jeremytom9288
@jeremytom9288 7 лет назад
This is the error I am getting: Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\connect.php on line 12 Connected What is the other parameter I need?
@jeremytom9288
@jeremytom9288 7 лет назад
My Code:
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
+Jeremy Tom remove mysqli_select_db
@renukateli60
@renukateli60 6 лет назад
nice
@SolutionConeOfficial
@SolutionConeOfficial 6 лет назад
Thanks
@Privikachauhan
@Privikachauhan 7 лет назад
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in E:\xamp\htdocs\php\practise.php:6 Stack trace: #0 {main} thrown in E:\xamp\htdocs\php\practise.php on line 6 plzzzzzzzzzz help me why its error is arise
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
Can you show me the script ? Or try $conn = mysqli_connect("localhost","root","","database_name") or die("Error in Connection");
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
+Preeti Thakur ? Is your problem resolved ?
@sumukhahs437
@sumukhahs437 7 лет назад
use mysqli_connect(...);
@mockingbird3809
@mockingbird3809 7 лет назад
preeti without using mysql_connection use mysqli_connection()
@jodyk2193
@jodyk2193 7 лет назад
Hi, I seem to have the same problem. The sqli works for me when connecting, but not the sql. Why is that? Is there something else I can do to get the sql_connect to work instead?
@eswarrao4700
@eswarrao4700 4 года назад
i am getting an error saying that object not found.. can someone help me out
@ZAHIDHUSSAIN-xw8mk
@ZAHIDHUSSAIN-xw8mk 6 лет назад
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\d.php:3 Stack trace: #0 {main} thrown in C:\xampp\htdocs\d.php on line 3
@yogendralakraj3214
@yogendralakraj3214 4 года назад
same here . Were you able to figure it out
@RashidKhan-ss7em
@RashidKhan-ss7em 4 года назад
Admin please tell me how to fix caching_sha2_password in php error
@johnmwansa4180
@johnmwansa4180 7 лет назад
MR PLEASE IF YOU CAN HAVE TIME. I NEED THIS TUTORIAL ON MAC BECOUSE IAM USING THE MAC SO HOW TO BYPASS ON MAC.I KNOW YOU CAN DO IT TRUST YOU SO PLEASE IF YOU CAN MANAGE JUST CREATOR ONE VIDEO FOR ME.I LIKE YOUR VIDEO VERY MUCH
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
I don't have Mac!
@prachim144
@prachim144 7 лет назад
Followed the same instructions as shown in video, Yet after trying to run on localhost, the connect.php file i got this error: Warning: mysql_connect(): Access denied for user 'username'@'localhost' (using password: YES) in C:\xampp\htdocs\core\database\connect.php on line 7 connected to db where if success, i echoed connected to db. it is showing both the lines. what does this mean ?? Also i have localhost and username as root and password as blank. My connect.php file is as below: Please help for the above
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
May be your password will not be empty, make it root and try again...
@levisman6822
@levisman6822 6 лет назад
hi i having a problem in first, I typed localhost and i dont see like yours.. Help me please.. Thank you in advance..
@SolutionConeOfficial
@SolutionConeOfficial 6 лет назад
Can you tell me which port is configured as your localhost?
@levisman6822
@levisman6822 6 лет назад
my ports for mySQL is 3306 while the Apache port is 88,443 I don't have any idea of this port so far...
@ashwinisathe7378
@ashwinisathe7378 4 года назад
still getting error..................Object not fount help me to figure out it
@SolutionConeOfficial
@SolutionConeOfficial 4 года назад
This means there is some issue with linking the page. Please rectify
@danielbasa1555
@danielbasa1555 6 лет назад
Fatal error: Uncaught Error: Function name must be a string in C:\Users\Daniel\Desktop\XAMPP\htdocs\connection.php:2 Stack trace: #0 C:\Users\Daniel\Desktop\XAMPP\htdocs\login.php(2): include() #1 {main} thrown in C:\Users\Daniel\Desktop\XAMPP\htdocs\connection.php on line 2
@mudasirs7660
@mudasirs7660 5 лет назад
Bro it is not visible to learn proper cotes its double cote or single cot
@SolutionConeOfficial
@SolutionConeOfficial 5 лет назад
you can make a habbit Not to write variables in quotes..
@richardkaymwanza1851
@richardkaymwanza1851 7 лет назад
any help pliz,how do i create a database for my website
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
Go to PhpMyAdmin and create a database
@dhruvinprajapati5929
@dhruvinprajapati5929 6 лет назад
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\database.php:8 Stack trace: #0 {main} thrown in C:\xampp\htdocs\database.php on line 8
@doc-holiday
@doc-holiday 7 лет назад
I followed your instruction but i couldn't get this to connect. What i did was change the code to this $connected = mysql_connect("localhost", "root"); and then it worked.
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
Ok Cool.. At the end you sorted your problem thats great...
@AnSi97
@AnSi97 8 лет назад
Can you help me trough skype?
@SolutionConeOfficial
@SolutionConeOfficial 8 лет назад
+- DarkS997™ - sure..
@AnSi97
@AnSi97 8 лет назад
What is your skype?
@mohammadihtishamhaider
@mohammadihtishamhaider 7 лет назад
plz give me the solution where is connect.php fil?
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
+Gulfam Haider go trough the video
@mohammadihtishamhaider
@mohammadihtishamhaider 7 лет назад
already i have seen this video by this video you use connect.php file where is connect.php file saved?
@arielpineda8101
@arielpineda8101 7 лет назад
Why will it display "connected" but shows errors?
@arielpineda8101
@arielpineda8101 7 лет назад
but shows warnings*
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
What warning ?
@sharifabahar6257
@sharifabahar6257 7 лет назад
Thank you soooo much . May you help me? I got this error : Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\youtube\database\connect1.php on line 11 Connected successfully This is my code :
@SolutionConeOfficial
@SolutionConeOfficial 7 лет назад
@sharifabahar6257
@sharifabahar6257 7 лет назад
Thank you .
@akashdewangan7582
@akashdewangan7582 5 лет назад
#Akashdewangan Nice video good job...👍
@priyankawarrier6162
@priyankawarrier6162 5 лет назад
I tried this but It didnt get connected. (localhost/php/connect.php) This is not getting connected. Please help.
@SolutionConeOfficial
@SolutionConeOfficial 5 лет назад
What error do you see?
@priyankawarrier6162
@priyankawarrier6162 5 лет назад
Solution Cone - it's not getting connected..I tried the same which is shown in the video. Please show me other solution for getting g it connected.
@krishnakabra3836
@krishnakabra3836 3 года назад
Quality of video in not up to mark
@SolutionConeOfficial
@SolutionConeOfficial 3 года назад
Sorry about that
@cherajanesumampong809
@cherajanesumampong809 6 лет назад
atal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\php\connect.php:6 Stack trace: #0 {main} thrown in C:\xampp\htdocs\php\connect.php on line 6 Why ? :(
@SolutionConeOfficial
@SolutionConeOfficial 6 лет назад
try mysqli_connect
@cherajanesumampong809
@cherajanesumampong809 6 лет назад
Thank you .
@Pahadidance8
@Pahadidance8 3 года назад
Syntax error😔😔
@SolutionConeOfficial
@SolutionConeOfficial 3 года назад
Please check properly or follow the video again
@lhadycamillesaligo9660
@lhadycamillesaligo9660 2 года назад
Fatal error: Uncaught ArgumentCountError: mysqli_select_db() expects exactly 2 arguments, 1 given in C:\xampp\htdocs\php\connect.php:10 Stack trace: #0 C:\xampp\htdocs\php\connect.php(10): mysqli_select_db('solutioncone') #1 {main} thrown in C:\xampp\htdocs\php\connect.php on line 10
@whitemamba00
@whitemamba00 8 лет назад
need help on skype
@SolutionConeOfficial
@SolutionConeOfficial 8 лет назад
+whitemamba00 What the issue ? Mail us : contact@solutioncone.com
@whitemamba00
@whitemamba00 8 лет назад
+Solution Cone sent it.
@jesithrajasinghs1396
@jesithrajasinghs1396 6 лет назад
Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\form\insert.php on line 2 Could not connect: Access denied for user 'root'@'localhost' (using password: YES)
@HorizonGBRS
@HorizonGBRS 8 лет назад
Can I have a bit of help as well please on Skype.
@SolutionConeOfficial
@SolutionConeOfficial 8 лет назад
+HorizonGBRS Sure, msg your skype id
@HorizonGBRS
@HorizonGBRS 8 лет назад
Jack Davie it's a pic of a blue car.
@sarahdiana1081
@sarahdiana1081 6 лет назад
To much adds!!
@shwetachavan751
@shwetachavan751 6 лет назад
localhost is not running
@muhammadbilalraza8530
@muhammadbilalraza8530 6 лет назад
mysqli_real_connect(): Server sent charset (255) unknown to the client. Please, report to the developers
@annakatrinasimbahon4060
@annakatrinasimbahon4060 6 лет назад
Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in C:\xampp\htdocs\login\process.php:9 Stack trace: #0 {main} thrown in C:\xampp\htdocs\login\process.php on line 9
Далее
How to insert data into MySQL Database using PHP
9:46
PHP connect MySQL | Xampp
5:53
Просмотров 9 тыс.
С Анджилишей на тусе💃
00:15
Просмотров 154 тыс.
Ummmm We "HAIR" You!
00:59
Просмотров 5 млн
NATIONAL NATIONAL
9:40
Просмотров 195
Save HTML Form Data to a MySQL Database using PHP
24:38
How to Create Website using Xampp
19:15
Просмотров 286 тыс.
How to run first PHP program in XAMPP Server
5:56
Просмотров 920 тыс.
Развод с OZON - ноутбук за 2875₽
17:48