如何更改$ _GET ['phone']; 在$ _GET ['url'];? [关闭]

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 ?!

Every link that has this:

site.com/profile.php?phone=$1

change to this:

site.com/profile.php?url=$1

Then in this section:

<?php
if (isset($_GET['url']) === true && empty($_GET['url']) === false) {
$phone = $_GET['url'];

if (user_exists($phone) === true) {
    $id      = id_from_phone($phone);
    $profile_data = user_data($id, 'url', 'first_name', 'last_name', 'email');
}
}
?>

You can leave the rest as it is, or go and change every $phone to $url, but you will nee to change :

$phone = $_GET['url'];

to

$url = $_GET['url'];

After this just simple find all the link to profile.php and change the last bit from phone to url.

Also, as others have pointed out, its worth looking into changing your mysql_ to either mysqli or PDO