hi, i have two tables and i want to search in two tables and show info about the user.
i have:
ususarios
id name age login
1 ruan 14 ruan1
boleto
id name money login
5 ruan 43,00 ruan1
and i have this code:
if (isset($_POST['usr']) && isset($_POST['pwd'])) {
$usr = stripslashes($_POST['usr']);
$comsql = mysql_query("SELECT * FROM usuarios WHERE login = '".$usr."'");
$campo = mysql_fetch_array($comsql);
if ($_POST['pwd'] != $campo['senha']) {
print "Senha Inválida!<br><a href=''>Clique aqui</a> para tentar novamente.\n";
} else {
session_start();
$_SESSION['usr'] = $campo['id'];
print "
".userinfo($campo['id'], "name")."
".userinfo($campo['id'], "age")."
";
how i search at boleto´s table to print the money?