-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP can't display database records. #11
Comments
Ok, thanks for bringing this up. Let me take a look into this. Please login to your database and tell me how many records you have in the gpslocations table. thanks |
Shawhern Can you please look in dbconnect.php and make sure everything is correct there. What is the name of your database in phpMySql. Make sure it is the same as in dbconnect.php. Also, please read this tutorial I wrote and also carefully read the comments. n |
I checked my dbconnect.php it is exactly the same i foloow the step inside the tutorial. $dbhost = 'localhost'; but when i directly access to updatelocations.php it will have a '0' which mean i successfully execute the code and i check back to my database the record is added inside but something fishy is the time i open displaymap.php i cant have my record in the dropdown list. Does something need to configure like php extension or what Thanks |
u need to install this application into the phone and run the process in On Mon, Jun 23, 2014 at 2:15 PM, rebecca1986 notifications@github.com
|
shawherm. Instead of testing with displaymap.php directly. Try getroutes.php instead. That is used by displaymap. If getroutes.php fails to load routes, then you need to look in your web servers error logs. That is the next step. n |
shawhern, look at the last image you posted. when you call getroutes.php, you should have ONLY json. For some reason you have a bunch of html garbage displaying. the br tag in the first line to the font tag about 10 lines down. the file SHOULD start with: { "routes".... it looks like some html got into one of your rows in the database. carefully go look at the database and check ALL 27 of the rows carefully and see if one has html in it. then delete it. try that first. n |
I checked and found out still the same after that i actually delete most of the records and left 5 for testing still the result is the same and i also re-download the whole php source code and replace the old one |
ok, i think i know what is is. go into getroutes.php and change } while ($mysqli->next_result()); to this } while ($mysqli->more_results() && $mysqli->next_result()); |
Thank you it is working fine now you are saving my life <3 |
good, thanks for bringing this to my attention. Nick |
Hi Nick, Below is the link i put over the net yet the problem com find me again but this time in getroutes,php already got the result is it something wrong with this server? |
You need to always be checking getroutes.php. Look at it now. Did you add a div to it?
That page can only output json, you can not add any html to it. It's ok to style displaymap.php but not getroutes.php |
Hi Sir,
Whenever i run the displaymap.php it just kept loading seems like can not fetch the record from database and will have this log inside my php log i do follow every step in the tutorial .Please advise me thank you sir
[22-Jun-2014 11:55:32 Europe/Paris] PHP Strict standards: mysqli::next_result(): There is no next result set. Please, call mysqli_more_results()/mysqli::more_results() to check whether to call this function/method in C:\wamp\www\gpstracker\getroutes.php on line 20
[22-Jun-2014 11:55:32 Europe/Paris] PHP Stack trace:
[22-Jun-2014 11:55:32 Europe/Paris] PHP 1. {main}() C:\wamp\www\gpstracker\getroutes.php:0
[22-Jun-2014 11:55:32 Europe/Paris] PHP 2. mysqli->next_result() C:\wamp\www\gpstracker\getroutes.php:20
The text was updated successfully, but these errors were encountered: