i finally got to fix it here is the code if any you guys wanna use it Thanks to all of you happy baking
CAKE PHP ROCKS --------------------------------------------------------- <script type="text/javascript"> if (document.cookie.indexOf("iphone_redirect=false") < 0) { if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { if (confirm("Go To Iphone Website")) { document.cookie = "iphone_redirect=false"; window.location = "m.something.com"; } else { var date = new Date(); var days = 1; date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+ date.toGMTString(); document.cookie = "iphone_redirect=false" + expires; } } } </script> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---