zushiba
02-09-2011, 07:58 PM
I'm working on a widgit to display some form information from a database. Problem is, it seems if I get too complicated it breaks the cms in some manner and I end up with a full page return of the string value.
ob_start();
if(isset($_GET['formid'])){
echo "Check form ID vs user ID to make sure that user has access to that forms contents then display";
echo "<br />\n";
$formidvalue = intval($_GET['formid']);
echo $formidvalue;
}else{
echo "Select 'view' from the above listed form results to view that form.";
}
$output .= ob_get_contents();
ob_end_clean();returns a full page of nothing but "Check form ID vs user ID to make sure that user has access to that forms contents then display";"
However
ob_start();
if(isset($_GET['formid'])){
echo "Check form ID vs user ID to make sure that user has access to that forms contents then display";
}else{
echo "Select 'view' from the above listed form results to view that form.";
}
$output .= ob_get_contents();
ob_end_clean();outputs either "Check form ID vs user ID to make sure that user has access to that forms contents then display" or "Select 'view' from the above listed form results to view that form." in the widgit just fine.
Why is such a little change to the code causing such drastically different results?
ob_start();
if(isset($_GET['formid'])){
echo "Check form ID vs user ID to make sure that user has access to that forms contents then display";
echo "<br />\n";
$formidvalue = intval($_GET['formid']);
echo $formidvalue;
}else{
echo "Select 'view' from the above listed form results to view that form.";
}
$output .= ob_get_contents();
ob_end_clean();returns a full page of nothing but "Check form ID vs user ID to make sure that user has access to that forms contents then display";"
However
ob_start();
if(isset($_GET['formid'])){
echo "Check form ID vs user ID to make sure that user has access to that forms contents then display";
}else{
echo "Select 'view' from the above listed form results to view that form.";
}
$output .= ob_get_contents();
ob_end_clean();outputs either "Check form ID vs user ID to make sure that user has access to that forms contents then display" or "Select 'view' from the above listed form results to view that form." in the widgit just fine.
Why is such a little change to the code causing such drastically different results?