Creating a location Tracker

I'm trying to create a location tracking app. Its for contact tracing and notification for small business or company and want a local tracker(School project). I am having difficulty uploading the data to the database. im using PHP and SQL. im not very experienced so i cant quite figure out where the disconnect is. I know its connecting but nothing is uploading

indent preformatted text by 4 spaces

DEFINE ('DBUSER', 'id16511857_aggies2020');

DEFINE ('DBPW', 'N#b9A]lD[2cbq(AV');

DEFINE ('DBHOST', 'localhost');

DEFINE ('DBNAME', 'id16511857_raw_data');

$dbc = mysqli_connect(DBHOST,DBUSER,DBPW);

if (!$dbc) {

die("Database connection failed: " . mysqli_error($dbc));



$dbs = mysqli_select_db($dbc, DBNAME);

if (!$dbs) {

die("Database selection failed: " . mysqli_error($dbc));



$phNum = mysqli_real_escape_string($dbc, $_GET['phNum']);

$lat = mysqli_real_escape_string($dbc,$_GET['lat']);

$long = mysqli_real_escape_string($dbc,$_GET['long']);

$alt = mysqli_real_escape_string($dbc,$_GET['alt']);

$time = mysqli_real_escape_string($dbc,$_GET['time']);

$date = mysqli_real_escape_string($dbc,$_GET['date']);

$query = "INSERT INTO location (phNum, lat, long, alt, time, date) VALUES ('$phNum', '$lat', '$long', '$alt', '$time', '$date')";

$result = mysqli_query($dbc, $query) or trigger_error("Query MySQL Error: " . mysqli_error($dbc));



the NumbersOnly property returns true or false... see also the documentation User Interface

If true, then this TextBox accepts only numbers as keyboard input. Numbers can include a decimal point and an optional leading minus sign. This applies to keyboard input only. Even if NumbersOnly is true, you can set the text to anything at all using the [ Text`](textbox.Text) property.

you might want to replace that by the Text property of the Textbox1 component...

there might be more issues in your blocks...


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

Changed it to text, thank you. I marked it to accept numbers only on the design screen. I am using TinyDB to take the input from screen one and return it as a global variable on screen 2.