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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Quick ASP/MySQL helpneeded.

  • 09-12-2008 4:06pm
    #1
    Registered Users, Registered Users 2 Posts: 7,423 ✭✭✭


    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, Registered Users 2 Posts: 2,494 ✭✭✭kayos


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


  • Registered Users, Registered Users 2 Posts: 7,423 ✭✭✭fletch


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


  • Registered Users, Registered Users 2 Posts: 7,423 ✭✭✭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, Registered Users 2 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, Registered Users 2 Posts: 7,423 ✭✭✭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, Registered Users 2 Posts: 610 ✭✭✭nialo


    no worries.

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

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


Advertisement