Solved

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

Posted on 2013-01-04
6
313 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:
Chris Sandrini 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 53

Expert Comment

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

Cd&
0
 
LVL 110

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

718 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