-1
I need to pass a url with a variable through the Whatsapp api:
$id='3';
$link = "clique neste link para validar sua conta site.com.br/usuario.php?id=$id";
header("Location: http://api.whatsapp.com/send?1=pt_BR&phone=55{$whatsapp}&text={$link}");
In the case of the above code, it does not pass the $id variable by the link and I need it to pass.. the link would have to go to whatsapss this way:
"clique neste link para validar sua conta site.com.br/usuario.php?id=3"
but arrives at Whatsapp so:
"clique neste link para validar sua conta site.com.br/usuario.php?id"
if I send the variable this way it passes:
"clique neste link para validar sua conta site.com.br/$id>" a variável vai para o whatsapp, mas se eu coloco completo não vai.
Does anyone know if there’s another way to do it?
it ignores the equal sign, does not let go to the link, with all the tests I did it stopped at id when it had a =sign. I think there is no solution
– Francis Vagner da Luz
when it comes to double quotes the best way to use the verdader is this way $link = "click this link to validate your site.com.br/user.php account? id={$id}"; why double quotes interpret php code other than single quotes
– Lucas Antonio