Re: Double quotes and HTML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try the following...

<?php
if (isset($_POST["user_id"]))
        echo "<br><input type='text' name='user_id' size='40' maxlength='15' value='".$_POST["user_id"]."'>";
else
        echo "<br><input type='text' name='user_id' size='40' maxlength='15'>";
?>

... you just need to come out of the string and back into PHP code. You can do it within the string but I prefer to separate my PHP from strings so that I know where the logic is.

Tryst

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux