Jump to content

Echo not workingI finally got things together and now the echo is not working ca


earthone

Recommended Posts

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.

 

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

 

Thank you.

 

Here is the echo page.

 

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

 

The code of the page I am trying to echo information from

 

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

Try viewing source in your browser.

 

Or alternatively try using correct html anchor syntax so that something is displayed in a borowser:

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.