php forms

Discussion in 'PHP' started by ianlufc, Apr 22, 2008.

  1. #1
    echo "<INPUT name='msgbody' type='hidden' value='Hi '.$names.' We look forward to seeing you very soon.'>";

    Guys the above code is only post Hi as a value

    can anyone tell me whats wrong with it
    Thanks in advance
     
    ianlufc, Apr 22, 2008 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    put '/' on every value of an html property

    ie.

    echo "<input type=/"text/">";

    because the " is being recognized by php
     
    bartolay13, Apr 22, 2008 IP
  3. ianlufc

    ianlufc Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    echo "<INPUT name=/"msgBody/" type="/hidden/" value=/"Hi .$names. We look forward to seeing you very soon./">";
     
    ianlufc, Apr 22, 2008 IP
  4. fastdomains

    fastdomains Active Member

    Messages:
    409
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #4
    Code above is wrong ..
    Use this double quotation preferred :
    echo "<INPUT name='msgBody' type='hidden' value='Hi".$names." We look forward to seeing you very soon.'>";
     
    fastdomains, Apr 22, 2008 IP
  5. ianlufc

    ianlufc Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Cheers guys both ways worked

    thanks again
     
    ianlufc, Apr 22, 2008 IP