₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,327,003 members, 8,428,976 topics. Date: Thursday, 18 June 2026 at 10:00 AM

Toggle theme

If Already Exist PHP - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersIf Already Exist PHP (772 Views)

1 Reply (Go Down)

If Already Exist PHP by skyhighweb(op): 7:39pm On Nov 29, 2017
hi every one, am having a bit of an issue in my already exist profile page.
The thing is if a user checks his/her profile page to reedit their profile and click save the already exist code will kick in not allowing the user to save and showing the already exist error msg for the email instead of just ignoring and should only work if the user tries to change his/her email to another email that already exist to show the error hope u understand below is the code i wrote up funny thing the code works in a weird way if i try inserting the 1st email in the column that isnt mine i get already exist but if i try others it get updated

 $query = "SELECT email FROM " . $DBPrefix . "users WHERE id = id IN (SELECT id FROM " . $DBPrefix . "users     

WHERE email = :email)";
$params = array();
$params[] = array(':email', $system->cleanvars($_POST['TPL_email']), 'str');
$db->query($query, $params);
if ($db->numrows() > 0)
{
$ERR = $ERR_115; // E-mail already used
}


THANKS
Re: If Already Exist PHP by mokoshalb(m): 8:27pm On Nov 29, 2017
Are you trying to submit a form, but don't want to update the unfilled or untouched part?

Enclose your codes in (I assume you are sending through POST):

if(isset($_POST['email_name'])){
//your code to store it in DB
} else {
//do nothing
}
Re: If Already Exist PHP by SirLakes: 10:20pm On Nov 29, 2017
mokoshalb:
Are you trying to submit a form, but don't want to update the unfilled or untouched part?

Enclose your codes in (I assume you are sending through POST):

if(isset($_POST['email_name'])){
//your code to store it in DB
} else {
//do nothing
}
Hi, can you help work on a phpbb site
Re: If Already Exist PHP by mokoshalb(m): 11:53pm On Nov 29, 2017
SirLakes:
Hi, can you help work on a phpbb site
modifications or installation.
Re: If Already Exist PHP by SirLakes: 7:10am On Nov 30, 2017
mokoshalb:
modifications or installation.
Need to add some features
1 Reply

Vacancy Exist At Aptech Ibadan Centre For The Position Of FacultiesGoogle+ Nolonger Exist, Here Is How To Access Your Deleted Profile InformationBreaking News: Seun Osewa Does Not Exist234

What Does Webhosting Mean? (meaning, How It Helps, What It Is Used For)How To Link/map Your Domainking Domain To Your Blogger BlogA Guide To Website Traffic Optimization