I finally got things together and now the echo is not working can someone tell me what I am doing wrong? The page I want to echo is working fine I just cant echo the information to another page.

Thank you.

Here is the echo page.

echo '<a href="http://mywebsite.com/index.php?text=this">';

The code of the page I am trying to echo

<?php $text = $_GET['text'];
if (!$text) {die('No text selected');}
elseif($text=='this') {echo 'This Text goes here'; }
elseif($text=='that') {echo '1'; }

Edited by valonesal: n/a

8 Years
Discussion Span
Last Post by Atli

All we are trying to do is echo the content of the sections to another page.



Rather then doing if (!$text) , try doing if (empty($text)) .

Or, better yet, design your if statements so anything you don't expect falls through to the "else" clause:

$value = trim($_GET['text']);
if($value == "somethin") {
  ehco "We got something!";
else if($value == "something else") {
  echo "No, we got something else!";
else {
  echo "We got noting.";
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.