I wanna make option edit product when user login.
Here is the link when user click edit on the web.
<a href="edit.php?id=<?php $id=$data['gameId'];echo $id;?>" ><input type="button" value="Edit"/></a>
Then in edit page, there’s submit button, that I fill with some validation in doUpdate.php I tried to get id from URL in doUpdate.php to make an update in database (Id is the primary key, I use my sql as database) so I use this code
$id= $_GET['id'];
The problem is, why $id couldn’t take the id value from the url? How should I fixed that? (It is not hosting yet, I use localhost cause I’m still learning)
If I’m understanding you correctly the problem isn’t getting the id in edit.php, but getting the id in doUpdate.php. Presumably your edit page is POSTing date to the doUpdate page, in which case you need to do two things.
firstly inside your form on the edit page you’ll need to add a hidden element inside you formcontaining the id you want to pass to doUpdate.php
and then in doUpdate.php fetch it from the $_POST global