options form

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

  • crazybrumi
    replied
    ended up scraping the idea of directory index and just put everything into a sql

    Leave a comment:


  • arnage
    replied
    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;

    Leave a comment:


  • kevk3v
    replied
    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(); 

    Leave a comment:


  • crazybrumi
    replied
    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.

    Leave a comment:


  • just_m3.
    replied
    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 =).

    Leave a comment:


  • arnage
    replied
    Yep, thanks. But on second look it needs some loop also, depending what is getting with capture function, otherwise it ain't gonna work.

    Leave a comment:


  • just_m3.
    replied
    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.

    Leave a comment:


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

    Leave a comment:


  • crazybrumi
    started a topic options form

    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.
Working...
X