如何在URL中传递多个值的另一个页面[关闭]

As the title explains it, how can i pass multiple value to antoher page in URL. i have used the method before but only with a single value, i cant get it work with multiple. I know that you should place ampersand & to glue variables together.

This is currently my code:

<a href='update.php?del=$id?name=$loginname' class='sexybutton'>Print Bon</a>

I get the $id however i cant get the $loginname for some reason.

This is the code i use to get the data from the url

include 'dbconnect.php';

     // Get name
     $loginname = $_GET['name'];
     $sql1 = "SELECT * FROM users WHERE name='$name' ";    
     if ($conn->query($sql1) === TRUE) {   
    {       
    $name = $row['name'];
    echo $name; //Outputs: 2
     }

     // Get ID
     $id = $_GET['del'];
     // Update database
     $sql = "UPDATE wp_wppizza_orders SET printed='1' WHERE id='$id' ";
     if ($conn->query($sql) === TRUE) {
     echo " ";
     } else {
     echo "Error updating record: " . $conn->error;
}

As i mentioned, the GET id works but the GET name doesnt.

it gives 3 seperate warnings

Notice: Undefined index: name in C:\xampp\htdocs\login\update.php on line 5

Notice: Undefined variable: name in C:\xampp\htdocs\login\update.php on line 6

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\login\update.php on line 7

update.php?del=$id?name=$loginname

to

update.php?del=$id&name=$loginname

The first parameter is marked by ?, all following parameters are seperated by &

You Need To Change Only One Line Code

<a href='update.php?del=$id&name=$loginname' class='sexybutton'>Print Bon</a>