Ask a Question related to PHP Development, Design and Development.
-
Paweł #1
Why do I get zero sized reply???
Why after running the following script do I get zero sized reply??
It seems to hang when I access the $link_id (when comparing it, negating,
reading and so on) but it isn't an expected behaviour. Any clues??
Thanks,
Pawel Galecki
<?php
//db_connect.php
include "common_db.inc";
error_reporting(0);
$link_id = db_connect();
if(!$link_id) die(sql_error());
else echo "Successfully made a connection to $dbhost.<BR>";
?>
<?php
//common_db.inc
$dbhost = 'localhost';
$dbusername = 'phpuser';
$dbuserpassword = 'phppass';
$default_dbname = 'mysql';
$MYSQL_ERRNO = '';
$MYSQL_ERROR = '';
function db_connect() {
global $dbhost, $dbusername, $dbuserpassword, $default_dbname;
global $MYSQL_ERRNO, $MYSQL_ERROR;
$link_id = mysql_connect($dbhost, $dbusername, $dbuserpassword);
if(!$link_id) {
$MYSQL_ERRNO = 0;
$MYSQL_ERROR = "Connection failed to the host $dbhost.";
return 0;
}
else if(empty($dbname) && !mysql_select_db($default_dbname)) {
$MYSQL_ERRNO = mysql_errno();
$MYSQL_ERROR = mysql_error();
return 0;
}
else return $link_id;
}
function sql_error() {
global $MYSQL_ERRNO, $MYSQL_ERROR;
if(empty($MYSQL_ERROR)) {
$MYSQL_ERRNO = mysql_errno();
$MYSQL_ERROR = mysql_error();
}
return "$MYSQL_ERRNO: $MYSQL_ERROR";
}
?>
Paweł Guest
-
openint an auo-sized window
Hello, How can I open an auto-sized html window (smaller window, not filling the entire screen) with Dreamweaver mx? If I want to do it for an... -
Sized window...
Anybody know of a Dreamweaver MX extension that allows me to size a window. What I want to do is have thumbnail version of an image (a smaller... -
Sized windows with JPEGs
Hi Erik, The JustSo picture window extension may just be the thing for you - check it out here..... ... -
Text disappears when sized over 14
Sometimes the text in a text box cannot be seen (on stage) when the font is sized 14 or over. I know the text is still there as when I click on... -
Error:Zero Sized Reply
Hi I have Oracle 8.1.6 database IAS .When I try to login trough the portal I get the following error: Zero Sized Reply.Is anybody know what could...



Reply With Quote

