Welcome To Signs101.com: Largest Forum for Signmaking Professionals

Signs101.com: Largest Forum for Signmaking Professionals is the LARGEST online community & discussion forum for professional sign-makers and graphic designers.

 


  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Help ?

Discussion in 'Website Design' started by Replicator, Jan 10, 2010.

  1. Replicator

    Replicator Major Contributor

    10,230
    9
    38
    Nov 19, 2006
    Sun City, AZ
    Lets say I have a PHP block that looks like this :

    ******************************************************************************************

    <?php
    /*
    $Id: conditions.php 1739 2007-12-20 00:52:16Z hpdl $

    osCommerce, Open Source E-Commerce Solutions

    []http://www.oscommerce.com[/]

    Copyright (c) 2002 osCommerce

    Released under the GNU General Public License
    */

    define('NAVBAR_TITLE', 'Privacy Notice');
    define('HEADING_TITLE', 'Privacy Notice');

    define('TEXT_INFORMATION', 'Put here text information here');
    ?>

    *********************************************************************************

    How can I insert a block of HTML where it says to insert text information and not have it be all FUBAR ?

    Please Help !
     
    Tags:
  2. Fred Weiss

    Fred Weiss Merchant Member

    20,555
    413
    83
    Sep 11, 2003
    Olympia, WA
    Just insert the text between the single quote marks.
     
  3. Replicator

    Replicator Major Contributor

    10,230
    9
    38
    Nov 19, 2006
    Sun City, AZ
    I tried doing that and had many issues.

    1. If I insert the html I get error messages galore.

    2. If I insert the text, then I have issues with any kind of punctuation in the text and the \n does not work for line breaks.
     
  4. Poconopete

    Poconopete Very Active Member

    1,299
    1
    0
    Feb 23, 2007
    You escape apostrophes with a back slash-\ i.e. she\'s, for line breaks use < br > without the extra spaces shown. I had to put spaces to make it show here.
    A wealth of info can be found here http://forums.oscommerce.com/
     
  5. ProWraps

    ProWraps Very Active Member

    3,556
    0
    38
    Sep 30, 2009
    San Francisco, CA
    there are all kinds of problems because you are defining a variable. when you insert html, your asking for something that needs to be parsed and the php processsor is going to frag. i would figure out where that variable is being called, and deal with it there. you will have more control over how it is being handled and will be able to escape it from the php processor and have it parsed as the html you are requesting.

    it also may cause a headers info error such as Warning: Cannot modify header information - headers already sent by.....

    Cause:

    This error is caused if the your PHP scripts are printing to the browser prior to sending headers. A common example is printing the html tags prior to starting a session, or setting a cookie.


    -------------------
    posting your errors would help debug the problem.
     
  6. iSign

    iSign Major Contributor

    13,027
    31
    48
    Nov 29, 2003
    Kahului, Maui
    I think you must have forgot the [/FUBAR] tag! :wink:
     
  7. Replicator

    Replicator Major Contributor

    10,230
    9
    38
    Nov 19, 2006
    Sun City, AZ
    Thank you Poconopete, you saved my *** . . . Who'da thunk I could have used HTML <br> tags in PHP :LOL:

    You pretty muych still have to remove all punctuation that will be recognized as php code and cause syntax errors, but that's OK . . . THANKS !
     
  8. ProWraps

    ProWraps Very Active Member

    3,556
    0
    38
    Sep 30, 2009
    San Francisco, CA

    actually you don\'t, but it involves using includes and whatnot. much easier. but i\'m glad you got it fixed :)

    php was created to ease the use of html directly in the code. once you get ahold of it (especially if you have a perl background like me), you will quickly see how easy it is to use.
     
  9. Replicator

    Replicator Major Contributor

    10,230
    9
    38
    Nov 19, 2006
    Sun City, AZ
    Thank you Pro . . . !
     
Loading...

Share This Page

 


Loading...