Re: RE: [PHP] Variable Problem

From: Date: Wed, 05 Feb 2003 22:41:34 +0000
Subject: Re: RE: [PHP] Variable Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134501@lists.php.net to get a copy of this message
you can do: echo <<<BLOCK //any valid html code here <input type="sent" value=\"sent\"> BLOCK; it is easier if you have a form or large amounts of code to echo/print to the screen with vars and stuff to use the echo <<< stuff its pretty cluttered and its harder to use print or echo for every line of code you need to echo...specially if there are 300 lines of code a block... ----- Original Message ----- From: "Leonard Burton" <lbburt0@pop.uky.edu> To: "Sierra Times.com" <citizen@mindspring.com>; <php-general@lists.php.net> Sent: Wednesday, February 05, 2003 4:16 PM Subject: Spam: RE: [PHP] Variable Problem > You need to put quotes around the vars. > > If I were you I would do this: > > print "<input type=text name=sent value=\"$sent\">"; > print "<input type=text name=name value=\"$name\">"; > > > You need the quotes. > > Leonard. > www.phpna.com > > -----Original Message----- > From: Sierra Times.com [mailto:citizen@mindspring.com] > Sent: Wednesday, February 05, 2003 3:41 PM > To: php-general@lists.php.net > Subject: [PHP] Variable Problem > > > I have a variable that get's chopped off at the %20 character. > > In the form page I have: > <b>From: <?= $name;?> > <br>E-mail address: <?= $email;?><br> > <?= $sent;?></b></font></td> > > $sent and $name shows up fine, but immedieately I added (for testing) > > <input type="text" name="sent" value=<?= $sent;?>> > <input type="text" name="name" value=<?= $name;?>> > > this statement shows a text box, with only the first word before the space > charcter "%20" is shown, and is fact the only data that is submitted upon: > <form action="<?=$PHP_SELF;?>" method="post"> > > Can someone assist me? > > J.J. Johnson > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003

« previous php.general (#134501) next »