I found the S2MEMBER_CURRENT_USER_EMAIL code but I just don't know how to implement it. For future reference to make this less complicated Email=slave_name on the table. I'm creating a form as well so they can input directly to the table and update as well but this was the content I wanted to lock since all the users would have access to see it the way it's coded now.
Any help is most appreciated! I've only been working with PHP and MySQL for a couple weeks off and on and still no where near where I want to be but I'm giving it my best shot.
- Code: Select all
<?php
$con = mysql_connect("localhost","login","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("ctradec1_ranger", $con);
$result = mysql_query("SELECT * FROM sc_slaves");
echo "<table border='1'>
<tr>
<th>ID</th>
<th>Slave</th>
<th>Email</th>
<th>Broker</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['slave'] . "</td>";
echo "<td>" . $row['slave_name'] . "</td>";
echo "<td>" . $row['broker'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>