I am sure this is very simple but I have a license checker that when purchased that is for use with a domain only however i have to input http://www.domain.com and domain.com in the db.
My question is
How can I update the domains.. i can update the http://www.domain.com but i cant get it to update the domain.com without overwritting the other one.
Here is the code i have but if someone can help me out it would be nice.
Code: Select all
$domain = $_POST['new_domain'];
$domain_other = str_replace("www.","", $domain);
//this one updates the http://www.domain.com for their account.
$query = mysql_query("UPDATE license SET domain ='$domain' WHERE email ='{$_SESSION['m_user']}' LIMIT 1")or die(mysql_error());
//this is where i tried to have it update the domain.com
$query = mysql_query("UPDATE license SET domain ='$domain_other' WHERE email ='{$_SESSION['m_user']}' LIMIT 1")or die(mysql_error());