Results 1 to 7 of 7

Thread: Input field questions

  1. #1
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default Input field questions

    What about the url field, I have this as a shops directory, some dont have a url, and as I have "http://" to remind people to use it in the input field, those with no url will show with only "http://"
    so how can I hide if only that is showing?

    TIA

    Hani

  2. #2
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default

    Hi again
    I tried:

    <%if $url %> = "http://"
    dont show nothing
    <%else%>
    <$url%><%/if%>

    but got an error
    also, how to set url field to not rquired?

    Thanx

  3. #3
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Posts moved from http://www.nicecoder.com/community/s...ead.php?t=6159

    <%if $url %> = "http://" <- no idea what that is supposed to be, but that's not how an IF statement works. The IF statement works with what is inside the % signs. So if something like this would work it would be if $url=http://

    But then why not just make it easier on yourself and remove the empty URL's from the database? That would be so much simpler.

    Look at the bottom of this thread to see how to remove the requirement for entering a URL http://www.nicecoder.com/community/s...ad.php?p=24300

  4. #4
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default

    Quote Originally Posted by Bruceper View Post
    But then why not just make it easier on yourself and remove the empty URL's from the database? That would be so much simpler.
    and how would I do that please?

  5. #5
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default

    Quote Originally Posted by Bruceper View Post

    Look at the bottom of this thread to see how to remove the requirement for entering a URL http://www.nicecoder.com/community/s...ad.php?p=24300
    I want to keep the field, not remove it, but for shops who dont have a website, I want them to skip it without getting the error message, or shoule I remove the lines:

    elseif (empty($url) || $url == 'http://')
    $error_msg = $msg["10102"];

    ??

    Thanx again

    Hani

  6. #6
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Actually that post and what you copied gives you your answer to the IF statement.

    if $url == 'http://'

    If you removed those two lines then the URL would not be a requirement.

    How do you remove blank http:// from your database? You edit it. I won't give you any mysql commands because if you mistype you could blow up your entire database. Download the database, edit it and reupload it.

  7. #7
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default

    Quote Originally Posted by Bruceper View Post
    I won't give you any mysql commands because if you mistype you could blow up your entire database. Download the database, edit it and reupload it.


    Yes, but downloading and uploading everynow and then would be a headache, especially with a large database and a bad connection.

    Thanx anyway

Similar Threads

  1. Yellow input boxes
    By blinks in forum v5.x
    Replies: 3
    Last Post: 07-09-2006, 07:55 AM
  2. questions
    By wild boar in forum Pre-Sales Questions
    Replies: 8
    Last Post: 04-01-2004, 12:42 AM
  3. A lot of questions...
    By Frank71 in forum Pre-Sales Questions
    Replies: 1
    Last Post: 08-23-2002, 02:34 PM

Posting Permissions

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