An error occurred while loading the file. Please try again.
-
Aldrich Valentino Halim authored3c4cf060
profile.php 573 B
<?php
/* Model */
include "../model/user.php";
//TODO: tambahin redirect klo get kosong
$user = new User;
$user_id = $_GET['id'];
$result = $user->getUserById($user_id);
header('Content-Type: text/xml');
$xml = '<user>';
while($row = mysqli_fetch_array($result)){
$xml = $xml . '<name>' . $row['name'] . '</name><username>' . $row['username'] .
'</username><email>' . $row['email'] . '</email><image>' . $row['image'] .
'</image><phone>' . $row['phone'] . '</phone><driver>' . $row['isDriver'] . '</driver>';
}
$xml = $xml . '</user>';
print $xml;