Hoping you can help.

I'm very much a beginner with PHP code.

I have taken one of our website pages and just block-pasted French text in place of English text.

The page will not preview. The error is:

Parse error: syntax error, unexpected ':' in /home/lavigneo/public_html/fr/mayanmagic.php on line 62

But I can't see anywhere where there is a ':' missing.

I was wondering if I was supposed to indicate somewhere else in the code, that the language was changing from English to French.

I know you probably need more info. I'd be happy to provide it.

    Okay, it keeps saying there's a syntax error on line 62, but if I just remove the text on line 62, then it tells me about another syntax error on another line. So I'm wondering if there's something wrong with how the code reads overall. Like, if I'm supposed to be doing something to indicate that I've changed it to a french text page.

    Again, this was a working page, doing fine in English, and that changed when I pasted the translated text in.

    I hope this helps and isn't wasting your time, thanks.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title> ~ Mayan Magic ~ Psoriasis Eczema Rashes Burns Scars Diaper Rash</title>
    <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
    <link rel="stylesheet" type="text/css" href="style.css" />
    <script type="text/javascript">
    </script>
    <style type="text/css">

    / All Styles Optional /

    • {
      font-family:arial;
      font-size:10pt;
      }
      div#show3 {
      background-color:#efefef;
      width:140px;
      margin:0 auto;
      border:1px solid #444444;
      }
      div#show3 table td, div#show4 table td {
      height:24px;
      background-image:url('38.gif');
      }
      div#show4 table td {
      background-image:url('40.gif');
      }
      div#show3 table input, div#show4 table input {
      outline-style:none;
      }</style>
      <style type="text/css">
      div#show3 table td, div#show4 table td {
      height:21px;
      }</style></script>
      <script type="text/javascript" src="swissarmy.js"></script>
      </head>
      <body onload="MM_preloadImages('images/read-more2.jpg')">
      <table border="0" cellspacing="0" cellpadding="0" width="842" align="center">
      <tbody>
      <tr>
      <td valign="top" align="center"><?php include("header.php"); ?></td></tr>
      <tr>
      <td class="borderlr" valign="top" align="center">
      <table border="0" cellspacing="0" cellpadding="0" width="800">
      <tbody>
      <tr>
      <td height="10"></td></tr>
      <tr>
      <td class="heading5" height="30" valign="middle" align="left">&nbsp;</td></tr>
      <tr>
      <td class="text3" valign="top" align="center">
      <table border="0" cellspacing="0" cellpadding="0" width="800" height="300">
      <tbody>
      <tr>
      <td valign="top" rowspan="4" width="30%" align="left">
      <p><img alt="" width="297" height="567" src="images/xl_images/mayan_magic_100_50.jpg" /></p>
      <div class="text3" align="left">
      <p style="text-align: justify; margin: 0in 0in 0pt" class="MsoNormal"><span lang="FR-CA"><font face="Times New Roman">Mayan Magic apaise les démangeaisons et plaques d'eczéma des enfants.</font></span> </p>
      <p style="text-align: justify; margin: 0in 0in 0pt" class="MsoNormal"><span lang="FR-CA"></span>&nbsp;</p>
      <p style="text-align: justify; margin: 0in 0in 0pt" class="MsoNormal"><span lang="FR-CA"><font face="Times New Roman">&quot;Après les problèmes d’eczéma de ma fille de 11 ans, je peux juste dire que le baume Mayan Magic est INCROYABLE! C’est clair que ce produit détient de fortes propriétés anti- inflammatoires. Je me sentais tellement mal de voir à quel point l’eczéma démangeait ma fille mais je fut tellement soulagée lorsque, après application du baume, les rougeurs commençaient à disparaitre. Sa peau est entrain de retrouver un meilleur aspect. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com🏢office">

      apart from the include there is no php in there

        Wait, I think I might have just figured out that it's my editor in Cpanel. It says I can use the HTML editor in Cpanel for editing the PHP, but I don't think so now.

        I just copied all of the code from the original page, created a new file, pasted all the same (untranslated text, still in English) code and text into the editor, and the page doesn't work anymore. So I guess it's the editor?? The page banner doesn't even work anymore...

        OR, could this have happened because I tried to allow for the french pages in their own division of the URL ...../fr/mayanmagic.php)

        Warning: include(header.php) [function.include]: failed to open stream: No such file or directory in /home/lavigneo/public_html/fr/mayanmagic2.php on line 87

        Warning: include(header.php) [function.include]: failed to open stream: No such file or directory in /home/lavigneo/public_html/fr/mayanmagic2.php on line 87

        Warning: include() [function.include]: Failed opening 'header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/lavigneo/public_html/fr/mayanmagic2.php on line 87

        Mayan Magic is AMAZING!

        "After the experience I had with my 11-year old daughter's Eczema, I can only say that Mayan Magic is AMAZING!

          dagon;10953306 wrote:

          apart from the include there is no php in there

          But all of the pages are PHP....??

          Sorry, I know I don't have a lot of knowledge with any of this.

            just calling a page .php means nothing. The only php on the page posted is inside the

            <?php ... ?>

            the issue is actully with your xml declaration which has no place being there in the first place, don't use word to write html.

              dagon;10953311 wrote:

              just calling a page .php means nothing. The only php on the page posted is inside the

              <?php ... ?>

              the issue is actully with your xml declaration which has no place being there in the first place, don't use word to write html.

              Okay, trying to figure this out, because I have not ever used Word to write HTML -- he he, I'm not that 'beginner'.

              This is all I did:

              1) Open the code for my original, working page. Copied it.
              2) Opened a new empty file/page.
              3) Pasted in the code. Did all this in the CPanel HTML editor. Didn't change anything. New page didn't work.

              Here is the top of the original page's code:

              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
              <html xmlns="http://www.w3.org/1999/xhtml">
              <head>
              <title>Lavigne Organic Skincare ~ Mayan Magic ~ Psoriasis Eczema Rashes Burns Scars Diaper Rash</title>
              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
              <link type="text/css" rel="stylesheet" href="style.css" />
              <script type="text/javascript">
              <!--
              function MM_preloadImages() { //v3.0
              var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
              var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
              if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
              }
              //-->
              </script>
              <style type="text/css">

                I have figured out my problem, but not the cause of it.

                I want to have these French pages separate and thought it was a good idea to have the URL be .com/fr/pagename.php as I've seen this convention on many sites.

                But the problem seems to be caused by the "fr" folder or section of the URL.

                If anyone has any suggestions of how I can do this language-sectioning of the URL, that would be great.

                Otherwise, hope I haven't wasted too much of your time! Sorry.

                  Write a Reply...