Project / Support Center
Welcome, Guest. Please login or register. August 13, 2022, 02:19: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Mobile Devices  |  Topic: easy javascript to detect mobile device with a php variable included 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: easy javascript to detect mobile device with a php variable included  (Read 17208 times)
admin
Administrator
******
Offline Offline

Posts: 234


« on: July 15, 2014, 07:46: PM »

 <script>
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
window.location = "http://www.manager.net/registration_iphone.php?class_id="+<?php echo $_GET['class_id']; ?>;
}
</script>

where as in php you use a . to join things in javascripting you use a + sign

?class_id="+<?php echo $_GET['class_id']; ?>
Report to moderator   Logged

The Unknown Webmaster
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Mobile Devices  |  Topic: easy javascript to detect mobile device with a php variable included « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!