
timmah1
Members-
Posts
1,170 -
Joined
-
Last visited
About timmah1
- Birthday 10/21/1971
Profile Information
-
Gender
Male
-
Location
Ohio
timmah1's Achievements

Advanced Member (4/5)
0
Reputation
-
Thank you for your help, but I'm getting different errors now that I've never seen before Uncaught RangeError: Maximum call stack size exceeded And I have no idea how to fix that. Even reading about it, i'm totally clueless Thank you for your help, it is really appreciated!
-
I've never heard of this or seen this before, but "inspecting" the code, I'm getting this now Uncaught RangeError: Maximum call stack size exceeded What is that?
-
Like this: [{"lat":"","lng":"","name":"Lobster Louie's Truck","address":"300 Pine, San Francisco, CA 94104","place":"300 Pine","hours":"8:00am - 10:00am","location":"Located at the corner of pine and 3rd."},{"lat":"","lng":"","name":"Lobster Louie's Truck","address":"Terry Francois Blvd, San Francisco, CA","place":"The Yard at Mission Rock","hours":"11:00am - 3:00pm","location":"Located at the Yard"}] But the map isn't populating, so I guess I was just assuming that the php code is at fault
-
Maybe I'm doing this entire thing wrong. The code I'm using is this: var markersData = [ <?php $sql = "SELECT * FROM events"; $result = $conn->query($sql); while($row = $result->fetch_assoc()) { $events[] = array( 'lat' => $row['event_lat'], 'lng' => $row['event_lng'], 'name' => $row['event_name'], 'address' => $row['event_address'], 'place' => $row['event_place'], 'hours' => $row['event_hours'], 'location' => $row['event_location'] ); } echo json_encode($events); ?> ];Is this not the proper way to do this?I'm using php on the javascript file
-
So, essentially it would be this: $sql = "SELECT * FROM events"; $result = $conn->query($sql); while($row = $result->fetch_assoc()) { $events[] = array( 'lat' => $row['event_lat'], 'lng' => $row['event_lng'], 'name' => $row['event_name'], 'address' => $row['event_address'], 'place' => $row['event_place'], 'hours' => $row['event_hours'], 'location' => $row['event_location'] ); } echo json_encode($events); to output like so { lat: 40.6386333, lng: -8.745, name: "xxxx", address: "xxxx", place: "xxxxx", hours: "xxxxx", location: "xxxx" }, { lat: 40.59955, lng: -8.7498167, name: "xxxx", address: "xxxx", place: "xxxxx", hours: "xxxxx", location: "xxxx" }, { lat: 40.6247167, lng: -8.7129167, name: "xxxx", address: "xxxx", place: "xxxxx", hours: "xxxxx", location: "xxxx" }
-
This is something small that I'm forgetting, but I'm lost now. I need to get the information from the db to display as follows: var markersData = [ { lat: 40.6386333, lng: -8.745, name: "xxxx", address: "xxxx", place: "xxxxx", hours: "xxxxx", location: "xxxx" }, { lat: 40.59955, lng: -8.7498167, name: "xxxx", address: "xxxx", place: "xxxxx", hours: "xxxxx", location: "xxxx" }, { lat: 40.6247167, lng: -8.7129167, name: "xxxx", address: "xxxx", place: "xxxxx", hours: "xxxxx", location: "xxxx" } ]; Now, my query is this: $sql = "SELECT * FROM events"; $result = $conn->query($sql); while($row = $result->fetch_assoc()) { $events[] = array( 'lat' => $row['event_lat'], 'lng' => $row['event_lng'], 'name' => $row['event_name'], 'address' => $row['event_address'], 'place' => $row['event_place'], 'hours' => $row['event_hours'], 'location' => $row['event_location'] ); echo '<pre>'.print_r($events); } Which prints out this: Array ( [0] => Array ( [lat] => [lng] => [name] => Lobster Louie's Truck [address] => 300 Pine, San Francisco, CA 94104 [place] => 300 Pine [hours] => 8:00am - 10:00am [location] => Located at the corner of pine and 3rd. ) ) Array ( [0] => Array ( [lat] => [lng] => [name] => Lobster Louie's Truck [address] => 300 Pine, San Francisco, CA 94104 [place] => 300 Pine [hours] => 8:00am - 10:00am [location] => Located at the corner of pine and 3rd. ) [1] => Array ( [lat] => [lng] => [name] => Lobster Louie's Truck [address] => Terry Francois Blvd, San Francisco, CA [place] => The Yard at Mission Rock [hours] => 11:00am - 3:00pm [location] => Located at the Yard ) ) I do not understand why it's showing 3, when there is only 2 in the database, but regardless, it's not working anyhow. Can somebody please see what's wrong so that it formats correctly? Thanks
-
If was as simple as changing OR to AND? Wow. Thanks for your help, its working now
-
Sorry, I noticed that after I posted it I have this $sql = "SELECT * FROM schedule as t1 inner join teams as t2 on t1.schedule_home=t2.team_id inner join team as t3 on t1.schedule_away=t3.teams_id WHERE t1.schedule.date > '$today' OR t1.schedule.date < '$week' ";
-
Im getting the same results doing this $sql = "SELECT * FROM schedule as t1 inner join teams as t2 on t1.schedule_home=t2.team_id inner join team as t3 on t1.schedule_away=t3.teams_id WHERE t4.schedule.date > '$today' OR t1.schedule.date < '$week' ";
-
Yes, it is teams_id and team_id, those are correct. This always returns nothing, no games found, but there are games, 8 of them, on September 2nd. It works if i don't try to grab dates in between 2 dates, so that's why I'm not sure what is wrong.
-
Can somebody help me as to why I'm not getting any results? $today = date("Y-m-d"); $week = date("Y-m-d", strtotime("+7 day")); $sql = "SELECT * FROM schedule as t1 inner join teams as t2 on t1.schedule_home=t2.team_id inner join team as t3 on t1.schedule_away=t3.teams_id inner join schedule as t4 on t4.schedule.date > '$today' WHERE t1.schedule.date < '$week' "; $result = $conn->query($sql); if ($result->num_rows > 0) { echo 'Results'; } else { echo 'No Upcoming Games'; } I'm trying to get all games that are greater than today's date, but less than 7 days from now
-
Your right, it says Warning: Cannot modify header information - headers already sent by (output started at index.php:1) in /index.php on line 9 Line 9 is the redirect. I don't understand what else to do
-
ok, I have this now I get on error on Line 9 that headers were already sent (which is header('Location:admin-login.php') Nothing is output before my session_start() session_start(); include 'assets/config.php'; error_reporting(E_ALL); ini_set('display_errors', '1'); if(empty($_SESSION['user'])) { header('Location: admin-login.php'); exit; }
-
Can anybody tell me why this is not working? session_start(); if (!isset($_SESSION['user'])) { header('Location: admin-login.php'); } No session is set, yet I can still view the page. I get no errors or anything. I'm at a loss because I've used this same thing for a lot of sites, and all of those work
-
Thank you simple things elude me most of the time