Re: Is there an alternative to double quotes?
| From: | Philip Hallstrom | Date: | Wed, 23 Oct 2002 17:15:54 +0000 |
| Subject: | Re: Is there an alternative to double quotes? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-121136@lists.php.net to get a copy of this message | ||
Why not create a hiddenInput($name, $value) function... something like:
function hiddenInput($name, $value) {
$value = ereg_replace('"', """, $value);
return("<input type=\"hidden\" name=\"$name\"
value=\"$value\">");
}
??
On Wed, 23 Oct 2002, Glen Lee Edwards wrote:
> On Wednesday 23 October 2002 09:17 am, you wrote:
> > If you are going to output a block of HTML, then simply end the PHP
> > script, output the HTML, then start-up script again:
>
> That's what I'm doing now, but it gets kind of ugly:
>
> <form action="testing.php" method="post">
> <input type="hidden" name="fname" value="<?PHP
> echo"$fname"; ?>">
> <input type="hidden" name="mname" value="<?PHP
> echo"$mname"; ?>">
> <input type="hidden" name="lname" value="<?PHP
> echo"$lname"; ?>">
> <input type="hidden" name="uname" value="<?PHP
> echo"$uname"; ?>">
> <input type="hidden" name="password"
> value="<?PHP
> echo"$password"; ?>">
> <input type="hidden" name="email" value="<?PHP
> echo"$email"; ?>">
> <input type="hidden" name="url" value="<?PHP
> echo"$url";
> ?>">
>
> This goes on for 105 lines.
>
> Regards,
>
> Glen
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>