Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    62
    Member #
    4758
    I know this is probably not the best way to go about it but the page I'm using won't support straight out PHP. When I used this method of echoing on one object (the subscribe button) it worked. But I want to use the method for the whole script.

    I get this message when I goto the page:
    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in file on line 34
    . I've highlighted line 34 in red. Can anyone tell me where it is wrong... I just don't see it.

    I've been making changes here and there where I thought the problem was but haven't successfully fixed it.

    Code:
    <?php echo $content = ''; ?>
       <?php echo $content .= zen_draw_form('subscribe', zen_href_link(FILENAME_SUBSCRIBE, '', 'SSL'), 'post', ''); ?>
       <?php echo $content; ?>
       <?php echo $content .= zen_draw_hidden_field('act', 'subscribe'); ?>
       <?php echo $content; ?>
       <?php echo $content .= zen_draw_hidden_field('main_page',FILENAME_SUBSCRIBE); ?>
       <?php echo $content; ?>
       <?php echo $content .= ' <label>'. (empty($subscribe_text) ? '' : $subscribe_text); ?>
       <?php echo $content; ?>
       <?php echo $content .= '  ' . zen_draw_input_field('email', '', 'size="18" maxlength="30" style="width: 30px;" value="' . HEADER_SUBSCRIBE_DEFAULT_TEXT . '" onfocus="if (this.value == '' . HEADER_SUBSCRIBE_DEFAULT_TEXT . '') . 'this.value = '';"'); ?> 
       <?php echo $content; ?>
       <?php echo $content .= '</label>'; ?>
       <?php if(EMAIL_USE_HTML == 'true') {
        $content .= ' <br /> <label>' . zen_draw_radio_field('email_format', 'HTML', true) . ENTRY_EMAIL_HTML_DISPLAY . '</label>'; ?>
        <?php echo $content .= ' <label style="white-space:nowrap">' . zen_draw_radio_field('email_format', 'TEXT', false) . ENTRY_EMAIL_TEXT_DISPLAY . '</label>';
       }
    ?>
    <?php echo $content; ?>
    - flipjargendy

  2.  

  3. #2
    ljm
    ljm is offline
    Senior Member ljm's Avatar
    Join Date
    Aug 2006
    Location
    Manchester, England
    Posts
    284
    Member #
    13684
    Liked
    1 times
    PHP Code:
    onfocus="if (this.value == '' . HEADER_SUBSCRIBE_DEFAULT_TEXT . '') . 'this.value = '';"'); 
    It appears you've messed mixed up your use of quotes. You need to escape the ones that are part of the string with a backwards slash so they're not to be confused with anything else in the code.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:16 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com