Jump to content

Compare data


tyra

Recommended Posts

Hi guys!

 

Text input file looks like this: Code:

<?php 

if($_POST['text'] != null){ 
echo 'Entered text: '.$_POST['text']; 
  }else{ 
echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post">Enter text:<input type="text" name="text"><input type="submit" value="Submit"></form>'; 
    } 
?>

 

 

But how to double it and then set to compare eachothers submitted data ?

 

The goal is to have 2 textareas. Area1, area2 where text entered to area2 is compared with text from area1 and text entered to area1 is compared with text from area2. Differences will be marked bold after submitting.

exaple:

before submiting:

textarea1: NASA

textarea2: NASCAR

after submiting:

textarea1: NASA

textarea2: NASCAR

Link to comment
https://forums.phpfreaks.com/topic/154570-compare-data/
Share on other sites

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.