I am trying to build a multi-param query string, but I get a 500 error when I try to run this in production. To me it get's quite difficult knowing where to place a '
and a "
but I am sure the more I php code the easier it will become.
Below is my syntax - what should be changed so that this becomes valid syntax? (all variables are declared in the script)
<td><a href="Test.php?emp='.$Row['Employee Name'].
'"&hiredate=" . $hiredate
'"&terminationdate=" . $termdate
'">'.$Row['Number Of Abscences'].'</a></td>
I suggest to use sprintf/vsprintf:
vsprintf('<td><a href="Test.php?emp=%s&hiredate=%s&terminationdate=%s">%s</a></td>',[$Row['Employee Name'],$hiredate,$termdate,$Row['Number Of Abscences']])
Is much more readable and easiet to maintain \