Solved

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

Posted on 2013-01-04
6
309 Views
Last Modified: 2013-01-05
Can't get script to connect to database connect script in root. It's 2 levels up. Getting HTTP 500 response
register.php
0
Comment
Question by:QUESTOMNI
6 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38743998
shouldn't the path be: ('../mysqli_connect.php') instead of ('.../mysqli_connect.php')

Cd&
0
 
LVL 11

Accepted Solution

by:
un1x86 earned 500 total points
ID: 38745069
two levels up is ../../

so

require ('../../mysqli_connect.php');

Open in new window

0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38745456
If it's in the 'root', you should be able to use...

require ('/mysqli_connect.php');

Open in new window

0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38745924
Hmmm, that about covers the possibilities; other than hard coding an absolute path.

Cd&
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 38746618
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
0
 

Author Closing Comment

by:QUESTOMNI
ID: 38746771
Thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now