Re: missing first chareacter after "
From: purmar (emilpu_at_post.cz)
Date: 05/07/04
- Next message: Dave: "Poll System"
- Previous message: Chris Hope: "Re: Content Managment Systems in PHP"
- Next in thread: Andy Hassall: "Re: missing first chareacter after ""
- Reply: Andy Hassall: "Re: missing first chareacter after ""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 07 May 2004 00:52:52 GMT
OK. I tried everything, escape, no escape... Looks like the problem in in
the "=" sign. For some reason always two characters after = are missing.
Could somebody tell me why?
This: (I am trying different ways)
---------------------------------------------
if ($diatery1 == "Y")
{$html .= " <tr>
<td>Dietary Restrictions2</td>
<td><input type='text' name='$diatery2' size='30' value='none'></td>
</tr>\n";
}
if ($studOrg1 == "Y")
{
$html .= " <tr>\n";
$html .= " <td>Student Organization/School</td>\n";
$html .= " <td><input type='text' name='";
$html .= $_POST['studOrg2'] ;
$html .= "' size='30'></td> \n";
$html .= " </tr> \n\n";
}
-------------------------------------
gives me this:
--------------------------------------
<tr>
<td>Dietary Restrictions2</td>
<td><input type=ext' name=xtc1RUDFC1' size=0' value=one'></td>
</tr>
<tr>
<td>Student Organization/School</td>
<td><input type=ext' name=xtc1RUDFC4' size=0'></td>
</tr>
-----------------------------------------
I tried different methods, but nothing. What is going on? Well, I am quite
a newbie, so I may not see something. Can anybody?
Thanks
Purmar
"Mark Kuiphuis" <maluka@remove_this.koekeloekoe.nl> wrote in message
news:c6ihmi$2lf$1@reader08.wxs.nl...
> Paul Delannoy wrote:
> > purmar a écrit:
> >
> >> Hello everybody,
> >>
> >> can anybody tell me what I am doing wrong?
> >>
> >> I have a form which once submited, comes to my email as an html
> >> attachement.
> >> I have some html code in it. Here is example:
> >>
> >> $html .= "<form method=\"POST\" action=\"##pcLink##\">\n";
> >>
> >> For some reason this comes to my email as:
> >>
> >> <form method=OST" action=#pcLink##">
> >
> >
> > Try :
>
> !! ------> > $html .= '<form method=\"POST\" action=\"##pcLink##\">\n';
>
> > or perhaps
> > $m='"POST"';
> > $a='"##pcLink##"';
> > $html .= "<form method=$m action=$a>\n";
>
> Why would you escape the " in method=\"POST\" when you already say that
> the string is in between single quotes '' and not in between double
> quotes ""
>
> No escape needed in the following cases:
>
> $string = '<form method="post" action="action.php">';
> or the other way round:
>
> $string = "<form method='post' action='action.php'>";
>
> Quote escaping is needed here:
>
> $string = "<form method=\"post\" action=\"action.php\">";
>
> or:
>
> $string = '<form method=\'post\' action=\'action.php\'>';
>
> To make code more readable I would suggest only use the first two
> declarations.
>
> I'd also like to know why you would have the form-tag in your e-mail
> message?
>
> Mark
- Next message: Dave: "Poll System"
- Previous message: Chris Hope: "Re: Content Managment Systems in PHP"
- Next in thread: Andy Hassall: "Re: missing first chareacter after ""
- Reply: Andy Hassall: "Re: missing first chareacter after ""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|