Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with duplicate entry of data #4

Open
Mystical-16 opened this issue Jan 12, 2022 · 5 comments
Open

problem with duplicate entry of data #4

Mystical-16 opened this issue Jan 12, 2022 · 5 comments

Comments

@Mystical-16
Copy link

Mystical-16 commented Jan 12, 2022

Duplicate entry of data is taking place on refreshing the page while updating the data.
please let me know the solution to this asap!

problem project (2)

@Jprashant08
Copy link

Can you please elaborate, in what part you're getting error like in PHP or in specifically in Database?

@Jprashant08
Copy link

$query=mysql_query("SELECT * FROM emptype WHERE typename = '$emptype' AND typedesc='$typedesc') or die(mysql_error());

if (mysql_num_rows($query)<=0)
{
$query=mysql_query("insert into emptype(typename,typedesc)values('$emptype','$typedesc')")or die("<script>alert('Error');</script>");
/* See if it helps */

@bofa26
Copy link

bofa26 commented Apr 24, 2023

has this been fixed'

@Jprashant08
Copy link

Jprashant08 commented Apr 24, 2023 via email

@rinae-del
Copy link
Contributor

The best way is to refresh the page after updating the data. You can do this by first checking if data successfully updated then adding header('location: currentpage.php')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants