Jump to content

slapdashgrim

Members
  • Posts

    51
  • Joined

  • Last visited

    Never

Posts posted by slapdashgrim

  1. Hello i am writing a code to display a link with php becuase the link has to go to a page that is named with a variable but i cant get the variable to print! i have tried many things.

    here it is

    <?php
    $m = "Grimslapdash";
    if(isset($m)){
    } else {
    print "<A href=\"$m.php\">$m</a>";
    }
    ?>

    i want it to print the link only if the variable is set. and the link will be

    <a href="$m.php">$m</a> or <a href="Grimslapdash.php">Grimslapdash</a>

     

    all it does now is print

    <a href=".php"></a>

    the variable $m is not printing

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.