Please do research before asking a question.
Ether way, I suggest over all you'd visit a site called W3Schools, its very basic, but provides with pretty useful stuff.
In this case you need to add the attribute "target", to _blank If I am not mistaken. You can read about what kind of target attribute options you can do hare: https://www.w3schools.com/tags/att_a_target.asp
Since you are a new contributor, I suggest looking trough that site at minimal before going with a post.
Added the solution with explanation.
echo"<td><a href=update.php?primary=".$row['ID']."'>Update</a>";
Change it to:
echo"<td><a target='_blank' href='update.php?primary=".$row['ID']."'>Update</a>";
By the way, you forgotten to add a qoute on your href attribute, this might've been causing some problems.
The target is a "<a>"
tag attribute, its just html, echo from PHP side just acts as a renderer from php files. So whatever you put in your echo will render with HTML. Its important to add <head>
and <html>
tags so it would render like a full HTML document, just having php tags. It is wise to separate these things to make a proper framework A.K.A - using template system and leaving PHP parts to be only calculations from endpoint (Server side). I'd advise you to learn some sort of framework like Symfony based frameworks (Laravel for example). It will be a bigger hustle to learn, but you would learn it the right way and would know way more about these things from that.