Jump to content
Larry Ullman's Book Forums

DanielFrye

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DanielFrye

  • Rank
    Newbie
  1. This is what my error log is currently telling me. Something on the password.php file. [03-Sep-2014 09:29:28] PHP Parse error: syntax error, unexpected T_IF in /home4/fryemult/public_html/fryemultimedia/includes/lib/password.php on line 5 <?php namespace { if (!defined('PASSWORD_DEFAULT')) { define('PASSWORD_BCRYPT', 1); define('PASSWORD_DEFAULT', PASSWORD_BCRYPT); /** * Hash the password using the specified algorithm * * @param string $password The password to hash * @param int $algo The algorithm to use (Defined by PASSWORD_* consta
  2. mysqli.inc.php // Make the connection: $dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); // Set the character set: mysqli_set_charset($dbc, 'utf8'); // Function for escaping and trimming form data. // Takes one argument: the data to be treated (string). // Returns the treated data (string). function escape_data ($data, $dbc) { // Strip the slashes if Magic Quotes is on: if (get_magic_quotes_gpc()) $data = stripslashes($data); // Apply trim() and mysqli_real_escape_string(): return mysqli_real_escape_string ($dbc, trim ($data)); } // End of the escape_data() functio
  3. form_functions.inc.php <?php function create_form_input($name, $type, $label = '', $errors = array(), $options = array()) { // Assume no value already exists: $value = false; // Check for a value in POST: if (isset($_POST[$name])) $value = $_POST[$name]; // Strip slashes if Magic Quotes is enabled: if ($value && get_magic_quotes_gpc()) $value = stripslashes($value); // Start the DIV: echo '<div class="form-group'; // Add a class if an error exists: if (array_key_exists($name, $errors)) echo ' has-error'; // Complete the DIV: echo '">'; // Create the LABEL, if
  4. Sorry for the late replies as I have gotten busy on another site that popped up. I've spent a couple days here again trying to fix this issue, but I'm still getting blank pages when registering. Register.php <?php require('./includes/config.inc.php'); require(MYSQL); $page_title = 'Register'; include('./includes/header.html'); $reg_errors = array(); if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Check for a first name: if (preg_match('/^[A-Z \'.-]{2,45}$/i', $_POST['first_name'])) { $fn = escape_data($_POST['first_name'], $dbc); } else { $reg_errors[
  5. Buckeye, It's been a couple months, but I was wondering if you could elaborate some on what your fix was. I am currently experiencing the same issue as you were when you made the post. Thank You
×
×
  • Create New...