simflex Posted October 13, 2010 Share Posted October 13, 2010 hello team, can you please look at this code snippet and tell me why it is showing the following data this way? <?php # jeff Exp $ include("app.php"); $page->set("title", "Business & Commerical"); $what = $page->getvar("what"); $type = $page->getvar("type"); $dt = new xDataTable('width="500"'); $form = new Form(); if($what == "submit") $html->set("readonly", true); $dt->header($_types{$type} . " Quote"); $form->get_contact_form(true); When I run it, it shows like this: set("title", "Business & Commerical"); $what = $page->getvar("what"); $type = $page->getvar("type"); $dt = new xDataTable('width="500"'); $form = new Form(); if($what == "submit") $html->set("readonly", true); $dt->header($_types{$type} . " Quote"); $form->get_contact_form(true); switch ($type) { case "comp": $dt->left("Business Type:"); $dt->cell($html->select("business_type", $_business_type, 1, "", $page->getvar("business_type"), "(select)")); $dt->left("Federal Tax ID:"); $dt->cell($html->textfield("tax_id", $page->getvar("tax_id"), 12)); $dt->left("If Individual, Owner SSN#:"); $dt->cell($html->textfield("ssn", $page->getvar("ssn"), 12)); $dt->cell("Spouse SSN#:"); $dt->cell($html->textfield("spouse_ssn", $page->getvar("spouse_ssn"), 12)); just a small sample. What am I doing wrong? Thanks alot in advance Quote Link to comment https://forums.phpfreaks.com/topic/215812-code-not-showing-anything/ Share on other sites More sharing options...
AbraCadaver Posted October 13, 2010 Share Posted October 13, 2010 app.php doesn't happen to start with <? instead of <?php does it? Quote Link to comment https://forums.phpfreaks.com/topic/215812-code-not-showing-anything/#findComment-1121915 Share on other sites More sharing options...
simflex Posted October 13, 2010 Author Share Posted October 13, 2010 hi Shawn, Yes, it does: <?php #=============================================================================== ... ... Quote Link to comment https://forums.phpfreaks.com/topic/215812-code-not-showing-anything/#findComment-1121918 Share on other sites More sharing options...
AbraCadaver Posted October 13, 2010 Share Posted October 13, 2010 The only thing I can think of is that 1. your file doesn't end in .php or 2. that PHP hasn't been installed properly. Does this work? <?php // test.php phpinfo(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/215812-code-not-showing-anything/#findComment-1121919 Share on other sites More sharing options...
kenrbnsn Posted October 13, 2010 Share Posted October 13, 2010 How are you invoking the script? Ken Quote Link to comment https://forums.phpfreaks.com/topic/215812-code-not-showing-anything/#findComment-1121922 Share on other sites More sharing options...
simflex Posted October 13, 2010 Author Share Posted October 13, 2010 Shawn, yes this ->How are you invoking the script? works. Ken, I fire up a browser and type localhost/filename.php Quote Link to comment https://forums.phpfreaks.com/topic/215812-code-not-showing-anything/#findComment-1121925 Share on other sites More sharing options...
Psycho Posted October 13, 2010 Share Posted October 13, 2010 I'm betting the problem is in the file app.php. Try commenting out that include. What is in that file? Quote Link to comment https://forums.phpfreaks.com/topic/215812-code-not-showing-anything/#findComment-1121929 Share on other sites More sharing options...
simflex Posted October 13, 2010 Author Share Posted October 13, 2010 just a bunch of classes and some additional include files <?php #------------------------------------------------------------------------------- # # Include all relevant files. include_once("config.php"); include_once("tools.php"); include_once("logtools.php"); include_once("htmltools.php"); include_once("nettools.php"); #=============================================================================== # # Application class # # An object used to represent the application itself, and provide functionality # specific to the application. # #=============================================================================== class Application extends Object { #----------------------------------------------------------------------------- # # Constructor. # # Argument : none. # Returns : nothing. # #----------------------------------------------------------------------------- function Application() { } } # class Application. #------------------------------------------------------------------------------- This is not all of it, just snip Quote Link to comment https://forums.phpfreaks.com/topic/215812-code-not-showing-anything/#findComment-1121930 Share on other sites More sharing options...
AbraCadaver Posted October 13, 2010 Share Posted October 13, 2010 Seems suspicious that the code output starts with set() that follows -> which would normally close an HTML comment Quote Link to comment https://forums.phpfreaks.com/topic/215812-code-not-showing-anything/#findComment-1121932 Share on other sites More sharing options...
Pikachu2000 Posted October 14, 2010 Share Posted October 14, 2010 Exactly what I was thinking. Look at the html source and I'll bet you find a missing > somewhere, or some such typo causing your problem. Quote Link to comment https://forums.phpfreaks.com/topic/215812-code-not-showing-anything/#findComment-1122035 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.