Link to home
Start Free TrialLog in
Avatar of QUESTOMNI
QUESTOMNIFlag for United States of America

asked on

Can't get script to connect to database connect script in root.

Can't get script to connect to database connect script in root. It's 2 levels up. Getting HTTP 500 response
register.php
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

shouldn't the path be: ('../mysqli_connect.php') instead of ('.../mysqli_connect.php')

Cd&
ASKER CERTIFIED SOLUTION
Avatar of Chris Sandrini
Chris Sandrini
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dave Baldwin
If it's in the 'root', you should be able to use...

require ('/mysqli_connect.php');

Open in new window

Hmmm, that about covers the possibilities; other than hard coding an absolute path.

Cd&
After you get connected to the data base, you might want to learn about this:
http://php.net/manual/en/mysqli.real-escape-string.php
Avatar of QUESTOMNI

ASKER

Thanks.