POST ONCE TO 2 DIFFERENT SECTION EDITORS
34 posts by 4 authors in: Forums > CMS Builder
Last Post: April 5, 2010 (RSS)
By weblinks - March 31, 2010
Thanks for the code. WHERE DOES THE CODE GO on the lodging_southernvermont.php page?????
And, I presume it goes on a php page??????
If so, WHAT OTHER PHP CODE GOES ON THIS PAGE... AND WHERE?????
Please look at this page online at http://www.linkvermont.com/lodging-southernvermont.php
I also tried the page with the same code as an htm page.... and it displayed all or part of the the code online...
http://www.linkvermont.com/lodging_southernvermont.htm
Please get back to me asap... hopefully today.
Bob
Re: [weblinks] POST ONCE TO 2 DIFFERENT SECTION EDITORS
By Chris - March 31, 2010
The code I posted above is a complete PHP page. You'll need to change the "require_once" line at the top to be the same as your other viewers. Once you get it working, you can add all the extra code you need to make it belong on your site.
The URL you posted for the PHP page was incorrect. I guessed the correct URL (http://www.linkvermont.com/lodging_southernvermont.php.) If you view source, you can see that the page stops just after <!-- INSERT PHOTOLINK PHP CODE -->, so there's probably a PHP error just after that.
I'd like to help you figure out that error. Can you please post the complete PHP source code for your lodging_southernvermont.php page and the error message (if you can get it.)
If you don't know how to find the error message, you can ask your host to either point you to the error log or turn on "display_errors" for you so that PHP errors will show up on your webpages (this makes debugging so much easier!)
Chris
By weblinks - March 31, 2010
Please read the text file carefully as there are no line numbers in the file. However, I do believe the Error Message will point out the problem. Again, please get back to me asap.
Bob
Re: [weblinks] POST ONCE TO 2 DIFFERENT SECTION EDITORS
By Chris - March 31, 2010
You'll need to remove the ?> from here:
<?php
require_once "/netapp/whnas-swamp/s10/s10/01575/www.linkvermont.com/webdocs/cmsAdmin/lib/viewer_functions.php";
?>
list($lodging_manchesterareaRecords, ) = getRecords(array( 'tableName' => 'lodging_manchesterarea' ));
Does that help?
Chris
By weblinks - April 1, 2010
NO.. it only changes the error being displayed online[/#ff0000].... TO THIS....[/#ff0000]
Warning: Invalid argument supplied for foreach() in /netapp/whnas-swamp/s10/s10/01575/www.linkvermont.com/webdocs/lodging_southernvermont.php on line 228
FROM THIS....[/#ff0000]
list($lodging_manchesterareaRecords, ) = getRecords(array( 'tableName' => 'lodging_manchesterarea' )); list($lodging_weston_londonderryRecords, ) = getRecords(array( 'tableName' => 'lodging_weston_londonderry' )); list($lodging_chester_graftonRecords, ) = getRecords(array( 'tableName' => 'lodging_chester_grafton' )); list($lodging_brattleboro_newfaneRecords, ) = getRecords(array( 'tableName' => 'lodging_brattleboro_newfane' )); list($lodging_bellowsfalls_rockinghamRecords, ) = getRecords(array( 'tableName' => 'lodging_bellowsfalls_rockingham' )); list($lodging_bennington_arlingtonRecords, ) = getRecords(array( 'tableName' => 'lodging_bennington_arlington' )); // combine all records collected above into one big list $southernvermontRecords = array_merge( $lodging_manchesterareaRecords, $lodging_weston_londonderryRecords, $lodging_chester_graftonRecords, $lodging_brattleboro_newfaneRecords, $lodging_bellowsfalls_rockinghamRecords, $lodging_bennington_arlingtonRecords ); // shuffle our list so the records are displayed in a random order shuffle($southernvermontRecords); // limit to the first 10 records (remove the // on the next line to make this work) //$southernvermontRecords = array_slice($southernvermontRecords, 0, 10); ?> Warning: Invalid argument supplied for foreach() in /netapp/whnas-swamp/s10/s10/01575/www.linkvermont.com/webdocs/lodging_southernvermont.php on line 228
The change did not seem to change the WARNING.. only the amount of code displayed.[/#ff0000]
Bob[/#000000]
Re: [weblinks] POST ONCE TO 2 DIFFERENT SECTION EDITORS
By Chris - April 1, 2010
Well, it's a step in the right direction! Now your code is executing instead of just being displayed as HTML.
Can you please try to post the complete PHP source code for your lodging_southernvermont.php page so I can see what line 228 is?
Chris
By weblinks - April 1, 2010
The only way you can see the LINE NUMBERS is via a SCREENPRINT.... ATTACHED BELOW.... Question.. the php code at the top of the page is as follows... is that ok???? Also, I HAVE NOT set up a SECTION for lodging-southernvermont... is that OK
TOP OF PAGE CODE;[/#ff0000]
<?php
require_once "/netapp/whnas-swamp/s10/s10/01575/www.linkvermont.com/webdocs/cmsAdmin/lib/viewer_functions.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
SCREENPRINT ATTACHED[/#ff0000]
Bob[/#000000]
Re: [weblinks] POST ONCE TO 2 DIFFERENT SECTION EDITORS
By Chris - April 1, 2010
A ha! I had assumed that the code turned into one long line in trying to get it posted onto the forum, but you actually have the code as one long line in your PHP page.
That won't do at all. You'll need to add those linebreaks back in.
P.S. Yes, your top-of-page code is fine.
P.P.S. Yes, it is okay that you don't have a section for lodging-southernvermont.
Chris
By weblinks - April 1, 2010
The records are now displaying... I now need to bold, etc. certain code... I don't think I'll have any problems with this and/or spacing...
See...[/#ff0000] http://www.linkvermont.com/lodging_southernvermont.php
However....[/#ff0000]
1. The images[/#ff0000] are not displaying... I thought I knew the answer, but it didn't work.... ?????
See... http://www.linkvermont.com/townsvill/manchesterarea/lodging.php
2. The icons[/#ff0000] are not displaying.... I also need help with this.
See... Same... http://www.linkvermont.com/townsvill/manchesterarea/lodging.php
I'm attaching[/#ff0000] a Screenprint of the code on the Manchester Page which displays both.... When you give me the code for the above... PLEASE show me PRECISELY where it goes.
By weblinks - April 1, 2010
The postings ARE NOT ROTATING on the lodging-southernvermont.php page. And, they are all grouped by Section.. e.g. manchesterarea??????