Flying Sagittarius Posted August 12, 2008 Share Posted August 12, 2008 I'm making a small RPG. One of my early hurdles is this code; it won't substitute a value in for the variable, it ignores it. <?php $_POST["name"] = $name; $_POST["command"] = $command; $_POST["target"] = $target; $str = $name.' used '.$command.' on '.$target.'!'; ?> any way to make it work? Quote Link to comment Share on other sites More sharing options...
ratcateme Posted August 12, 2008 Share Posted August 12, 2008 you are assign them the wrong way round try this <?php $name = $_POST["name"]; $command = $_POST["command"]; $target = $_POST["target"]; $str = $name.' used '.$command.' on '.$target.'!'; ?> Scott. Quote Link to comment Share on other sites More sharing options...
Flying Sagittarius Posted August 12, 2008 Author Share Posted August 12, 2008 D'oh! Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.