Hello, I'm new to PHP and I suspect it's due to the way my database is set up.
On this page, http://www.oukwakan.org/jdmlredo17.html , you can see my code - the info window asks the questions and closes at the end. However, when I go in and look at my database using PHPMyAdmin, I don't see any 1s for in the columns for the checkboxes that have been clicked on the map. Perhaps a problem with my php code or with my MYSQL setup, so I'll add info on both. <?php require("phpsqlajax_dbinfo.php"); // Gets data from URL parameters //must match stuff sent from html page $codepostale = $_GET['codepostale']; $nom = $_GET['nom']; $marche_lundi = $_GET['marche_lundi']; $marche_mardi = $_GET['marche_mardi']; $marche_mercredi = $_GET['marche_mercredi']; $marche_jeudi = $_GET['marche_jeudi']; $marche_vendredi = $_GET['marche_vendredi']; $marche_samedi = $_GET['marche_samedi']; $marche_dimanche = $_GET['marche_dimanche']; $lat = $_GET['lat']; $lng = $_GET['lng']; $remarques = $_GET['remarques']; $liensource = $_GET['liensource']; // Opens a connection to a MySQL server $connection=mysql_connect ("localhost", $username, $password); if (!$connection) { die('Not connected : ' . mysql_error()); } // Set the active MySQL database $db_selected = mysql_select_db($database, $connection); if (!$db_selected) { die ('Can\'t use db : ' . mysql_error()); } // Insert new row with user data $query = sprintf("INSERT INTO markers " . " (id, codepostale, nom, marche_lundi, marche_mardi, marche_mercredi, marche_jeudi, marche_vendredi, marche_samedi, marche_dimanche, lat, lng, remarques, liensource ) " . " VALUES (NULL, '%s','%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');", mysql_real_escape_string($codepostale), mysql_real_escape_string($nom), mysql_real_escape_string($marche_lundi), mysql_real_escape_string($marche_mardi), mysql_real_escape_string($marche_mercredi), mysql_real_escape_string($marche_jeudi), mysql_real_escape_string($marche_vendredi), mysql_real_escape_string($marche_samedi), mysql_real_escape_string($marche_dimanche), mysql_real_escape_string($lat), mysql_real_escape_string($lng), mysql_real_escape_string($remarques), mysql_real_escape_string($liensource)); $result = mysql_query($query); if (!$result) { die('Invalid query: ' . mysql_error()); } ?> For the setup of my values in MYSQL/PHPMyAdmin For the checkbox columns. Type = TINYINT Size/Values = 1 Default = NULL NULL box checked. Thanks for your help ! -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
