Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Oct 2017
    Posts
    7

    Default PHP not working on mobile version of Responsive Web Design - please help!

    Hi,

    I'm using some simple PHP to display a list of courses on my website and all appears OK on the desktop site but not on the mobile version of the page. I've inserted a rectangle shape and inserted the PHP as placeholder. On the mobile version of the page, I've changed the PHP to be super-simple, to ensure it was nothing to do with something in my PHP that was causing the problem, and all that's in the placeholder is:

    <?php
    echo 'hello world';
    ?>

    The page is http://www.mindfulnessassociation.co...ing/level1.php

    Any help in understanding why the PHP doesn't work on the mobile version of the page would be SO much appreciated as this is driving me nuts!

    Thanks,
    Heather

  2. #2
    Join Date
    Jul 2016
    Location
    Florida, USA
    Posts
    105

    Default Re: PHP not working on mobile version of Responsive Web Design - please help!

    Check that the placeholder is not placed in the mouse over area. It has happened to me often. You can just drag and drop it into the the mouse off section

  3. #3
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    22,090

    Default Re: PHP not working on mobile version of Responsive Web Design - please help!

    Hi Heather,

    Welcome to TG. I'm a bit unsure what you're trying to achieve here. If your site is written in solely in php then your server reads that and serves up the html to the visitor. Are you using a mixture of html & placeholders with php? If so, why is the page being served via php?
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  4. #4
    Join Date
    Oct 2017
    Posts
    7

    Default Re: PHP not working on mobile version of Responsive Web Design - please help!

    Thanks so much for the suggestions - I've checked and it's in the mouse off section.

  5. #5
    Join Date
    Oct 2017
    Posts
    7

    Default Re: PHP not working on mobile version of Responsive Web Design - please help!

    An update:

    When I look at the php file that Xara has generated and that is on the server, the desktop variant has in it:

    <div class="xr_noreset " style="position: absolute; left:336px;top:1210px;width:552px;height:236px;">
    <?php
    require ("configuration.php");

    //SET UP SOME PARAMETERS FOR THE USAGE OF THIS CODE
    $tt=0; //we want non-teacher-training courses here
    $orderBy="ORDER BY Location_name, Start_date ASC";
    $reqLevel="Level 1 - Being Present";

    include 'functions.php';

    displaySimpleCourseList($tt, $orderBy, $reqLevel);

    ?>
    </div>


    and this in the mobile variant of the same file:

    <div class="xr_group">
    <span class="xr_rn_ xr_ar" style="left:20px;top:1393px;width:439px;height:263 px; background:url('index_htm_files/1665.png') 0px 0px no-repeat; background-size: 439px 263px;"></span>
    </div>


    Surely this is a Xara bug? Xara has generated a .png file for the php in the placeholder of the mobile variant, which the server can never interpret as php!

    Best wishes,
    Heather

  6. #6
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    22,090

    Default Re: PHP not working on mobile version of Responsive Web Design - please help!

    Does the php work in the desktop variant Heather?
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  7. #7
    Join Date
    Oct 2017
    Posts
    7

    Default Re: PHP not working on mobile version of Responsive Web Design - please help!

    Yes it does

  8. #8
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    22,090

    Default Re: PHP not working on mobile version of Responsive Web Design - please help!

    So what happens if you delete the Main variant and just leave a mobile variant. Does that load correctly? I say that as I suspect there is a problem loading between the variants. It occurs with forms sometimes. Are you loading the page using php or htm?
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  9. #9
    Join Date
    Oct 2017
    Posts
    7

    Default Re: PHP not working on mobile version of Responsive Web Design - please help!

    Thank you so much for your reply, I really appreciate it.

    I'm just making supper for the kids and haven't had a chance to try deleting the main variant, but I'd say that I don't see that this is a loading problem since I'm just viewing the file that Xara has created when I've exported the website to my local filesystem, that I've then FTP'd up to the server, and what I pasted above is the contents of the level1.php file before it has been loaded by the browser. Surely the problem is what Xara is generating?

  10. #10
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    22,090

    Default Re: PHP not working on mobile version of Responsive Web Design - please help!

    My thinking is that on requesting the site from the server it might be executing the php before deciding on the viewport size. By just experimenting with only a single mobile size variant does the menu display as expected on a mobile.You never said whether it's uploaded as .php or .html with php placeholders.
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

 

 

Tags for this Thread

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
  •