Quote:
Originally Posted by sarettah
Sorry about that. I didn't do a full test and that kind of shit happens when you meld 2 different sets of code together.
In this case, I grabbed my dbcreds file from my local machine and my hookup routine from a different place.
But that is what debugging is for, ya know?
I really didn't think you were just going to switch out to the new code I posted, I was just trying to get to a code set that made sense to me.
.
|
Lol, it's always those small things that mess things up. I once wasted an entire day because I had a white space in the $dbpass = "pass ";

By the way, I think you can even shorten this:
$id=0;
if ( ! isset($_GET['id'] ) )
{
header('Location: index.php');
}
else
{
$id=intval($_GET['id']);
}
if($id==0)
{
die('bad id passed in');
}
Into:
$id=intval($_GET['id']);
if($id==0)
{
header( "Location: index.php" ); //or any other page like 404
exit;
}
As intval will also output 0 if $id is empty.