Here's what I want. I have a member's area that people have to log into, then from there they can go to the special order page to get distributor prices. It's not that simple for I have to be able to change the price of the product according to the distributor id#. I can do all this fine with javascript, but I need to make it to where if the person changes the id#, once on the other page there is this little bit of code.
<?
include 'db.php';
session_start();
if(!session_is_registered('first_name')){
include 'login_form.html';
exit();
}
$id = $_POST ['id'];
$id_check = mysql_query("SELECT * FROM users WHERE userid='$id'");
$id2 = mysql_num_rows($id_check);
if($id != $id2)
{
echo "<font color=red><b>I'm sorry it looks like you changed the id #. <br>This must be set to your id, or the order will not process!</b></font>";
include 'distorder.php';
exit();
}
?>
The problem with the code is that even if the id is correct it still doesn't let them pass. WAIT, I just had an idea to make the id field readonly, to where the person can't change it.
Well, it worked, but can someone still tell me what I was doing wrong?
Thanks,
-Blake