I have taken on a small project for my dads company, and he wants a website that displays all the houses, offices they have / have built.
The maps script is now working, but now that i would need to inplement PHP and a "admin user interface" so they can add houses and addresses them self i have a few problems.
It is a long time sins i took on a few projectes and i have kind of forgoten some stuff.
The quesstions is, how can i inplement the following into a javascript file:
CODE
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
echo "id: " . $row["id"]. " lat: " . $row["lat"]. ", lng: " . $row["lng"]. ", info: <div class='info_content'><h3> " . $row["address"]."</h3><p><img src='" .$row["info"]. "'></img></p></div><hr>";
}
into this:
CODE
var locations = [{
lat: x.xxxxxx,
lng: x.xxxxxx,
info: '<div class="info_content"><h3>Address</h3><p><img src="info"></img></br></p></div>'
}, {
it must be a while function ether in php or javascript sins its over 1000 houses on the list.
Might be hard to understand my quesstions, but feel free to ask me quesstions and i will do my best to answare them.
(not sure if i should post this in client side script or server side can move if it is in the wrong topic)
Thanks!