Re: missing first chareacter after "

From: purmar (emilpu_at_post.cz)
Date: 05/07/04


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



Relevant Pages

  • Re: strip- vs addslashes
    ... I recommend not to use addslashes to escape DB queries - please use specific ... them (a single quote becomes two single quotes, ... That's why people often stripslashesthe input data. ...
    (comp.lang.php)
  • Re: Problems with directory names containing square brackets
    ... MSH> 'foo`nbar' ... The proposed fix is to completely ignore escape sequences in single quotes. ...
    (microsoft.public.windows.server.scripting)
  • Re: How to delete the following file
    ... | hyphen was misinterpreted by the shell as an option. ... then escaping the offending character (the ... Inside single quotes the backslash is not an escape. ...
    (RedHat)
  • Re: addslashes, mysql_real_escape_string or magic_quotes_gpc?
    ... apostrophes and single quotes as this breaks the mysql query string. ... I obviously need to escape these characters - magic_quotes_gpc sounds ... What if using it elsewhere requires a different kind of escaping (like ...
    (comp.lang.php)
  • Re: tab & other character in ssh
    ... i m firing grep command through ssh on remote machine. ... You need to escape those characters. ... Single quotes should do it: ...
    (comp.security.ssh)