Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,423 members, 7,812,242 topics. Date: Monday, 29 April 2024 at 10:34 AM

If Already Exist PHP - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / If Already Exist PHP (651 Views)

What Is The Future Of Everyknows Like Where Quora Exist / Google+ Nolonger Exist, Here Is How To Access Your Deleted Profile Information / Breaking News: Seun Osewa Does Not Exist (2) (3) (4)

(1) (Reply) (Go Down)

If Already Exist PHP by skyhighweb(m): 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)

Please I Need Help From Older Bloggers. / Get Your Ecommerce Website Today 18k Only /

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.