File "send_all_users.php"

Full Path: /home/analogde/www/filechange/WEBSITE/douche/send_all_users.php
File size: 986 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

	$db_host    = "analogdepat.mysql.db";
	$db_user   = "analogdepat";
 	$db_pass   = "Un92pac007";
	$db_name   = "analogdepat";
	
	$connexion = mysql_connect($db_host,$db_user,$db_pass); 

	if(!$connexion)
	{
		die('Could not connect: ' . mysql_error());
	}
 
	mysql_select_db($db_name, $connexion); 

	$sql= "SELECT * FROM firebase_token";
	$result = mysql_query($sql);

	echo "<table>
	<tr>
	<th>id</th>
	<th>token</th>
	<th>user</th>
	<th>ts_du_jour</th>
	<th>date_inscription</th>
	</tr>";
	
	$tab_token = array();
	
	while($row = mysql_fetch_array($result)) 
	{
		echo "<tr>";
		echo "<td>" . $row['id'] . "</td>";
		echo "<td>" . $row['token'] . "</td>";
		echo "<td>" . $row['user'] . "</td>";
		echo "<td>" . $row['ts_du_jour'] . "</td>";
		echo "<td>" . $row['date_inscription'] . "</td>";
		echo "</tr>";
		
		$tab_token[] = $row['token'];
	}
	
	echo "</table>";
	
	echo "<pre>";
	print_r($tab_token);
	echo "</pre>";
	
?>