Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #695
| Subject | PHP query |
|---|---|
| Newsgroups | comp.sys.acorn.programmer |
| From | Alan Adams <alan@adamshome.org.uk> |
| Date | 2011-09-07 20:20 +0100 |
| Message-ID | <aaf1210f52.Alan.Adams@laptop.adamshome.org.uk> (permalink) |
| Organization | Orpheus Internet Services |
I am having problems dealing with input data containing the single quote character ' To test this, I use the input file as follows: <html> <head></head> <body> <form method=POST action="inputtest.php"> <input type="text" name="readtest"> <input type="submit" value="test"> </form> </body> </html> The file inputtest.php contains: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Input Test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php $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"; ?> </form> </body> </html> This works file for most input, producing the typed data in both the readtest= line, and the input field. however if the input data is O'Reilly then the result shows readtest=O\'Reilly, and the input field holds O\ This is a problem, because the full application stores input in hidden text fields, and the result after these are submitted is a surname of O How can I get the full input text into another text field? (fortunately a lot of this is done within a common function, so if I fix the function, all input can be handled correctly.) Alan -- Alan Adams, from Northamptonshire alan@adamshome.org.uk http://www.nckc.org.uk/
Back to comp.sys.acorn.programmer | Previous | Next — Next in thread | Find similar | Unroll 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