I have a select element whose name is dotted (e.g. name = "select.first") and I have troubles getting its value with $_POST['select.first'].
Is it because of the dotted name? Is there a way of fixing this while keeping the dotted name?
I have a select element whose name is dotted (e.g. name = select.first )
Share
From the HTML specs
So it’s perfectly valid in HTML. PHP converts names with
.to_as detailed in the documentation.This is the default behaviour, i’m not sure there’s a way around it except to either use underscore on both the server and client or to use
.on the client and_on the server.I would use the former for consistency sake.