I'm creating a signup page, when I add required fields to establish database connections in the beginning of the body of my signup page(splash.php) i encounter a 404 error upon page loading on localhost when I open a preview window in Adobe Dreamweaver. I additionally encounter these 2 errors when manually opening splash.php through the url bar: 1. Warning: require_once(/start/db.php): failed to open stream: 2. Fatal error: require_once(): Failed opening required '/start/db.php' (include_path='.;C:\php\pear')
I've looked into the folders containing the files, those 2 php files seem to open fine and are present in the "start" folder. I cannot figure out why requiring these files causes a 404 error & the other 2.
Here is the beginning html doc for splash.php: the 2 require_once codes are causing the problem.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link rel="stylesheet" href="/ink/post_creation.css">
</head>
<body>
<?php require_once("/start/db.php"); ?>
<?php require_once("/start/signup.php"); ?>
Here is the beginning of the database:
<!doctype html>
<?php
$dbhost = 'localhost';
$dbname = 'start';
$dbuser = 'xxxxx';
$dbpass = 'xxxxx';
$connection = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
if ($connection->connect_error) die("Fatal Error");
And beginning of signup.php:
<!doctype html>
<?php
if (isset($_POST['signup']))
{
require_once('/start/db.php');
$username = $_POST['username'];
$email = $_POST['email'];
$password = $_POST['pwd'];
I'd hoped it would simply load the page, any help would be fantastic!