Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return statement

Status
Not open for further replies.

Fayeby

Programmer
Sep 16, 2002
7
CH
I have been told that I can use a return statement to return to page from and if statement. But i just keep getting premature end of script headers.

Can anyone offer a solution as I only need the if part of the statement and then I want to get out of it.

Cheers Faye

if ($DBI::err) {
$TABLE_OUTPUT .= &quot;<table border=\&quot;10\&quot; height=\&quot;34\&quot;>\n&quot;;

$TABLE_OUTPUT .= &quot;<TR>\n&quot;;
$TABLE_OUTPUT .= &quot;<TD> ERROR - Unable to create Environment</td>\n&quot;;
$TABLE_OUTPUT .= &quot;</TR>\n&quot;;
$TABLE_OUTPUT .= &quot;</table>\n&quot;;

}
else

{
return ????????????????????????????????????????????????;
}
 
is your script outputting the Content-Type headers before this?

try to add this before the if ($DBI::err) and see if it works then:
Code:
print &quot;Content-Type: text/html; charset=ISO-8859-1\n\n&quot;;

if ($DBI::err) {
...
---
cheers!
san.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top