Question : check if email aleady exists in db table before new record is inserted

I need to check if an email address already exists before a new record is inserted - can i modify the following code to do that?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "signup")) {
  $insertSQL = sprintf("INSERT INTO members (membername, email, password) VALUES (%s, %s, %s)",
                       GetSQLValueString($_POST['member_name'], "text"),
                       GetSQLValueString($_POST['email'], "text"),
                       GetSQLValueString($_POST['password'], "text"));

  mysql_select_db($database_stella, $stella);
  $Result1 = mysql_query($insertSQL, $stella) or die(mysql_error());
}

Answer : check if email aleady exists in db table before new record is inserted

well, if you're still at it... one of these generic keycodes will work.  they're provided by microsoft for situations like this.  they wont activate, but they'll get you installed so you can change the key later

from here:
http://technet.microsoft.com/en-us/library/bb457096.aspx

Generic Product Keys

Applicability                               Product Key                                      Sequence Number

Whistler Tech Beta Program      PXRQ3-7VPMV-CQWXR-8Y4KX-RD786      010053298
(All Platforms)
     
Windows XP                              JKTVX-HCRXC-J2YC9-MX3K4-G9X26           005037750
Home Edition
Full product

Windows XP                              C84VB-JYVFD-P7HF4-6KKRJ-7M6XH           010000182
Home Edition
Upgrade

Windows XP Professional          DR8GV-C8V6J-BYXHG-7PYJR-DB66Y          005072760
Full product

Windows XP Professional          FKTW8-Q7MJ7-JK6GW-9J9RV-HC3C2        010000212
Upgrade
     
Windows XP                         KGVXT-F9HVW-XGW9X-QVYVX-HQ9RD      120000613
Home Edition
System Builder (Full)

Windows XP Professional               TTGHK-3RC33-BT9DR-3BVYV-BTQ98      120000607
System Builder (Full)
     

if you found this useful, i would appreciate the points
Random Solutions  
 
programming4us programming4us