[FX.php List] Bad HTML being generated from FX (Still)

DC dan.cynosure at dbmscan.com
Wed Oct 1 09:20:06 MDT 2008


you might try adding double quotes around your HTML form tag attributes.

probably not it, but it's worth a try.

dan

John Funk wrote:
> This is the same unresolved problem I had before. My FX query is 
> generating some bad HTML that Internet Explorer cannot parse. All other 
> browsers will.
> 
> Below is the resulting html source. In RED is the HTML that if I delete 
> from a test.html page, the form will process OK
> 
> The page before is editing some company info, so I am guesing this is 
> the result of that.
> 
> In  Blue below is the PHP that generated this html.
> 
> How do I get rid if this HTML?
> 
> John
> 
>  
> 
> <head>
> 
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> 
> <title>Edit Company</title>
> 
> </head>
> 
> <body>
> 
> <input type ='hidden' value='123' name='CompanyID'
> 
> <input type ='hidden' value='3691' name='CompRecID'
> 
> <input type ='hidden' value='CS' name='Company'
> 
> <input type ='hidden' value='John Funk' name='Name'
> 
> <input type ='hidden' value='b' name='Company3'
> 
> <input type ='hidden' value='' name='Address'
> 
> <input type ='hidden' value='' name='PHArea'
> 
> <input type ='hidden' value='' name='PHPrefix'
> 
> <input type ='hidden' value='' name='PHNumber'
> 
> <input type ='hidden' value='' name='City'
> 
> <input type ='hidden' value='' name='FXArea'
> 
> <input type ='hidden' value='' name='FXPrefix'
> 
> <input type ='hidden' value='' name='FXNumber'
> 
> <input type ='hidden' value='' name='State'
> 
> <input type ='hidden' value='' name='StateOther'
> 
> <input type ='hidden' value='' name='Email'
> 
> <input type ='hidden' value='' name='Zip'
> 
> <input type ='hidden' value='' name='WebSite'
> 
> <input type ='hidden' value='' name='Country'
> 
> <input type ='hidden' value='' name='CompType'
> 
> <input type ='hidden' value='testtestststststst' name='Description'
> 
> <input type ='hidden' value='' name='CompType2'
> 
> <input type ='hidden' value='N' name='LearnMoreBold'
> 
> <input type ='hidden' value='N' name='LearnMoreLogo'
> 
> <input type ='hidden' value='123' name='CompID'
> 
> <input type ='hidden' value='b' name='Pass'
> 
> <input type ='hidden' value='2190909' name='RecID'
> 
> <input type ='hidden' value='Marina Product' name='PickSection'
> 
> <input type ='hidden' value='Submit Query' name='Submit'
> 
> <input type ='hidden' 
> value='193408062.626235810904953700.1219159482.1219159482.1219179690.2' 
> name='__utma'
> 
> <input type ='hidden' 
> value='193408062.1219159482.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=boating 
> industry buyers guide' name='__utmz'
> 
>  
> 
> <form action='editSelections.php' method='post'>
> 
> <p><img src="images/BI_Logo_w_tagline.jpg" alt="BoatingIndustry" 
> width="167" height="66" /><span class="Title">Selections</span> </p><hr>
> 
>   <br><span class="Title">Buyer's Guide Product Listings for 
> <strong>CS    </strong><br></span><span class="Title"><strong>Marina 
> Product</strong>
> 
>     section</span>
> 
>   <p></p>
> 
>   <p>
> 
>   <input name="CompID" type="hidden" value="123">
> 
>   <input name="Pass" type="hidden" value="b">
> 
>   <input name="BGSection" type="hidden" value="Marina Product">
> 
>   <input type=hidden name=recID_1 value=2190902>
> 
> <input type=hidden name=Year_1 value=''>
> 
> <input name=Year_1 type=checkbox value=08 checked />Benches, dock<br>
> 
> <input type=hidden name=recID_2 value=2190903>
> 
> <input type=hidden name=Year_2 value=''>
> 
> <input name=Year_2 type=checkbox value=08 checked />Brackets, dock & 
> pier<br>
> 
> <input type=hidden name=recID_3 value=2190904>
> 
> <input type=hidden name=Year_3 value=''>
> 
> <input name=Year_3 type=checkbox value=08 checked />Bumpers, dock & pier<br>
> 
> <input type=hidden name=recID_4 value=2190905>
> 
> <input type=hidden name=Year_4 value=''>
> 
> <input name=Year_4 type=checkbox value=08 unchecked />Buoys, marker and 
> lighted<br>
> 
> <input type=hidden name=recID_5 value=2190906>
> 
> <input type=hidden name=Year_5 value=''>
> 
> <input name=Year_5 type=checkbox value=08 unchecked />Buoys, mooring & 
> pick up<br>
> 
> <input type=hidden name=recID_6 value=2190907>
> 
> <input type=hidden name=Year_6 value=''>
> 
> <input name=Year_6 type=checkbox value=08 unchecked />Computer software, 
> marina management<br>
> 
> <input type=hidden name=recID_7 value=2190908>
> 
> <input type=hidden name=Year_7 value=''>
> 
> <input name=Year_7 type=checkbox value=08 unchecked />Dock 
> accessories/padding, wheels<br>
> 
> <input type=hidden name=recID_8 value=2190909>
> 
> <input type=hidden name=Year_8 value=''>
> 
> <input name=Year_8 type=checkbox value=08 checked />Dock lines<br>
> 
> <input type=hidden name=recordCount  value=26>
> 
>             <br />
> 
>             <input name="Submit" type="submit" />
> 
>  
> 
> </form>
> 
>  
> 
> </body>
> 
> </html>
> 
>  
> 
> PHP CODE:
> 
> <head>
> 
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> 
> <title>Edit Company</title>
> 
> </head>
> 
> <body>
> 
> <?php
> 
> require_once ('FX/FX.php');
> 
> require_once ('server.php');
> 
> require_once ('includes.php'); // some dev utilities not used in production
> 
> //define('DEBUG', True);  //debugging
> 
> //display_post_get(); //debugging
> 
>  
> 
> $CompID=$_REQUEST['CompID'];
> 
> $Pass=$_REQUEST['Pass'];
> 
> $Company=$_REQUEST['Company'];
> 
> $CompRecID = $_REQUEST['CompRecID'];
> 
> $PickSection = $_REQUEST['PickSection'];
> 
>  
> 
> if ($PickSection=="SelectAll") {
> 
> $webUpdate="08 Web-Update Same";
> 
> } else {
> 
> $webUpdate="08 Web-Update";
> 
> }
> 
>  
> 
> $groupSize='1';
> 
>  
> 
> //save the company data first
> 
> $request = new FX($ServerIP, $port, 'FMPro7');
> 
> $request->SetDBData($db, 'web_comp',$groupSize);
> 
> $request->SetDBUserPass($fmAccount, $fmPass);
> 
> $request->AddDBParam('-recid', $CompRecID);
> 
> $request->AddDBParam('EDITSTATUS', $webUpdate);
> 
> $request->AddDBParam('COMPANY', $_REQUEST['Company']);
> 
> $request->AddDBParam('NAME', $_REQUEST['Name']);
> 
> $request->AddDBParam('ADDRESS', $_REQUEST['Address']);
> 
> $request->AddDBParam('CITY', $_REQUEST['City']);
> 
> $request->AddDBParam('STATE', $_REQUEST['State']);
> 
> $request->AddDBParam('StateOther', $_REQUEST['StateOther']);
> 
> $request->AddDBParam('ZIP', $_REQUEST['Zip']);
> 
> $request->AddDBParam('COUNTRY', $_REQUEST['Country']);
> 
> $request->AddDBParam('PHArea', $_REQUEST['PHArea']);
> 
> $request->AddDBParam('PHPrefix', $_REQUEST['PHPrefix']);
> 
> $request->AddDBParam('PHNumber', $_REQUEST['PHNumber']);
> 
> $request->AddDBParam('FXArea', $_REQUEST['FXArea']);
> 
> $request->AddDBParam('FXPrefix', $_REQUEST['FXPrefix']);
> 
> $request->AddDBParam('FXNumber', $_REQUEST['FXNumber']);
> 
> $request->AddDBParam('EMAIL', $_REQUEST['Email']);
> 
> $request->AddDBParam('DESCRIPTION', $_REQUEST['Description']);
> 
> $request->AddDBParam('CompType', $_REQUEST['CompType']);
> 
> $request->AddDBParam('CompType2', $_REQUEST['CompType2']);
> 
> $request->AddDBParam('LEARNMOREBOLD', $_REQUEST['LearnMoreBold'] );
> 
> $request->AddDBParam('LEARNMORELOGO', $_REQUEST['LearnMoreLogo']);
> 
> $request->AddDBParam('WEBSITE', $_REQUEST['WebSite']);
> 
> $request->AddDBParam('WebBrowserUsed', $_SERVER['HTTP_USER_AGENT']);
> 
> if ($PickSection=="SelectAll") {
> 
> $request -> AddDBParam('-script', "Pick_All_of_Last_Year_Selections"); 
> // run the FM script
> 
> }
> 
> $result = $request->FMEdit();
> 
>  
> 
>  
> 
> if ($PickSection=="Done"||$PickSection=="SelectAll")
> 
> {?>
> 
> <link href="caterory.css" rel="stylesheet" type="text/css" />
> 
> <p><img src="images/BI_Logo_w_tagline.jpg" alt="BoatingIndustry" 
> width="167" height="66" /><span class="Title">Thank
> 
>   You</span> </p>
> 
> <?php
> 
>   //exit program normally
> 
> exit;
> 
> }
> 
> else
> 
> {
> 
>  
> 
> // show categories of section selected
> 
> $groupSize='1070';
> 
> $request = new FX($ServerIP, $port, 'FMPro7');
> 
> $request->SetDBData($db, 'web_comp_cat',$groupSize);
> 
> $request->SetDBUserPass($fmAccount, $fmPass);
> 
> $request->AddDBParam('CompanyID', $CompID);
> 
> $request->AddDBParam('Categories::BGSection', "==".$PickSection);
> 
> $request->AddSortParam('Categories::SortOrder');
> 
> $result = $request->FMFind();
> 
> $records = $result['data'];
> 
>  
> 
> ?>
> 
>  
> 
> <form action='editSelections.php' method='post'>
> 
> <p><img src="images/BI_Logo_w_tagline.jpg" alt="BoatingIndustry" 
> width="167" height="66" /><span class="Title">Selections</span> </p><hr>
> 
>   <br><span class="Title">Buyer's Guide Product Listings for 
> <strong><?php echo $Company; ?>
> 
>     </strong><br></span><span class="Title"><strong><?php echo 
> $PickSection; ?></strong>
> 
>     section</span>
> 
>  
> 
>   <p></p>
> 
>   <p>
> 
>   <input name="CompID" type="hidden" value="<?php echo $CompID; ?>">
> 
>   <input name="Pass" type="hidden" value="<?php echo $Pass; ?>">
> 
>   <input name="BGSection" type="hidden" value="<?php echo $PickSection; ?>">
> 
>   <?php
> 
>  
> 
> $recordCount = 0;
> 
> foreach($records as $record)
> 
> {
> 
> $recordCount = $recordCount+1;
> 
> $RecID=$record['RecordID'][0];
> 
> $CatID=$record['CategoryID'][0];
> 
> $Category=$record['Categories::Category'][0];
> 
> $YrSelected=$record['YrSelected'][0];
> 
> echo "<input type=hidden name=recID_".$recordCount." value=".$RecID.">
> 
> ";
> 
> echo "<input type=hidden name=Year_".$recordCount." value=''>
> 
> ";
> 
>  
> 
> if ($YrSelected >"") {
> 
> echo "<input name=Year_".$recordCount." type=checkbox value=08 checked 
> />".$Category."<br>
> 
> ";
> 
> }else{
> 
> echo "<input name=Year_".$recordCount." type=checkbox value=08 unchecked 
> />".$Category."<br>
> 
> ";
> 
> } // end of if YRSelected
> 
> }// end for each found record
> 
>  
> 
> }// end for each
> 
>  
> 
> echo "<input type=hidden name=recordCount  value=".$recordCount.">";
> 
> //echo "Records Found: ".$recordCount,"<br>";
> 
> ?>
> 
>  
> 
>             <br />
> 
>             <input name="Submit" type="submit" />
> 
>  
> 
> </form>
> 
> <?php
> 
>   if ($PickSection=="Product")
> 
>     echo "(This may Take a few moments to save)";
> 
> ?>
> 
>  
> 
> </body>
> 
> </html>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list


More information about the FX.php_List mailing list