Discussion Forums  >  Maps, Device Location, Tracking

Replies: 2    Views: 140

Electronincantation
Android Fan
Profile
Posts: 35
Reg: Dec 26, 2011
Accrington
350
03/29/12 04:03 AM (13 years ago)

Data url not returning data via PHP script.

Hi I am using a data url to display the devices's location data using the script below.I am just getting a blank screen.The script is on my server,does it have to be on yours to work? As the file uploader won't allow PHP file uploads and throws the error shown under the PHP code in this post. <?php $lat = $_GET['latitude']; $long = $_GET['longitude']; $test = $_GET['test']; echo "<p>" . $lat . "</p>"; echo "<p>" . $long; ."</p>"; echo "<p>" . $test ."</p>"; ?> Oops, a PHP error was trapped. File: /var/www/vhosts/buzztouch-demo/public_html/app/cp_v20/bt_app/bt_pickerFile.php Line: 730 Message: Undefined variable: viewStyle The script works OK on the URL here,without the device data of course!: http://www.transporthistory.net/wordpress/places.php/?deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&test=test from a normal web browser. Any ideas?
 
jjblack
Apple Fan
Profile
Posts: 1
Reg: Dec 16, 2011
Silverthorne
1,860
like
03/30/12 05:06 PM (13 years ago)
Yeah I get the same message when I try to install a tab icon in multiple tab layout for a new app using v 2.o Here is the error: File: /var/www/vhosts/buzztouch-demo/public_html/app/cp_v20/bt_app/bt_pickerFile.php Line: 730 Message: Undefined variable: viewStyle
 
vmurphy
Aspiring developer
Profile
Posts: 6
Reg: Jan 09, 2012
Ottawa
60
like
04/09/12 12:58 PM (13 years ago)
The script is fine on your own server. I have a similar script for a store locator. My data url looks like this: http://www.mywebsite.com/get_stores.php?deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude] And the code in the get_stores.php script looks like: $lat = $_GET["deviceLatitude"]; $lng = $_GET["deviceLongitude"]; Your script seems to be pulling the wrong variables from the URL (latitude versus deviceLatitude) Hope this helps.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.