
February 22nd, 2013, 03:51 PM
|
|
Contributing User
|
|
Join Date: Jun 2009
Posts: 297
  
Time spent in forums: 3 Days 8 h 45 m 39 sec
Reputation Power: 5
|
|
|
Issue w/ my Prepared Statement?
I run the query string manually and receive exactly what I intent to, but when I echo any of the to-be-set variables here, like at the end, $name shows up blank. Any ideas?
PHP Code:
if($_GET['action'] == "edit" || $_GET['action'] == "view") {
$statement = $link->prepare("SELECT `FLName`,`Position`,`Number`,`Type`,`E-mail`,`Note` FROM `rolodex` WHERE `CustomerID` = ?");
$statement->bind_param('i', $_GET['id']);
$statement->execute();
$statement->bind_result($name,$position,$number,$type,$email,$note);
$statement->close();
$companyID = $_GET['id'];
echo "Name: " . $name . "GET ID: " . $_GET['id'];
}
I receive Name: GET ID: 90
I even replaced ? with 90 to comment out the bind_param line with no luck.
Last edited by Triple_Nothing : February 22nd, 2013 at 04:01 PM.
|