Happy New Years, Slade !
Now, if you look at that output, it has no posted data. Your page gets to the “GOT HERE” part, but, just
before it, it displays the data in the $_POST’d form. It shows nothing.
Okay, I am confused! What are you trying to do? Are you joking? Okay, first, I will edit out your username
and password. You do not want to post that.
Next, you kill the page before it gets to your connection, so it will never get there.
Lastly, your connection code has the wrong set up. I do not even know where that came from…
Here is an edited version…
[php]
Untitled Document
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
/*** mysql hostname ***/
$hostname = 'www.greenthumb.com';
/*** mysql username ***/
$username = 'zzzz';
/*** mysql password ***/
$password = 'zzzz';
try {
$dbh = new PDO("mysql:host=$hostname; dbname="order0001", $username, $password);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$dbh->setAttribute(PDO::ERRMODE_EXCEPTION);
// echo a message saying we have connected
echo 'Connected to database
';
} catch(PDOException $e) {
echo "An Error Occurred. The Error Is Being Processed!"; //user friendly message
some_logging_function($ex->getMessage());
}
?>
SOME TEXT OR HTML ON PAGE
[/php]
This is just loosely done. It is not tested. You have to put in your username, password and place the
name of the table you are using into the new-PDO line... (You have "order0001", but, that sounds odd.)