Re: escaping HTML

From: Date: Mon, 11 Dec 2000 10:26:46 +0000
Subject: Re: escaping HTML
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-29660@lists.php.net to get a copy of this message
You're not having problems escaping quotes... you're having problems because there's no command to tell PHP what to do with those lines of HTML code... you need some echos in there if you're going to enclose the whole thing in <?php ?>. ...but then the <? print ... ?> commands won't work like they used to, and you'll need to change those to be concatenated on to the HTML strings... ie: echo "<input type=\"text\" name=\"whatever\" value\"" . $value . "\">"; Toby Butzon [ criticism spurs improvement ] ----- Original Message ----- From: "Jim Carey" <ozbcoz@optushome.com.au> To: "magnus" <reduct@asa.de>; <php-general@lists.php.net> Sent: Monday, December 11, 2000 5:18 AM Subject: RE: [PHP] escaping HTML : how about ? : : <?php : $sess_name = session_name(); : $sess_id = session_id(); : print (" : <form action='test1.php' method='post'> : <input type='hidden' name='$sess_name' value='$sess_id'> : <input type='submit' value='submit'> : "); : ?> : : Jim Carey : www.OZbcoz.com : Premium Domain Services : : : > -----Original Message----- : > From: kando@mx1.optushome.com.au [mailto:kando@mx1.optushome.com.au]On : > Behalf Of magnus : > Sent: Monday, 11 December 2000 9:18 PM : > To: php-general@lists.php.net : > Subject: [PHP] escaping HTML : > : > : > Hello, : > : > <form action="test1.php" method="post"> : > <input type="hidden" name="<?php print session_name(); ?>" value="<?php : > print session_id(); ?>"> : > <input type="submit" value="submit"> : > : > This works fine to pass SID. But I'm having a problem escaping quotes : > inside : > php tags. At least, I know the following is not correct. : > : > <?php : > <form action=\"test1.php\" method=\"post\"> : > <input type=\"hidden\" name=\"<?php print session_name(); ?>\" : > value=\"<?php : > print session_id(); ?>\"> : > <input type=\"submit\" value=\"submit\"> : > ?> : > : > Thanks for any help, : > : > Magnus : > : > -- : > PHP General Mailing List (http://www.php.net/) : > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net : > For additional commands, e-mail: php-general-help@lists.php.net : > To contact the list administrators, e-mail: php-list-admin@lists.php.net : > : : -- : PHP General Mailing List (http://www.php.net/) : To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net : For additional commands, e-mail: php-general-help@lists.php.net : To contact the list administrators, e-mail: php-list-admin@lists.php.net : :

« previous php.general (#29660) next »