Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,362 members, 7,812,028 topics. Date: Monday, 29 April 2024 at 06:39 AM

GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql (1094 Views)

Php Mysql: Use Php To Serialize Mysql Table / Xampp Server User Please Come In And Assist / IT Gurus I Need Your Help Concerning My SIWES (2) (3) (4)

(1) (Reply) (Go Down)

GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql by waikiki(m): 1:54pm On May 19, 2017
please reply for details!!!!!!!
Re: GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql by ellagabs(f): 1:58pm On May 19, 2017
av u creatd ur tables?
Re: GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql by waikiki(m): 2:02pm On May 19, 2017
ellagabs:
av u creatd ur tables?

yes ma'am, i have done all that

the problem now is that my php code does not connect to database. i've tried all the possible codes out there

Re: GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql by chygoz3(m): 3:02pm On May 19, 2017
You cannot run a php file using the 'file' protocol. In other words, your address bar should contain something like http://localhost/my_hobby_app/index.php

The address in your browser indicates that the folder containing the index.php file contains spaces in its name. I suggest you remove the spaces.

1 Like

Re: GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql by waikiki(m): 5:04pm On May 19, 2017
I'll just install wamp


this xampp is just driving me crazy
Re: GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql by webdeveloperqx: 10:20pm On May 19, 2017
waikiki:
I'll just install wamp


this xampp is just driving me crazy

for quick testing , you can create a server and listen at a port of your choice ,

STEPS:

1.open your terminal for mac or command prompt for windows

2. change to the directory of where you files are by typing " cd foldername" , foldername here points to your working directory or folder

3.to create a server , type php -S localhost:9987

4. run your scripts by visiting localhost:9987

1 Like

Re: GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql by Nobody: 6:14am On May 20, 2017


<?php
$host= 'localhost';
$user= 'root';
$pass= '';
$db="testdb";

$con= mysqli_connect($host,$user,$pass,$db) or die('cannot connect '. mysqli_error());
mysqli_close($con);
?>




Kindly use Google next time. And set up your xampp/wampserver. Copy and pasting codes isn't the right thing to do,obviously, you won't learn a thing like that.

2 Likes

Re: GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql by beatsbyj2g(m): 11:41am On May 20, 2017
waikiki:
please reply for details!!!!!!!

Chill take your time and read about stuffs.
Part of being a developer means we have to read slot
Google and read up to 3 articles on how to use xamps ...

And all your problems will be solved
Re: GURUS! I Need Urgent Help With Using Php To Connect To Xampp Mysql by SunFlow(m): 8:13pm On May 20, 2017
next, just let it slide and take a time out. Coding can be fraustrating atimes.

(1) (Reply)

Words And Symbols Associated With Programming / Assist Me On Writing the Google Mobile Web Specialist Exam, I Will Pay You / 2019 Might Be The End Of Internet With EU Aticle 13 Law Save The Internet

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.