i am passing values inthe URL by the $_GET :
<a href="http://localhost/myFiles/confirmation.php?`pseudo='.$pseudo.'&key'.$key.'">Confirmer votre compte</a>`
i get the values in the URL of the concerned page like this :
http://localhost/myFiles/confirmation.php?pseudo=test&key08656996298
but when i do this :
echo $_GET['pseudo'] ;
echo $_GET['key'];
it displays the 'pseudo' but not the key ! this is the error ( ! ) Notice: Undefined index: key in C:\wamp64\www\myFiles\confirmation.php on line 5
Try this, understand that PHP is a server-side language.
<a href="http://localhost/myFiles/confirmation.php?pseudo=<?php echo $pseudo;?>&key=<?php echo $key;?>">Confirmer votre compte</a>`
The =
operator is missing. Plus, you must not include a tick (`) in the url, should that actually be part of your code, seeing that you did not respond to a comment that was left about it.
<?php
$pseudo = "test";
$key = "1234567";
?>
<a href="confirmation.php?pseudo=<?php echo $pseudo;?>&key=<?php echo $key ?>">Confirmer votre compte</a>
Receiving php
echo $_GET['pseudo'] ;
echo $_GET['key'];