Jump to content


Photo

unsubscribe


  • Please log in to reply
1 reply to this topic

#1 timtom3

timtom3
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 13 June 2006 - 06:15 PM

Hi if I want to remove an item in my database for example an e-mail address for a table using a text box where the user enters there e-mail address then clicks unsubscribe, how would i get the e-mail address to check if its in the database

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 13 June 2006 - 06:23 PM

$query = SELECT emailaddressfield FROM mytable WHERE emailaddressfield = 'entered_email_address';
$result = mysql_query($query);
if(mysql_num_rows($result) > 0)
{
      // email address is in DB
}
else
{
     // it isn't in there
}

Info: PHP Manual





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users