If you do not wish to use a hidden field, you could set your submit button like this:
<button type="submit" name="id" value="value">Submit</button>
Then you can catch it with $_GET['id']
.
You can have many buttons of type="submit"
with the same name (id
), and the value will be the one which was clicked, or the first one, if the form was submitted by pressing enter.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…