Hi,
many thanks for all the replies.
The page used to work when I had the function as part of the main page, but when I placed it in an external file - that's when the error occured.
What I have tried to do to investigate further is start a session, as we know - this must be done first before any output. So putting
session_start()
before the include which causes the problem.
this produces the following error
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at E:\es_gallery\includes\functions.php:47) in E:\es_gallery\uploadimage.php on line 4
so, the error mus be in that file \functions.php but I can't see any output from the following code?
the first line is line 47, where the error is......
<?php
function getGalleryID($gallery){
global $database_gall_db_con ;
global $gall_db_con ;
mysql_select_db($database_gall_db_con, $gall_db_con);
$query_show_gallery_th = sprintf("SELECT id from es_gallery WHERE gallery='%s' ", $gallery);
$show_gallery_th = mysql_query($query_show_gallery_th, $gall_db_con) or die(mysql_error());
$row_show_gallery_th = mysql_fetch_assoc($show_gallery_th);
$totalRows_show_gallery_th = mysql_num_rows($show_gallery_th);
$id = $row_show_gallery_th['id'] ;
return $id ;
}
?>
I have attatched the functions.php as a txt file...........