is causing the slash.
Code: Select all
<?php
$pspell_link = pspell_new("en");
if(isset($_GET['text'])) {
$words = stripslashes($_GET['text']) ; }
echo "<form method='get' action='spell.php'>";
if (isset($_GET['0'])) echo "0";
{
foreach($_GET as $key0 => $marker)
{
$value = split('[ ]', $marker );
$value0[] = $value[0] ; $value1[] = $value[1] ; echo "Value : |0| $value0 |1| $value1 |Key| $key0 <hr>";
echo "Print Value Stage 1:"; print_r($value0); print_r($value1); echo "<hr>";
}
$print = str_replace( $value0 , $value1 , $words );
}
if(!isset($_GET['0']))
{
$print = $words;
}
if (isset($_GET['check']))
{ echo "<b><i> $words </i></b><hr>";
$string = split('[ ]', $words); foreach($string as $key1 => $word)
if (!pspell_check($pspell_link, $word))
{
echo "<hr><b><i>$word</i></b><br>"; $suggestions = pspell_suggest($pspell_link, $word);
foreach($suggestions as $key2 => $suggestion)
{
$send = "$word $suggestion"; echo "<input type='checkbox' name='$key1' value='$send'>$suggestion<br>";
}
}
}
echo "<hr><textarea name='text'class='textarea' type='text/plain' rows='15' cols='40'>$print</textarea><hr>";
if(!isset($_GET['check'])) { echo "<button name='check' value='check check' type='submit'>Check Spelling</button>"; }
if(isset($_GET['check'])) { echo "<button name='done' value='done done' type='submit'>Done</button>"; }
echo "</form>";
unset($print);
?>
further if you see any other part of this code you would like to comment on please do so.