Welcome to TalkGraphics.com
Results 1 to 2 of 2
  1. #1

    Default Problem integrating HTML

    Hello, I´m Frank from Germany and I changed from Serif WEB Pluxs X8 to Magix. I have a problem to integrate html code to my page. Here is the code, wich is ignored from Magix. It worked perfect with Serif X8 and I´m not professionell enough to find the mistake. It should bring a dealerlist to the page from a database. Can anybody please help me?

    </script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF8">


    <!-- HTML-Fragment frag_5 -->

    <!--Preamble for HTML-Fragment frag_5-->
    <div __AddCode="here" style="position:absolute;left:90px;top:315px;width :1146px;height:1851px;/*Add Style*/">

    <html lang="de">
    <?php
    $host = "localhost";
    $felhasznalonev = "XXXXXXXXXXXXXXXXXXX";
    $jelszo = "XXXXXXXXXXXXXXXX";
    $adatbazis = "XXXXXXXXXXXXXXXXXXX";
    if(!@mysql_connect($host, $felhasznalonev, $jelszo)) { //Csatlakozunk az adatbázis szerverhez; @ eltünteti a hiba kódokat és sajátot írunk
    print "Nem lehet csatlakozni az adatbázis szerverhez. A hiba oka: " . mysql_error();
    exit;
    }
    if(!@mysql_select_db($adatbazis)) { //Csatlakozunk az adatbázisunkhoz; @ eltünteti a hiba kódokat és sajátot írunk
    print "Nem lehet elérni az adatbázist. A hiba oka: " . mysql_error();
    exit;
    }
    mysql_query("SET NAMES 'utf8'");
    ?>
    <table cellpadding="3" cellspacing="0" style="width: 1024px; font-size:13px; font-family:arial;color:#F00000;">
    <?php

    for($i=0; $i<1; $i++)
    {
    echo '
    <tr>
    <td colspan="6"><h3 style="font-weight:bold; font-size:12px; padding:2px 0; color: #FF0000; background:white;">PLZ-Bereich '.$i.'</h3></td>
    </tr>';
    $anfrage_haendler="SELECT * FROM tbl_haendler where PLZ LIKE '$i%' order by PLZ";
    $ergebnis_haendler=mysql_query($anfrage_haendler);
    while ($arr_haendler=mysql_fetch_assoc($ergebnis_haendle r))
    {
    echo '
    <tr>
    <td width="183"><strong>'.htmlentities($arr_haendler['Name']).'</strong></td>
    <td width="30">'.htmlentities($arr_haendler['PLZ']).'</td>
    <td width="123">'.htmlentities($arr_haendler['Ort']).'</td>
    <td width="114">'.htmlentities($arr_haendler['Strasse']).'</td>
    <td width="90">'.htmlentities($arr_haendler['Tel']).'</td>
    <td width="175">'.htmlentities($arr_haendler['Homepage']).'<br>'.htmlentities($arr_haendler['Email']).'</a></td>
    <!-- <td width="182"><a href="mailto:'.htmlentities($arr_haendler['Email']).'">'.htmlentities($arr_haendler['Email']).'</a></td>-->
    </tr>
    <tr><td colspan="6" style="border-bottom:1px solid gray;"></td></tr>';
    }
    }
    ?>
    </table>
    </div>
    <!--Postamble for HTML-Fragment frag_5-->
    <!--Body-Ende für HTML-Fragment frag_5 -->
    <script type="text/javascript">
    /*"Body end"-Skript für HTML-Fragment frag_5*/
    </script>[/COLOR]

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,904

    Default Re: Problem integrating HTML

    Frank, your long script starts with a closing </script> tag, which is not right.
    It contains PHP code and links to a MySQL database.

    You would need to get Xara to publish a page as PHP, which is a little complicated but possible.
    Your PHP seems to be creating a table of dynamic data from the database.

    If the dealer list does not change frequently, abandon the database and use the Xara Table widget with CSV data instead.
    You can include web and email details as HTML fragments.

    An alternative is the use the MySQL as a data source and use DataTables jquery plug-in as a cleaner approach.

    All require a level of skill that you will have to master.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

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
  •