grungefreak Posted May 27, 2009 Share Posted May 27, 2009 Hi, This may be a silly question and possibly the wrong place to post but here goes. I am interested in converting my website to be viewed and used on mobile devices e.g. mobile phones. I realise there are CSS and HTML issues here but I have some small scripts running in conjunction with a MySQL database. Would I need to make my scripts more efficient or are there any issues I should be aware of from a PHP point of view? Any guidance would be much appreciated. GF Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/ Share on other sites More sharing options...
MadTechie Posted May 27, 2009 Share Posted May 27, 2009 its truely about viewing, so CSS/HTML, also make it more text than graphical based (remember small screen), as for PHP, well its finished my the time its got to the browser.. only thing would be maybe detect what browser is being used!! Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843537 Share on other sites More sharing options...
Axeia Posted May 27, 2009 Share Posted May 27, 2009 If you do it properly all you need is a stylesheet for mobile devices , that's the beauty of CSS. You can style your page to look optimal on a certain medium. And yes what grungefreakMadTechie said, PHP got nothing to do with it only thing you have to worry about is clientside and that's html/css/javascript. Don't convert half your site via javascript or walk trough huuuge arrays and things like that as a mobile device has far less RAM and a less powerful CPU, although I have to say what they are capable off keeps impressing me. [edit](See the striketrough, name confusion) Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843549 Share on other sites More sharing options...
redarrow Posted May 27, 2009 Share Posted May 27, 2009 sorry i disagree with the css example learn wap/wml well worth the time and effort. http://www.w3schools.com/wap/default.asp Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843566 Share on other sites More sharing options...
MadTechie Posted May 27, 2009 Share Posted May 27, 2009 It maybe worth it but most moden phone have web browsers and don't use WAP anymore! ok my old phone could use view WAP but i never did because it was c##p, its okay for things like weather reports and stock market stuff (i don't go their), but for view a general website, it was pointless now with blackberri and iPhones etc thats a "Web Browser" so its Safari or Firefox or IE Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843579 Share on other sites More sharing options...
Axeia Posted May 27, 2009 Share Posted May 27, 2009 Safari or Firefox or IE Safari okay, IE I just pretend it doesn't exist ( HORRIBLE ie6 based mess ) Think the other major player besides safari on the mobile market is opera mini ? I agree with WAP not being worth it though, you have to 1) Learn it 2) Adapt your site to it That's a lot of work, and like you said.. most phones nowadays have a decent browser and WAP isn't something you want to use for all your content. Just the short informational stuff. Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843589 Share on other sites More sharing options...
MadTechie Posted May 27, 2009 Share Posted May 27, 2009 Learning it isn't hard remembering it (for the amount of time you use it) thats harder One of my sites has a voting system i had WAP for that only, during the last update i didn't include it, so for no complaints! Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843592 Share on other sites More sharing options...
grissom Posted May 27, 2009 Share Posted May 27, 2009 As has been pointed out PHP runs on the server, so the device does not normally matter - BUT !!! - There is one thing that YOU MUST BE CAREFUL OF when programming PHP for mobile devices and it is in the use of SESSION variables. I have had issues with the use of session variables for mobile devices as the session on a mobile device sometimes "floats" so I make a point not to use them. If I have any values to pass on from one page to another, I generally use a form and "POST" the data along ! Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843614 Share on other sites More sharing options...
grissom Posted May 27, 2009 Share Posted May 27, 2009 Oh and while I think on, cookies aren't that reliable either. Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843618 Share on other sites More sharing options...
MadTechie Posted May 27, 2009 Share Posted May 27, 2009 Yeah true, i had cookie issules with Safari, which effects sessions Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843626 Share on other sites More sharing options...
grungefreak Posted May 28, 2009 Author Share Posted May 28, 2009 OK, Thanks for all the responses. GF Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843932 Share on other sites More sharing options...
Daniel0 Posted May 28, 2009 Share Posted May 28, 2009 sorry i disagree with the css example learn wap/wml well worth the time and effort. http://www.w3schools.com/wap/default.asp Nowadays you would just be wasting your time learning that. Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843934 Share on other sites More sharing options...
xcoderx Posted May 28, 2009 Share Posted May 28, 2009 Here is my site http://discussonline.in its a xhtml site i made so that people from pc and cel ph cn access. And its very easy, pul out my stylesheet and get all the help u want. Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843942 Share on other sites More sharing options...
redarrow Posted May 28, 2009 Share Posted May 28, 2009 Are all you programmers saying that css has won over any other scripting language for mobiles? so what your all saying a good css template that it, in css media format. Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843981 Share on other sites More sharing options...
Daniel0 Posted May 28, 2009 Share Posted May 28, 2009 Overall, well written HTML and CSS will be adequate for modern mobile browsing. If you use things like separation of concerns, progressive enhancement and unobtrusive Javascript you shouldn't get into any trouble. You should follow those principles either way. Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843985 Share on other sites More sharing options...
redarrow Posted May 28, 2009 Share Posted May 28, 2009 dan will ajax work for user activity just interested thanks for your time. Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-843986 Share on other sites More sharing options...
Daniel0 Posted May 28, 2009 Share Posted May 28, 2009 What does that have to do with this topic? Anyway, I'd argue it won't. What about the people who browse with Javascript off like myself? You would violate the progressive enhancement principle I just mentioned. Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-844019 Share on other sites More sharing options...
grungefreak Posted May 28, 2009 Author Share Posted May 28, 2009 OK, well just to explain why I'm asking. I am doing my Thesis shortly and need a topic. I was going to do it on mobile learning and how it effects web developers but if it's only CSS and html, I'm not sure i'd have enough for my dissertation. GF Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-844511 Share on other sites More sharing options...
Daniel0 Posted May 28, 2009 Share Posted May 28, 2009 What are you studying and at what level? Just to get an idea of what could be potential interesting subjects. Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-844523 Share on other sites More sharing options...
grungefreak Posted May 28, 2009 Author Share Posted May 28, 2009 What are you studying and at what level? Just to get an idea of what could be potential interesting subjects. Multimedia and Elearning at Masters level. So I am doing a mini-dissertation (10,000 words) with a practical application to support my assumptions e.g. producing elearning content for mobile devices can be challenging for web developers. I write about it and some learning theories etc..then I produce a prototype to test my assumptions. I'm open to guidance on this one. I love web development using php and html, css and javascript so I feel this would interest me if I could get a good slant on it i.e. elearning using multimedia! GF Quote Link to comment https://forums.phpfreaks.com/topic/159939-php-for-mobile-devices/#findComment-844539 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.