options form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    options form

    PHP Code:
    $main.="HAT: <select name=\"hat\">";
    if (!empty(
    $_GET["hat"])){
    $main.="<option value=\"$hat\">$hat</option>";
    }else {
    $main.="<option value=\"\">select</option>";
    $main.="".capture("hat)."";
    }
    $main.="</select><br/>"; 
    cant seem to get list of images in directory to show as an option value in a form
    capture is the the function that searches directory.
    Want something coded email me at sales@webnwaphost.com for a prices.





    #2
    Try to add capture() in option value tag?
    Im by phone now and i can't write some chars.
    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    Comment


      #3
      Originally posted by crazybrumi View Post
      PHP Code:
      $main.="HAT: <select name=\"hat\">";
      if (!empty(
      $_GET["hat"])){
      $main.="<option value=\"$hat\">$hat</option>";
      }else {
      $main.="<option value=\"\">select</option>";
      $main.="".capture("hat)."";
      }
      $main.="</select><br/>"; 
      cant seem to get list of images in directory to show as an option value in a form
      capture is the the function that searches directory.

      What are you doing with $main ? post full code i can't know what you are trying to do with only "that" .

      Added after 6 minutes:

      Originally posted by arnage View Post
      Try to add capture() in option value tag?
      Im by phone now and i can't write some chars.

      Like this ?:

      PHP Code:
      $main.="HAT: <select name=\"hat\">"
      if (!empty(
      $_GET["hat"])){ 
      $main.="<option value=\"$hat\">$hat</option>"
      }else { 
      $main.="<option value=\"\">select</option>"
      //here list it 
      $main.="<option value=\"".capture("hat")."\">".capture("hat")."</option>"

      $main.="</select><br/>"
      Last edited by just_m3.; 12.05.13, 18:03.
      This is ten percent luck, twenty percent skill
      Fifteen percent concentrated power of will
      Five percent pleasure, fifty percent pain

      And a hundred percent reason to remember the name!

      Comment


        #4
        Yep, thanks. But on second look it needs some loop also, depending what is getting with capture function, otherwise it ain't gonna work.
        <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

        Comment


          #5
          Originally posted by arnage View Post
          Yep, thanks. But on second look it needs some loop also, depending what is getting with capture function, otherwise it ain't gonna work.
          he just posted some lines of the code , i think he is just protecting the value of the script =).
          This is ten percent luck, twenty percent skill
          Fifteen percent concentrated power of will
          Five percent pleasure, fifty percent pain

          And a hundred percent reason to remember the name!

          Comment


            #6
            i have narrowed the problem down to this it wont work if i do it like this

            PHP Code:
            $main.="<option value=\"$file_name[0]\">$file_name[0]</option>"
            but will work if i have it like this ??

            PHP Code:
            echo"<option value=\"$file_name[0]\">$file_name[0]</option>"
            but as im using
            PHP Code:
            $main.="sample"
            it will appear at the top of the page

            this is from the directory index code
            Last edited by crazybrumi; 12.05.13, 23:18.
            Want something coded email me at sales@webnwaphost.com for a prices.




            Comment


              #7
              how about
              PHP Code:
              $main.='<option value="'.htmlspecialchars($file_name[0], ENT_QUOTES).'">'.htmlspecialchars($file_name[0], ENT_QUOTES).'</option>'
              then use
              PHP Code:
              htmlspecialchars_decode(); 
              Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

              Comment


                #8
                Originally posted by crazybrumi View Post
                i have narrowed the problem down to this it wont work if i do it like this

                PHP Code:
                $main.="<option value=\"$file_name[0]\">$file_name[0]</option>"
                but will work if i have it like this ??

                PHP Code:
                echo"<option value=\"$file_name[0]\">$file_name[0]</option>"
                but as im using
                PHP Code:
                $main.="sample"
                it will appear at the top of the page

                this is from the directory index code
                From where are you getting $file_name?
                This behavior usualy happens when some function is used in which the data is not executed, should be like this for example:
                ... $var ... code;
                return $var;
                <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

                Comment


                  #9
                  ended up scraping the idea of directory index and just put everything into a sql
                  Want something coded email me at sales@webnwaphost.com for a prices.




                  Comment

                  Working...
                  X