RE: [PHP] escaping HTML

From: Date: Mon, 11 Dec 2000 10:18:46 +0000
Subject: RE: [PHP] escaping HTML
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-29657@lists.php.net to get a copy of this message
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 >

« previous php.general (#29657) next »