Nothing is working
<title>Affiliate Reports</title>
<?
session_start();
?>
<?
//Our PHP/MYSQL page.
//This script displays all data on the page from
//the selected database table
//MySQL Variables. Edit where necessary
$host = "localhost";
$login_name = "";
$password = "";
//Connecting to MYSQL
MySQL_connect("$host","$login_name","$password");
//Select the database we want to use
MySQL_select_db("") or die("Could not select database");
//Selects all data from table
$affname = $HTTP_SESSION_VARS['_amember_user']['login'];
$query = "select * from members where street = '$affname' ";
$result = MySQL_query($query);
if ($result=="") echo("Sorry $affname,<br>You have not received any referrals yet. <br>Or if you haven't signed up for the affiliates system, please navigate over to <a href=\"http://datadink.net/affiliate.php\"> Sign Up</a> Page");else{
echo("Welcome, $affname. <br>Here you will see how much money, the member (s) ID and the emails of the member (s) you have referred to the <b>Mobile Datadink</b>.<br><br>");
//Loop to print each line of database
While( $rows = MySQL_fetch_array($result) ) {
//How the text looks on the screen
$login = $rows['login'];
$email = $rows['email'];
echo("<table border=0 width=438>
<tr>
<td width=76 align=\"center\"><font size=2>$login</td>
</tr>
</table>
");
}
}
//Close the connection to MySQL
MySQL_close()
?>
Every thing is good...thanks, but the last post i dont understand....
Since the street is the refer name and i just want to put you have refered $number (i want to add all the streets up) and made this much $number ( same as the top). Instead the script i have up top displays all the users that have the $affname in the street table of the mysql data base. I just want to add up the number of $affnames in each one of the members that have the $affname in it.