Jump to content

Restringir emails [Resolvido]


Recommended Posts

Página mostraremails.php

$id = $row['idemail'];
$categoria = $row['categorian'];

echo "<th <a href='enviaremail.php?id=$id&&categoria=$categoria'>Enviar</a>";

Ele detecta qual é o ID seleccionado e detecta qual é a sua categoria. Agora na pagina enviaremail.php tenho:

$categoria2 = $_GET['categoria']; 
$id2 = $_GET['id'];
$query2 = mysql_query("SELECT * FROM email WHERE categorian = '$categoria2' and idemail = '$id2'")or die("SELECT Error: " .mysql_error());

Contudo, eu se enviar para mim o email, recebo sempre dois emails, com as duas categorias, ou seja não me restringe a categoria ao email.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.