Jump to content
Larry Ullman's Book Forums

Rache

Members
  • Posts

    29
  • Joined

  • Last visited

Posts posted by Rache

  1. I have read XHTML/HTML/CSS 8 books-in-one from the For Dummies, as well as PHP & MySQL from the For Dummies, i also have the libraries (from what i have seen) only book from Larry Ullman "PHP and MySQL For Dynamic Web Sites - Second Edition". Even the main library doesnt have a lot of Computer books. But yes i am trying to build a Classifieds website (like craigslist or backpage or eclassifieds) for a source of income, I need to get it up and running Before it gets colder. Living in a house that is usually ten degrees colder than the outside is not an easy task, and we are running out of gasoline money. I also have a few other books, 2 of which are php in a nutshell, and php phrase guidebook or something, and the last two are just for dummies books talking about how to make your own website. But i have tried a library "loan book"? she said it was where they check all the libraries in this country and loan it out to a certain library for a certain customer. BUT she said that i had to be customer of their county in order to do that, and since im not.....well there goes that idea. Is there a way to read the book online? instead of just getting the codes?

  2. Since I can't afford the book right now (4th edition) , is it possible to use the "Forum" codes like a classifieds form? For example: There is a "Posting Form", someone fills it out (including pics), then they can preview it, then "Submit" or "Launch" it, then see it within a "Post List"? And is it possible to see some of these lists from a week to a month prior to the current date?

  3. When i was testing out the "Forgot Password" part, after i entered the email, i got an error message saying, "An error occurred in script 'C:\xampp\htdocs\forgot_password.php' on line 44: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()". I don't know what to do to fix this problem. I need to know what it means and how to fix it.

  4. AHA! SUCCESS! lol ty so much for the help on that problem. oh and btw, one thing i have noticed in a lot of PHP/MySQL books is that they don't really mention at least not use the example needed directly to get it to where if the website is a "Classifieds" website, how do i make it possible to allow people to fill in the Posting Form, add photos if needed, preview it and then see it on a post listing page?

  5. ok ty for that. the error now reads "An error occurred in script 'C:\xampp\htdocs\register.php' on line 70: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()" and i have no idea what those files are, let alone where they are. i have heard of them before but never could understand them, in what they do, or how to make them(if they aren't made already).

  6. ok after checking it, there was a couple of errors that i saw, one was the 'pass', in the db it was set as 'password' and i changed that, then it said "MySQL Error: Unknown column 'active' in 'field list'" now i dont have the book here in my hands (the library didnt have it there) so i dont know how the database is supposed to look. that may be another problem. how is the database supposed to look like? the table columns

  7. <?php # Script 16.3 - 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', 'InsertRealAddressHere');

    // Site URL (base for all redirections):

    define ('BASE_URL', 'http://www.example.com/');

    // Location of the MySQL connection script:

    define ('MYSQL', '/path/to/mysqli_connect.php');

    // Adjust the time zone for PHP 5.1 and greater:

    date_default_timezone_set ('US/Eastern');

    // ************ SETTINGS ************ //

    // ********************************** //

     

    // ****************************************** //

    // ************ ERROR MANAGEMENT ************ //

    // Create the error handler:

    function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {

    // Build the error message.

    $message = "<p>An error occurred in script '$e_file' on line $e_line: $e_message\n<br />";

     

    // Add the date and time:

    $message .= "Date/Time: " . date('n-j-Y H:i:s') . "\n<br />";

     

    // Append $e_vars to the $message:

    $message .= "<pre>" . print_r ($e_vars, 1) . "</pre>\n</p>";

     

    if (!LIVE) { // Development (print the error).

     

    echo '<div class="error">' . $message . '</div><br />';

     

    } else { // Don't show the error:

     

    // Send an email to the admin:

    mail(EMAIL, 'Site Error!', $message, 'From: email@example.com');

     

    // Only print an error message if the error isn't a notice:

    if ($e_number != E_NOTICE) {

    echo '<div class="error">A system error occurred. We apologize for the inconvenience.</div><br />';

    }

    } // End of !LIVE IF.

    } // End of my_error_handler() definition.

    // Use my error handler.

    set_error_handler ('my_error_handler');

    // ************ ERROR MANAGEMENT ************ //

    // ****************************************** //

    ?>

×
×
  • Create New...