Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Forum: Fixing WordPress
    In reply to: Layout problem
    Thread Starter jefflaws1

    (@jefflaws1)

    Thanks Steve but it turns out to be me being thick and stupid and not closing the table in the right place. Couple of hours re reading my own code and “hey presto” page works.

    Many thanks

    Jeff.

    Thread Starter jefflaws1

    (@jefflaws1)

    Problem solved, my bad, all down to not ending the table in the right place.

    Forum: Fixing WordPress
    In reply to: Layout problem
    Thread Starter jefflaws1

    (@jefflaws1)

    Hi Steve, thank you for your reply. php everywhere adds a block to page editing to paste your code into and then on the main content block in the editor you just call [php everywhere] where you want the code to display.

    The php code is this:
    <?php
    include(“Getit.php”);
    $famname = htmlspecialchars($_POST[‘familyname’]);
    $firstn = htmlspecialchars($_POST[‘firstname’]);
    $year = htmlspecialchars($_POST[‘year’]);
    $war = htmlspecialchars($_POST[‘war’]);
    $cemetery=htmlspecialchars($_POST[‘cemetery’]);
    $conn = new mysqli($host, $user, $pass, $db_name);
    // Check connection
    if ($conn_connect_error) {
    die(“Connection failed: ” . $conn_connect_error);
    }

    $sql = “select * from memorials where Surname like ‘$famname%’ and FirstName like ‘$firstn%’ and Cemetery like ‘%$cemetery%’ and Date_Of_Death like ‘$year%’ and War like ‘$war%’ ORDER BY Surname”;
    $result = $conn->query($sql);
    if ($result->num_rows > 0) {

    echo”
    <table class=’pdres’ width=’100%’>
    <thead>

    <th class=’sresh’ style=’color:#733b17; border: 1px #733b17 solid;’>Surname</th>
    <th class=’sresh’ style=’color:#733b17; border: 1px #733b17 solid;’>First Name</th>
    <th class=’sresh’ style=’color:#733b17; border: 1px #733b17 solid;’>Cemetery</th>
    <th class=’sresh’ style=’color:#733b17; border: 1px #733b17 solid;’>War</th>
    <th class=’sresh’ style=’color:#733b17; border: 1px #733b17 solid;’>Date Of Death</th>
    <th class=’sresh’ style=’color:#733b17; border: 1px #733b17 solid;’>Date Of Birth</th>
    <th class=’sresh’ style=’color:#733b17; border: 1px #733b17 solid;’></th>
    </thead
    “;
    while($row = $result->fetch_assoc()){
    $str = ‘More‘;

    echo”
    <tbody>
    <tr class=’sres’>
    <td class=’sres’ style=’color:#733b17; border: 1px #733b17 solid;’>” . $row[‘Surname’] . “</td>
    <td class=’sres’ style=’color:#733b17; border: 1px #733b17 solid;’>” . $row[‘FirstName’] . “</td>
    <td class=’sres’ style=’color:#733b17; border: 1px #733b17 solid;’>” . $row[‘Cemetery’] . “</td>
    <td class=’sres’ style=’color:#733b17; border: 1px #733b17 solid;’>” . $row[‘War’] . “</td>
    <td class=’sres’ style=’color:#733b17; border: 1px #733b17 solid;’>” . $row[‘Date_Of_Death’] . “</td>
    <td class=’sres’ style=’color:#733b17; border: 1px #733b17 solid;’>” . $row[‘Date_Of_Birth’] . “</td>
    <td class=’sres’ style=’color:#733b17; border: 1px #733b17 solid;’>” . $str . “</td>
    </tbody>”;
    }
    }

    $conn->close();
    ?>
    Once edited and published if I visit the site while logged in the quick links in the admin bar drop down and out of the normal admin bar almost as if there is a break somewhere.

    I am no expert when it comes to wordpress or php but before the last update everything was working fine under WP Exec PHP then it went to pot.

Viewing 3 replies - 1 through 3 (of 3 total)