RE: [PHP-DB] Forms error in a catalog by Greenspan & Bulger (sorr y line 33)
| From: | Rick Emery | Date: | Mon, 05 Nov 2001 14:11:42 +0000 |
| Subject: | RE: [PHP-DB] Forms error in a catalog by Greenspan & Bulger (sorr y line 33) | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-14013@lists.php.net to get a copy of this message | ||
I don't know why the example in the book uses the heredoc construct; there
appears to be no good reason.
I'd replace this:
$output = <<<EOQ
<form action="$action" $attlist>
EOQ;
with this:
$output = "<form action=\"$action\" $attlist>";
-----Original Message-----
From: Darren [mailto:Darren@dixondigital.com]
Sent: Saturday, November 03, 2001 4:28 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Forms error in a catalog by Greenspan & Bulger
(sorry line 33)
Sorry for the last post it is line 33
As follows
// string start_form ([string action [, array attributes]])
// This function returns an HTML <form> tag. If the first argument
// is empty, the value of the global Apache variable SCRIPT_NAME
// is used for the 'action' attribute of the <form> tag. Other
// attributes for the form can be specified in the optional second
// argument; the default method of the form is "post".
// The behavior of this function on servers other than Apache is
// not known. It's likely that it will work, as SCRIPT_NAME is
// part of the CGI 1.1 specification.
function start_form ($action="", $atts="")
{
global $SCRIPT_NAME;
if (empty($action)) { $action = $SCRIPT_NAME; }
$attlist = get_attlist($atts,array("method"=>"post"));
$output = <<<EOQ //this is line 33//
<form action="$action" $attlist>
EOQ;
return $output;
}
*************
Remember I'm running php3 I'm going to look at the manuel from
switching php3 to 4 and see if it mentions anything.
I'm still very new to php
Thanks
Darren
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net