Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'php htmlentities()'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. Hello all, I have problem about quoting texts using variable in the input tag of a form mail... Please allow me to quote my script first: <!-- File "00_test_htmldecode2.php" --> <center style="width:60%; margin:60px; padding:12px; border:solid 1px #bfbfbf;"> <?php //DEFINE VARIABLES HERE $packname = 'Beijing 10 days tour'; $packcontents = '<b>(1)</b> Direct flight to Beijing by "Boeing 747". <b>(2)</b> 3 nights at Beijing Hotel <a href="http://www.beijinghotel.cmm/" target="_blank">http://www.beijinghotel.cmm</a>.'; $packprice = 2000; $packdate = 'June 15, 2012'; ?> <table cellpadding="0" cellspacing="0" border="0" style="margin:12px;"> <form name="form" method="POST" action="/00_test_htmldecode.php"> <input type="hidden" name="pageid" value="page11"> <input type="hidden" name="packname" value="<?php echo $packname; ?>"> <input type="hidden" name="packcontents" value="<?php echo $packcontents; ?>"> <input type="hidden" name="packprice" value="<?php echo $packprice; ?>"> <input type="hidden" name="packdate" value="<?php echo $packdate; ?>"> <tr> <td align="center" valign="middle" style="padding:8px;"> <input type="submit" name="submit" value=" Click to Launch the Order Entry Form "> </td> </tr> </form> </table> </center> END QUOTE From the above code I was supposed to see only a "submit button" in an enclosed square. However, the following texts were also, but unexpectedly, displayed before the button (copied from the screen): (2) 3 nights at Beijing Hotel http://www.beijinghotel.cmm."> After some review I believe the problem is from the input tag of: <input type="hidden" name="packcontents" value="<?php echo $packcontents; ?>"> Also as a matter of fact, when the above form was submitted to a new page, only texts "(1) Direct flight to Beijing by" were displayed. My guess is that when the variable "$packcontents" was printed to the value of the input tag, the quotes in the contents of the variable have caused problems in the html rendering. Could anyone please show me how to echo a variable in the input tag that could avoid the above problems? Thanks, Cofa 1/9/2012
×
×
  • Create New...