Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #696

Re: PHP query

From Robin Hounsome <robin@hounsome.org.uk>
Subject Re: PHP query
Newsgroups comp.sys.acorn.programmer
Date 2011-09-07 21:29 +0100
Message-ID <520f2847dbrobin@hounsome.org.uk> (permalink)
References <aaf1210f52.Alan.Adams@laptop.adamshome.org.uk>
Organization None

Show all headers | View raw


In article <aaf1210f52.Alan.Adams@laptop.adamshome.org.uk>,
   Alan Adams <alan@adamshome.org.uk> wrote:
> I am having problems dealing with input data containing the single 
> quote character '

[snip]

> $readtest=$_POST["readtest"];
            ^^^^^^^^^^^^^^^^^^
> echo "<br>readtest=$readtest <br>\n";
> echo "<form method=POST action='readtest2.php'>\n";
> echo "<input type='text' name='display' value='$readtest'>\n";
                                                ^^^^^^^^^^^
Try this

$readtest=stripslashes($_POST["readtest"]);

echo "<input type='text' name='display' value=\"$readtest\">\n";

Um... untested

Robin

-- 
Remote - http://www.hounsome.org.uk
TV display software for the Iyonix

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

PHP query Alan Adams <alan@adamshome.org.uk> - 2011-09-07 20:20 +0100
  Re: PHP query Robin Hounsome <robin@hounsome.org.uk> - 2011-09-07 21:29 +0100
  Re: PHP query Frank de Bruijn <zuiderduin@hotmail.com> - 2011-09-08 07:48 +0200
    Re: PHP query Alan Adams <alan@adamshome.org.uk> - 2011-09-08 20:49 +0100
      Re: PHP query Matthew Phillips <spam2011m@yahoo.co.uk> - 2011-09-08 22:09 +0100
        Re: PHP query Alan Adams <alan@adamshome.org.uk> - 2011-09-08 23:05 +0100
        Re: PHP query "John Williams (News)" <UCEbin@tiscali.co.uk> - 2011-09-10 00:47 +0200
          Re: PHP query Matthew Phillips <spam2011m@yahoo.co.uk> - 2011-09-13 20:46 +0100
            Re: PHP query "John Williams (News)" <UCEbin@tiscali.co.uk> - 2011-09-13 22:03 +0200
        Re: PHP query Alan Adams <alan@adamshome.org.uk> - 2011-09-13 22:39 +0100

csiph-web