can you point me in a better direction? every time i get something to output through the $errmsg it ends up in the top of the xhtml-code and thats about the last place it should be in.
////first part of the file////
<?php
session_start();
$username = "username";
$errmsg = "";
if (isset($_POST["user"]) && isset($_POST["pass"]))
{
require_once("code/account.php");
$username = $_POST["user"];
$password = $_POST["pass"];
$db = new account();
$db->login($username, $password);
$errmsg = $db->errormessage;
}
?>
////part where the errmsg is supposed to be printed////
<div id="owncal">
<?=$errmsg?>
</div>
//// or ////
<div id="owncal">
<?
print $errmsg;
?>
</div>
////first part of the file////
<?php
session_start();
$username = "username";
$errmsg = "";
if (isset($_POST["user"]) && isset($_POST["pass"]))
{
require_once("code/account.php");
$username = $_POST["user"];
$password = $_POST["pass"];
$db = new account();
$db->login($username, $password);
$errmsg = $db->errormessage;
}
?>
////part where the errmsg is supposed to be printed////
<div id="owncal">
<?=$errmsg?>
</div>
//// or ////
<div id="owncal">
<?
print $errmsg;
?>
</div>
-
Re: problem: generated output ends up in wrong place
Tue, November 27, 2007 - 4:19 AMAre you sure the error you get is from $db->errormessage?
I guess you get a real php-error, that doesn't get stored in the variable but
goes directly to err-out.
What does the error-message say? -
-
Re: problem: generated output ends up in wrong place
Tue, November 27, 2007 - 4:23 AMwhat is printed is what i have told it to write. one example:
Användare med användarnamn "errr" er funnen -
-
Re: problem: generated output ends up in wrong place
Tue, November 27, 2007 - 4:31 AMIt would help to see your db-class. -
-
Re: problem: generated output ends up in wrong place
Tue, November 27, 2007 - 4:33 AMheh, no need. it got sorted out. was just some spellingproblems
thanks anyway :)
-
-
-