Can my mobile site access data on my main site?

by 1001
5 replies

I have a local business directory website which is not responsive or mobile friendly ... a html site, not wordpress.

I want to add a mobile version which will just display the basics ... but I want it to access the database in the main site.

The reason is because I don't want to have to maintain 2 databases.

I'm not very technically minded and so just assumed this would be simple enough to do.

Now I have people telling me that it can't be done ... and that I need to have 2 databases ... or build a responsive site from scratch.

Can anyone give me any advice please. Thanks.
#access #data #main #mobile #site
  • Profile picture of the author onSubie
    Yes that can be done.

    That is what WordPress does. All the site info and content is stored in the DB. The theme (responsive or not) uses the data from the same DB.

    It doesn't matter if the person is on a browser or mobile device.

    The difficulty in actually implementing it depends on your technical ability, the DB you are using and how your site is built/maintained.

    But since (assuming) both the web and mobile version will be on the same server, they would both have access to the same DB.
    {{ DiscussionBoard.errors[9774664].message }}
    • Profile picture of the author 1001
      Thanks onSubie,

      That was what I was hoping to hear.

      The site is a normal html site, but the data ... business names, addresses, phone numbers etc are all held in a php database.

      The database can certainly be downloaded, as I have done that in the past to check it all in MS Excel.

      Both the web and mobile version will be on the same server.

      Sounds like my mobile developer needs the sack and I need to talk to someone with more experience.

      Thanks again for your help.
      {{ DiscussionBoard.errors[9775402].message }}
      • Profile picture of the author 1001
        Ok ... so if I wanted to post the job on elance or odesk ... what info do I need to provide to get a reasonable idea of what it will cost to build.
        {{ DiscussionBoard.errors[9778722].message }}
  • Profile picture of the author unifiedac
    You need to create PHP pages on your mobile site with MySQL queries to the database. As long as the mobile site is on the same hosting account you should have no problem.

    First you need to connect to your MySQL database with the mysqli() function:

    PHP Connect to MySQL

    Then you make a SQL query using the SELECT option to grab data from the database:

    PHP Select Data From MySQL

    That's the basic run down. Of course it can get much more complicated than that.
    {{ DiscussionBoard.errors[9779343].message }}
    • Profile picture of the author 1001
      Thanks for your reply unifiedac ... that helps a lot.

      The mobile site will definitely be on the same hosting account as the main directory.

      I've had a read of the resources you pointed to and now I get the concept.

      Ok ... so my next point ... does anyone have any idea of roughly how much time a good coder would need to create a mobile site which can do this ... I need some idea so I can work out my budget for it.

      Thanks for the help so far.
      {{ DiscussionBoard.errors[9779740].message }}

Trending Topics