Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Quick ASP/MySQL helpneeded.

Options
  • 09-12-2008 5:06pm
    #1
    Registered Users Posts: 7,405 ✭✭✭


    I have a simple form that inserts into a database. That works fine. I also have a webpage that displays the contents of the database. However, when I use the value of one of the database fields as the value of an input, if the user has entered more than one word, only the first word displays.

    So if the address value is say, 1 main street

    This will only display the 1 in the address
    Response.write "<input name=""address1"" value=" & Recordset("address1") &">"

    however this will display the full address
    Response.write "<td>" & Recordset("address1") & "</td> "


Comments

  • Registered Users Posts: 2,494 ✭✭✭kayos


    Try
    Response.write "<input name=’address1’ value=’" & Recordset("address1") & "’>"


  • Registered Users Posts: 7,405 ✭✭✭fletch


    kayos wrote: »
    Try
    Response.write "<input name=’address1’ value=’" & Recordset("address1") & "’>"
    Sorted it, thanks a million!!! :pac::pac::pac: Much appreciated


  • Registered Users Posts: 7,405 ✭✭✭fletch


    Need a bit more help. Inverted comma's in names/address seem to be breaking it.

    Example the address "2 O'Callaghans Wood"

    This will display 2 O in the address input
    Response.write "<input name='address1' value='" & Recordset("address1") & "'>"

    however this will display the full address
    Response.write " & Recordset("address1") & "


  • Registered Users Posts: 610 ✭✭✭nialo


    I usually use a find replace function on the recordset to remove this char and replace is it '. tis will take care of the problem i think.


  • Registered Users Posts: 7,405 ✭✭✭fletch


    nialo wrote: »
    I usually use a find replace function on the recordset to remove this char and replace is it '. tis will take care of the problem i think.
    Once again boards to the rescue, I was replacing all instances of ' with '', replacing it with an ' as you suggest and it works fine! :):D Thanks a million!


  • Advertisement
  • Registered Users Posts: 610 ✭✭✭nialo


    no worries.

    some of the common characters ive had issues with and what there html match is.

    " -> "
    ' -> '
    & -> &


Advertisement