PHP & MySQL :- and input text fields -perlexing!!!

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default PHP & MySQL :- and input text fields -perlexing!!!



    Hi

    Could anyone help with this perplexing problem.

    When I make a form on typical text fields and try to put values into
    those fields from a Mysq query then for some reason the value passed
    gets chopped of at the first space.

    The form is meant to allow a user to change personal details and so
    what I want to do is present a form filled in with the current
    details and all a user has to do is write over the ones they want to
    change.

    BUT....

    say a person has a name PAUL JONES... getting this from the DB is no
    problem but putting it in the text field it gets chopped up at the
    first space so only the word PAUL shows up.


    DOES ANYONE KNOW WHY, AND HOW I GET AROUND THIS.


    THANKS for any HELP


    PF
    Portfar Guest

  2. Similar Questions and Discussions

    1. MySQL import gets SQL errors because of text in fields
      I'm using PHPMyAdmin on an Apache2Triad install (latest version; 5.x.x, which installs PHP5 and PHPMyAdmin5 as well). In Access, I exported a table...
    2. Create Dynamic Input Names or Input Fields in Asp
      I have a little code to add multiple items to a shopping cart based page. This code works perfect, but it adds all of the info to the same input...
    3. text input of date and timestamp fields
      I'm working on a PHP frontend for a PostgreSQL db and I'm looking for the best way to create date or timestamp inputs. Let's take a date in the...
    4. ASP & Mysql - Problem with blank text fields
      I hadn't realized I had invalid information in my mail client, I have updated it and have re-posted to provide accurate information. "Test"...
    5. DW crashing changing input text fields
      I can't duplicate that one... Have you tried re-creating yout site cache? MX is like a box of chocolates - Someone's usually eaten the good...
  3. #2

    Default Re: PHP & MySQL :- and input text fields -perlexing!!!

    Are you doing:

    <input type=text name=whatever value=<?php echo $whatever_value;?>>

    Or are you doing:

    <input type="text" name="whatever" value="<?php echo
    $whatever_value;?>">

    Notice the difference between the two; the first, having no quotes
    would mean any value with a space in it would get chopped, as you say.
    The latter, having quotes, would display the entire value for
    whatever_value, spaces and all.


    On Tue, 22 Jun 2004 22:24:26 +0100, Portfar <portfar@hotmail.com>
    wrote:
    >
    >
    >Hi
    >
    >Could anyone help with this perplexing problem.
    >
    >When I make a form on typical text fields and try to put values into
    >those fields from a Mysq query then for some reason the value passed
    >gets chopped of at the first space.
    >
    >The form is meant to allow a user to change personal details and so
    >what I want to do is present a form filled in with the current
    >details and all a user has to do is write over the ones they want to
    >change.
    >
    >BUT....
    >
    >say a person has a name PAUL JONES... getting this from the DB is no
    >problem but putting it in the text field it gets chopped up at the
    >first space so only the word PAUL shows up.
    >
    >
    >DOES ANYONE KNOW WHY, AND HOW I GET AROUND THIS.
    >
    >
    >THANKS for any HELP
    >
    >
    >PF
    eclipsboi Guest

  4. #3

    Default Re: PHP & MySQL :- and input text fields -perlexing!!!

    How big is the field in the database? is it large enough to hold the
    information being typed into the field?

    is the field set for varchar ? or ??

    "Portfar" <portfar@hotmail.com> wrote in message
    news:6d8hd0l6eooda1tpj8852nvil7elbif5d9@4ax.com...
    >
    >
    > Hi
    >
    > Could anyone help with this perplexing problem.
    >
    > When I make a form on typical text fields and try to put values into
    > those fields from a Mysq query then for some reason the value passed
    > gets chopped of at the first space.
    >
    > The form is meant to allow a user to change personal details and so
    > what I want to do is present a form filled in with the current
    > details and all a user has to do is write over the ones they want to
    > change.
    >
    > BUT....
    >
    > say a person has a name PAUL JONES... getting this from the DB is no
    > problem but putting it in the text field it gets chopped up at the
    > first space so only the word PAUL shows up.
    >
    >
    > DOES ANYONE KNOW WHY, AND HOW I GET AROUND THIS.
    >
    >
    > THANKS for any HELP
    >
    >
    > PF

    entoone Guest

  5. #4

    Default Re: PHP & MySQL :- and input text fields -perlexing!!!




    On Tue, 22 Jun 2004 21:54:54 GMT, eclipsboi <eclipsboi@hotmail.com>
    wrote:
    >Are you doing:
    >
    ><input type=text name=whatever value=<?php echo $whatever_value;?>>
    >
    >Or are you doing:
    >
    ><input type="text" name="whatever" value="<?php echo
    >$whatever_value;?>">
    >
    >Notice the difference between the two; the first, having no quotes
    >would mean any value with a space in it would get chopped, as you say.
    >The latter, having quotes, would display the entire value for
    >whatever_value, spaces and all.
    >
    >
    Thanks very much, that seems to have totally got rid of the problem.

    Thankyou fro your help, much appreciated.



    PF
    Portfar Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139