How can I change $_GET['phone'];
on $_GET['url'];
? I can not change help me please!
At me now this kind of
site.com/profile.php?phone=$1
I need this kind of
site.com/profile.php?url=$1
<?php
if (isset($_GET['phone']) === true && empty($_GET['phone']) === false) {
$phone = $_GET['phone'];
if (user_exists($phone) === true) {
$id = id_from_phone($phone);
$profile_data = user_data($id, 'url', 'first_name', 'last_name', 'email');
}
}
?>
<?php
function user_exists($phone) {
$phone = sanitize($phone);
return (mysql_result(mysql_query("SELECT COUNT(`id`) FROM `users` WHERE `phone` = '$phone'"), 0) == 1) ? true : false;
}
function id_from_phone($phone) {
$phone = sanitize($phone);
return mysql_result(mysql_query("SELECT `id` FROM `users` WHERE `phone` = '$phone'"), 0, 'id');
}
function login($phone, $password) {
$id = id_from_phone($phone);
$phone = sanitize($phone);
$password = md5($password);
return (mysql_result(mysql_query("SELECT COUNT(`id`) FROM `users` WHERE `phone` = '$phone' AND `password` = '$password'"), 0) == 1) ? $id : false;
}
?>
UPDATE
I found other topographical error. I can not ask a question. Please help me what to do ?!