Just want to do $_SERVER['PHP_SELF']
as a link with ?logout=1 appended to it.
<a href="<?php echo ''$_SERVER['PHP_SELF']'.logout=1' ?>" id="add"><input type="button" value="LOGOUT" /></a>
gives
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in F:\export\srv\www\vhosts\main\htdocs\php\assign3\m_a2_functions.php on line 90
Change:
<?php echo ''$_SERVER['PHP_SELF']'.logout=1' ?>
To:
<?php echo $_SERVER['PHP_SELF'], '?logout=1' ?>
<a href="<?php echo $_SERVER['PHP_SELF'] . '?logout=1' ?>" id="add">
have you tried:
<?php echo($_SERVER['PHP_SELF'] . "?logout=1") ?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With