here's another weird thing I'm trying to do. I want to run stored procedure on the underlying database using a link or button on a FT page. The aim is to change some existing submission data through this action. I've created a new php page and linked to it from a FT page (page module). I get this error:
Error occurred:SQLSTATE[HY000] [2005] Unknown MySQL server host 'localhost ' (95)
It's seems the call for the hostname returns localhost and the procedure call doesn't get through. Here's my code, the requires and parameter calls are from existing FT pages and they are OK. The echoes show the right info but hostname is localhost which doesn't seem to get through in the PDO.
Hi Ben,
here's another weird thing I'm trying to do. I want to run stored procedure on the underlying database using a link or button on a FT page. The aim is to change some existing submission data through this action. I've created a new php page and linked to it from a FT page (page module). I get this error: Error occurred:SQLSTATE[HY000] [2005] Unknown MySQL server host 'localhost ' (95)
It's seems the call for the hostname returns localhost and the procedure call doesn't get through. Here's my code, the requires and parameter calls are from existing FT pages and they are OK. The echoes show the right info but hostname is localhost which doesn't seem to get through in the PDO.
' <?php
require("../../global/session_start.php"); require_once ("../../global/config.php");
ft_check_permission("client");
$request = array_merge($_POST, $_GET); $account_id = $_SESSION["ft"]["account"]["account_id"];
/ echo $account_id; echo $g_db_hostname ; echo $g_db_name; echo $g_db_username; echo $g_db_password; /
} catch (PDOException $e) { die("Error occurred:" . $e->getMessage()); } return null;
Help MUCH appreciated!
Thanks, M