按钮不重定向[关闭]

I have the following line of code on my website that won't direct to the mentioned link

<?php

    echo '<input name="" type="button" onClick="location.href=\'main.php?user=\''.$_GET['user'].'" style="width: 150px; height: 150px; font-size: 36px; font-weight:bold; font-style: italic;" value="Done">';

?>

Is there anything wrong with the structure of my code?

You have placed the value outside the string, so that the code generated looks for example like this:

onClick="location.href='main.php?user='42"

This will cause a syntax error, and the code will not run.

Place the apostrophe after the value:

onClick="location.href=\'main.php?user='.$_GET['user'].'\'"

typo... you have onCick instead of onClick event ;-)