質問

I have:

  <a href="settings.php?yeah=<?php echo $yeah;?> & word=<? echo $word;?">Settings</a>

and in settings php:

  <? echo $_GET['yeah'];
     echo $_GET['word'];
  ?>

The problem is that it is working only for yeah.

役に立ちましたか?

解決

You just need to remove the spaces between the variables in href :

 <a href="settings.php?yeah=<?php echo $yeah;?>&amp;word=<?php echo $word;?"> Settings </a>

他のヒント

  <a href="settings.php?yeah=<?php echo $yeah;?>&word=<?php echo $word;?">Settings</a>

remove spaces and I'm strongly recommending use <?php not just <?

You must remove the extra spaces around the '&' sign, like this:

<a href="settings.php?yeah=<?php echo $yeah;?>&word=<? echo $word;?">Settings</a

Remove space from it

<a href="settings.php?yeah=<?php echo $yeah;?>&amp;word=<?php echo $word;?">Settings</a>
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top