First, an observation: the line highlighted below is correct as per your logic? This query will set the dstatus
and downloadname
fields in a row as $_POST['dstatuschange']
and $_POST['dlname']
if downloadname
field is the 'dlname'
string. Maybe you wanted to put the $_POST['dlname']
variable in your WHERE
condition?
Second, wordpress custom POSTs work much better if you use the standard wordpress way to manage them. Look at this answer to see how to handle properly a custom form submission.