I'm struggling to understand why I'm getting an undefined function error, especially since the code has worked well on another server. (The only difference I can see in the code is the name of the connection file- one is dbConnect.php, this one connAdmin.php)
This is the error I'm getting:
Fatal error: Call to undefined function connAdmin() in ...event_insert.php on line 17
Any suggestions or advice would be greatly appreciated.
Below is code.
From event_list.php:
<?php
error_reporting(E_ALL);
ini_set('display_errors', true); ?>
<?php //so I could see why page won't load
include('Connections/connAdmin.php');
[B]$conn = connAdmin('query');[/B] //line 17
$sql = 'SELECT event_id, event_title, DATE_FORMAT(created, "%c-%e-%Y") AS created FROM events ORDER BY created DESC';
$result = mysql_query($sql) or die(mysql_error());
?>
This is the connection file connAdmin.php:
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_connAdmin = "dbmy6int.dotsterhost.com";
$database_connAdmin = "";
$username_connAdmin = "";
$password_connAdmin = "";
$connAdmin = mysql_pconnect($hostname_connAdmin, $username_connAdmin, $password_connAdmin) or trigger_error(mysql_error(),E_USER_ERROR);
?>
(I've obviously taken out the connection info.)
Kind & generous thanks in advance.
Best regards,
Jon