Jump to content

phpretard

Members
  • Posts

    821
  • Joined

  • Last visited

    Never

Posts posted by phpretard

  1. I have 2 arrays:

    I need to compair the values, pull out the values that match an then make a seperate array for matching values.

     

    
    Array ( [0] => 41bab296a65b71736b464f8aff39b342 [1] => 41bab296a65b71736b464f8aff39b342 [2] => 66251a6dd00d06827bb7c2e3c01bcf08 ) 
    
    Array ( [0] => 07c38f09cdbd199bb39282667360b817 [1] => 66251a6dd00d06827bb7c2e3c01bcf08 [2] => 74134b63b6d0dbbf4f0157aafab505b6 ) 
    
    So the new array would be:
    
    Array ( [0] => 66251a6dd00d06827bb7c2e3c01bcf08 ) 
    
    The new array is what I can't figure out the code for.
    
    

     

    I hope someone can help!

     

    Thank you.

     

    Anthony

  2. This is hacked but it works.

     

    function DuplicateEmailCheck()
    {
    
    connect();
    
    $admin=mysql_query("select Email from profile_admin where Email='".$_POST['Email']."' ");
    $user=mysql_query("select Email from profile_user where Email='".$_POST['Email']."' ");
    $appraiser=mysql_query("select Email from profile_appraiser where Email='".$_POST['Email']."' ");
    
    $num_admin = mysql_num_rows($admin);
    $num_user = mysql_num_rows($user);
    $num_appraiser = mysql_num_rows($appraiser);
    
    $checkAll=$num_admin + $num_user + $num_appraiser;
    
    if ($checkAll > 0){
    return true;
    }
    
    mysql_free_result($admin);
    mysql_free_result($user);
    mysql_free_result($appraiser);
    
    }

     

    and it may explain what I am trying to do.

  3. I am trying to check against 3 different table for an email when a reg form is posted. 

     

    I have never done it.

     

    This is what I have:

    $dupcheck=mysql_query("SELECT Email.profile_admin, Email.profile_appraiser, Email.profile_user FROM profile_admin, profile_appraiser, profile_user 
    WHERE Email.profile_admin, Email.profile_appraiser, Email.profile_user='".$_POST['Email']."' ") or die(mysql_query());
    
    $num_Email = mysql_num_rows($dupcheck);
    
    if ($num_Email > 0){
    duplicate email
    }
    
    

     

    ...and It Doesn't Work.

     

    Thanks for your help!

  4. Why wont this work...It's driving me nuts!

     

    <?
    $string = "(232) 555-5555";
    
    if (preg_match('/^\(?[0-9]{3}\)?|[0-9]{3}[-. ]? [0-9]{3}?[0-9]{4}$/', $string)) { 
    echo "successful.";
    }else{
    echo "not successful";
    }
    
    ?>

     

    Thank you!

  5. Why wont this conect?

     

    <?
    
    $con = mysql_connect("p41mysql111.secureserver.net","jaruano","*****");
    if (!$con)
     {
     die('Could not connect: ' . mysql_error());
     }
     mysql_select_db("jaruano", $con);
    ?>

     

    the site is -serviclean inc . com-

  6. Like this?

     

    		$CheckRegistrationStatus = mysql_query("select Email, MemberID from users where Email = '".mysql_escape_string($receiver)."'");
    
    	if (mysql_num_rows($CheckRegistrationStatus) == 1) {
    		while($row=mysql_fetch_array($CheckRegistrationStatus)){
    		$ReceiverNumber=$row['MemberID'];
    		}
    		$update_preferred=mysql_unbuffered_query("update preferred_list_new set ReceiverNumber='$ReceiverNumber', Status='Active' where Key='$key' ");
    		echo $update_preferred; //<<<<<<<<
    		exit; //<<<<<<<<
    
    		redirect("index.php?ma=user_acceptinvitation");
    	} else {
    		if ($UserType == "Lender") {
    			redirect("index.php?ma=register&t=7f5b0c220104c053887a2950c204bcb3");
    		} elseif ($UserType == "Appraiser"){
    			redirect("index.php?ma=register&t=43e561fc584ef009b5ee5bbd2e6eb162");
    		}
    	}

     

    Page goes blank

  7. Why do I Get:  It's a simple update...

     

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Key='7cf93e806305aefc7495c8dca49f090f'' at line 1

     

     

    $ReceiverNumber="123456";
    $key="md5('2 emails')";
    
    
    mysql_query("update preferred_list_new set ReceiverNumber='$ReceiverNumber', Status='Active' where Key='$key' ");
    
    

     

    I can't even count how many times I've updated a database.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.