Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About rocky48

  • Rank
    Advanced Member
  • Birthday 03/03/1948

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Hastings, UK
  • Interests
    Programming, Radio Control Model Aircraft
  • Age
  1. I think it was the parent bit that was stopping it! However there are still problems! Here is the error: Now I have cleared the original problem, It still errors! Now it is finding fault with the font scripts. Here is the error: Fatal error: Uncaught Exception: FPDF error: Incorrect font definition file name: /frscript.php in /homepages/30/d593365489/htdocs/fpdf.php:271 Stack trace: #0 /homepages/30/d593365489/htdocs/fpdf.php(1142): FPDF->Error('Incorrect font ...') #1 /homepages/30/d593365489/htdocs/fpdf.php(459): FPDF->_loadfont('/frscript.php') #2 /homepages/30/d5
  2. Tried as suggested but get the same error! Fatal error: Uncaught Error: Call to undefined method FPDF::FPDF() in /homepages/30/d593365489/htdocs/Prnpdf.php:78 Stack trace: #0 /homepages/30/d593365489/htdocs/Prnpdf.php(108): PDF->__construct('L', 'mm', 'A4') #1 {main} thrown in /homepages/30/d593365489/htdocs/Prnpdf.php on line 78 Also tried amending this line: $pdf = new PDF($ort,'mm','A4'); to: $pdf = new __construct($ort,'mm','A4');, but that did not work and gave this error: Fatal error: Uncaught Error: Class '__construct' not found in /homepages/30/d593365489/htdocs/Prnp
  3. I have used this program for many years without problems. My ISP urged me to upgrade PHP to 7.2 and it was working OK. Just went to use it and I get an error when parsing my FPDF file. Here is the error: Connected (added this to check if connected) Fatal error: Uncaught Error: Call to undefined method PDF::FPDF() in /homepages/30/d593365489/htdocs/Prnpdf.php:78 Stack trace: #0 /homepages/30/d593365489/htdocs/Prnpdf.php(108): PDF->PDF('L', 'mm', 'A4') #1 {main} thrown in /homepages/30/d593365489/htdocs/Prnpdf.php on line 78 I have not altered the file in any way, so why is thi
  4. I am designing a form where the users input information to be stored on a database. All of the other inputs apart from the email post OK, but the email does not! The error is: Notice: Undefined index: email in /home/hp3-linc4-nfs2-y/555/1099555/user/htdocs/includes/renew1.php on line 19 Consequently the mysqli query does not succeed. Here is the section of code in the html file: <h1>Online Renewal Form</h1> <form action="includes/renew1.php" method="post"> <fieldset> <p><label for= "firstname"><b>Enter Firstname:</b></label&
  5. What do you mean by a prepared query? I am not putting user input directly into the query, otherwise I would have put the ($_POST['Value']) into the query! Am I not understanding why that no rows are produced with msqli_num_rows()? I am still somewhat 'green', probably due to my age!
  6. I know this question has been asked many times before, and I have looked at many of the answers, but i just can't see whats wrong. I have got it to print $r and that equals 1, so should print the message "Your renewal form has been received and added to the database", but it prints the other message? Never the less the INSERT is updating the database, so why is it not printing the correct echo. I've tried FALSE instead of <1. I also had it the other way around (correct message first), but I still get the same result. Please help! Here is the code: <?php require_once ('config.in
  7. I am trying to make my site more secure by staring a session at login which uses the user_id to identify a user. I had a previous post which was to change password, which I eventually found was due to not putting ob_start before the session start. Using this method I tried adding the same to another file, so that an intruder can't circumvent the login procedure. When I run this file all I get is a blank screen, no errors are shown. I added to show errors: ini_set('display_errors',1); error_reporting(E_ALL); Here is the script that is not working: <?php # MFC1066 - Club_Info.php
  8. I take it back! The SESSION is still not being recognized! I am at my wits end trying to solve this problem. Please can anyone help?
  9. I eventually found that ob_start should go BEFORE Session_start, so it now recognizes the session. However, I now have another problem! The query is not working on line 436 of change_password.php. All I get is the echo of the array when the line is like so: $q = "UPDATE users SET pass=SHA1('$p') WHERE user_id={$_SESSION=$_POST['user_id']"; I tried changing it but keep getting errors. I tried this: $q = "UPDATE users SET pass=SHA1('$p') WHERE user_id={$_SESSION['loggedin']::'user_id'}"; As this field is not one that has been posted, how do you retrieve it from the record?
  10. Having some more thoughts on this! Do I need the line: $_SESSION = mysqli_fetch_array ($r, MYSQLI_ASSOC); Does this capture all of the data in the SELECT query? So if I then have the line: $_SESSION['loggedin']='user_id'; Should this not pass the user_id as a named session, so when I try to use it in the change_password script it will identify the user? Is my thinking correct or am I totally wrong?
  11. Just realized why it returns to home page! Its due to this line: if (!isset($_SESSION['loggedin'])) { $url = BASE_URL . 'index.php'; // Define the URL. ob_end_clean(); // Delete the buffer. header("Location: $url"); exit(); // Quit the script. } So I guess it is not recognizing the session. Should I have the session start on this script?
  12. Firstly, I was at first trying to use the email address as the session data to use throughout the session, but soon realized tat was not a good idea. So my scripts were not totally changed. Here are the changes I have made. Login script: // Register the values & redirect: //$_SESSION = mysqli_fetch_array ($r, MYSQLI_ASSOC); $_SESSION['loggedin']=$_POST['user_id']; As you can see I have only commented out the superfluous line for now. Now to the Change_password script: $q = "UPDATE users SET pass=SHA1('$p') WHERE user_id={$_SESSION['loggedin']::$_POST['user_id']}";
  13. I am having difficulty finding out what is wrong with these scripts. When a user logs on a session is started in the logon script: Login.php: <?php # - login.php // This is the login page for the site. session_start(); require_once ('includes/config.inc.php'); $page_title = 'Login'; include ('includes/header1.html'); if (isset($_POST['submitted'])) { require_once('includes/Connect_login.php'); // Validate the email address: if (!empty($_POST['email'])) { $e = mysqli_real_escape_string ($dbc, $_POST['email']); } else { $e = FALSE; echo '<p class="error">You forgot
  14. I am trying to write some code based on the scripts in Larry Ulmans Book PHP6 & MYSQL 5. When I run the script I get the following error: The config.inc.php is shown below: <?php # config.inc.php /* This script: * - define constants and settings * - dictates how errors are handled * - defines useful functions */ // Document who created this site, when, why, etc. // ********************************** // // ************ SETTINGS ************ // // Flag variable for site status: define('LIVE', FALSE); // Admin contact address: define('EMAIL', 't.e.hudson@btinternet.com');
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.