SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Non-Member GlobalFusion's Avatar
    Join Date
    Jul 2004
    Location
    globalfusion.com.au Google PageRank: 5
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Parse error: parse error, unexpected $

    I have the same problem.. but for the life of me cannot find a missing (").

    Here is my ugly error:
    Parse error: parse error, unexpected $ in /home/xxxxxx/public_html/tellafriend.php on line 188


    And here is my code:
    PHP Code:
    *head tag & above removed for space reason on this post only*

    <body>
    <table width="100%" border="0" cellspacing="0" cellpadding="15" style="border-top: 3px solid #000000;">
      <tr>
        <td align="center"><table width="730" border="0" cellspacing="0" cellpadding="0">
            <tr> 
              <td colspan="2"><img src="images/01.gif" width="730" height="5" alt="" /></td>
            </tr>
            <tr> 
              <td width="725" align="center" valign="top" style="background-image:url(images/06.gif)"><img src="images/02.jpg" alt="XxXx" width="725" height="229" border="0" usemap="#Map" /> 
                <div align="center">
                <?php include 'textads/h_ads.php'?><br />
                  <ul id="nav">
    <?php wp_list_cats(); ?>
                </ul>
                </div><table width="700" border="0" cellspacing="0" cellpadding="0">
                  <tr> 
                    <td width="490" align="left" valign="top"><table width="480" border="0" cellspacing="0" cellpadding="0">
                        <tr> 
                          <td colspan="2"><img src="images/03.gif" width="480" height="4" alt="" /></td>
                        </tr>
                        <tr> 
                          <td width="476" align="center" style="background-image:url(images/04.gif)"><table width="470" border="0" cellspacing="0" cellpadding="0">
                              <tr> 
                                <td align="left" valign="top"><div id="content"> 
                                    <div class="post"> 
    <?php
    if (substr($QUERY_STRING,0,8) == "thankyou")
    {
    //Redirect User to a thankyou page.
    $thanks '<br><br><br><div align="center">Thank you '.$friend_name.'.<br><br>Your reccomendation has been sent to '.$friend_email.'.';
    $thanks .= '<br><br><br><br><br>Redirecting you back to XxXxXx.com...<br><br><br>';
    $thanks .= 'If this page does not redirect within 5 seconds - <a href="http://www.XxXx.com">click here</a>';
    echo 
    $thanks;
    echo 
    '<meta http-equiv= "refresh" content= "5;url=http://www.XxXx.com">';
    }
    else{
    include(
    'tellfriendform.php');
    ?> 
                                    </div>
                                    </div></td>
                              </tr>
                            </table></td>
                          <td width="4" bgcolor="CCCCCC"></td>
                        </tr>
                        <tr> 
                          <td colspan="2"><img src="images/05.gif" width="480" height="8" alt="" /></td>
                        </tr>
                      </table>
                    </td>
                    <td width="*" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="border: 4px solid #EDEDED;">
                        <tr> 
                          <td align="left" bgcolor="F7F7F7"><div id="menu"> 
                              <ul>
                                <?php get_links_list(); ?>
                                <li id="search"> 
                                  <label for="label"> 
                                  <?php _e('Search:'); ?>
                                  </label>
                                  <form id="searchform" method="get" action="<?php echo $PHP_SELF?>">
                                    <div> 
                                      <input type="text" name="s" id="label" size="19" style="font: 10px Verdana; background: #fff; border: 1px solid #333; padding: 3px;" />
                                      <input type="submit" name="submit" value="<?php _e('Search'); ?>" style="font: 10px Verdana; background: #fff; border: 1px solid #333; padding: 2px;" />
                                    </div>
                                  </form>
                                </li><br />
                                <li id="newsletter">
                                <form action="scripts/mailform.php" method="post">
                                Newsletter Signup<br /><br /><br />
                                Name:<br />
    <input name="name" type="text" style="font: 10px Verdana; background: #fff; border: 1px solid #333; padding: 3px;"/><br />
    Email:<br />
    <input name="email" type="text" id="email" style="font: 10px Verdana; background: #fff; border: 1px solid #333; padding: 3px;"/>
    <br /><input name="ip" type="hidden" value="<?php echo $_SERVER["HTTP_X_FORWARDED_FOR"]; ?>" /><input name="date" type="hidden" value="<?php include('scripts/localdate.php'); ?>" /><br />
    <input name="n_submit" type="submit" id="n_submit" style="font: 10px Verdana; background: #fff; border: 1px solid #333; padding: 2px;" value="Sign Me Up!"/>
    <br />
    </form><br />
    </li>
                                <li id="archives"> 
                                  <?php _e('Archives:'); ?>
                                  <ul>
                                    <?php wp_get_archives('type=monthly'); ?>
                                  </ul>
                                </li>
                                <li id="calendar"> 
                                  <?php get_calendar(); ?>
                                </li>
                                <li id="other"> 
                                  <?php _e('Other:'); ?>
                                  <ul>
                                    <li><a href="<?php echo get_settings('../wordpress-1.2-mingus/wordpress/siteurl'); ?>/wp-login.php"> 
                                      <?php _e('Login'); ?>
                                      </a></li>
                                    <li><a href="<?php echo get_settings('../wordpress-1.2-mingus/wordpress/siteurl'); ?>/wp-register.php"> 
                                      <?php _e('Register'); ?>
                                      </a></li>
                                  </ul>
                                </li>
                                <li id="meta"> 
                                  <?php _e('Meta:'); ?>
                                  <ul>
                                    <li><a href="<?php bloginfo('../wordpress-1.2-mingus/wordpress/rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"> 
                                      <?php _e('<abbr title="Really Simple Syndication">RSS</abbr> 2.0'); ?>
                                      </a></li>
                                    <li><a href="<?php bloginfo('../wordpress-1.2-mingus/wordpress/comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>"> 
                                      <?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr> 2.0'); ?>
                                      </a></li>
                                    <li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"> 
                                      <?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?>
                                      </a></li>
                                    <li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress; state-of-the-art semantic personal publishing platform.'); ?>">WP</a></li>
                                  </ul>
                                </li>
                              </ul>
                            </div></td>
                        </tr>
                      </table>
                      <p>&nbsp;</p>
                      <p align="center"><a href="http://www.partypoker.com/index.htm?wm=2131220"><img src="banner/partypoker.gif" width="120" height="240" border="0" /></a><br />
                      </p>
                      <div align="center"><script type="text/javascript"><!--
    google_ad_client = "pub-9361702401516072";
    google_ad_width = 160;
    google_ad_height = 600;
    google_ad_format = "160x600_as";
    google_ad_channel ="";
    google_ad_type = "text";
    google_color_border = "CCCCCC";
    google_color_bg = "FFFFFF";
    google_color_link = "000000";
    google_color_url = "666666";
    google_color_text = "333333";
    //--></script>
    <script type="text/javascript"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script><br /><br />
    <?php include 'textads/v_ads.php'?>
    <br />
                        <!--<?php echo $wpdb->
                        
    num_queries?> queries. 
                        <?php timer_stop(1); ?>
                        seconds. --><?php echo sprintf(__("Powered by <a href='http://wordpress.org' title='%s'><strong>WordPress</strong></a>"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform")); ?>
                      </div>
                    </td>
                  </tr>
                </table>
              <br /> </td>

              <td width="5" valign="top" bgcolor="B8B8B8">&nbsp;</td>
            </tr>
            <tr> 
              <td colspan="2"><img src="images/07.gif" width="730" height="8" alt="" /></td>
            </tr>
          </table>
    </td>
      </tr>
    </table>
    <map name="Map" id="Map">
      <area shape="circle" coords="122,131,88" href="index.php" alt="" />
    </map>
    </body>
    </html>

    It may have something to do with the fact that it is 6am, and i'm having difficulty keeping my eyes open... but for the life of me, I cannot find the culprit!

  2. #2
    <? james('rules'); ?>
    Join Date
    Jun 2004
    Location
    Wales, UK
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope, that error is caused by an unclosed brace. Look at this line:
    PHP Code:
    else {
    include(
    'tellfriendform.php');
    // ... 
    This else statement is not closed, so at the END of your code, just before ?> put a } and your sorted , but your code is HTML at the end, so do <?php } ?> and your done! .

    Tell if this sorts it though please, i like to know if my suggestions help.
    If knowledge is power - Why isn't our army librarians?!
    Statistics show that 63% of all statistics are fake.
    When i was little i broke my neck, and i havent looked back since .
    I completed the internet in 1 week. The end boss was pretty easy though .

  3. #3
    Non-Member GlobalFusion's Avatar
    Join Date
    Jul 2004
    Location
    globalfusion.com.au Google PageRank: 5
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LOL!

    I knew I left something open! I was just too buggered to actually SEE it.


    Thanks a lot for the heads up.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •