Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $serveur='localhost';
- $user='root';
- $password='xxxx';
- $base='db';
- $champs=array(
- "member"=>array("id","group","login","lastname","firstname","email","pswd","account","searchingfor","searchingfordistance","searchedfor","searchedfordistance","mydescription","groupdescription","searchdescription","resourcesdescription"),
- "place"=>array("id","idm","ids","name","town","postalcode","address","coord")
- );
- $connexion = mysql_connect("$serveur","$user","$password") or die ("Impossible de se connecter à la base de données");
- mysql_select_db("$base",$connexion) or die("Erreur de connexion a la base de donnees");
- $fieldtypes = mysql_query("SHOW FIELDS FROM place");
- ob_start();
- var_export($fieldtypes);
- $tab_debug=ob_get_contents();
- ob_end_clean();
- $fichier=fopen('gs.log','w');
- fwrite($fichier,$tab_debug);
- fclose($fichier);
- ... (rest of code works)
- $fields = array();
- $fieldtypes = mysql_query("SHOW FIELDS FROM place");
- if ($fieldtypes) {
- while ($row = mysql_fetch_assoc($fieldtypes)) {
- $fields[] = $row;
- }
- }
- ob_start();
- // Dump your $fields array
- var_export($fields);
- $tab_debug=ob_get_contents();
- ob_end_clean();
- // Don't quote these vars -- it's poor practice
- $connexion = mysql_connect("$serveur","$user","$password")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement