options form
Collapse
X
-
From where are you getting $file_name?Originally posted by crazybrumi View Posti have narrowed the problem down to this it wont work if i do it like this
but will work if i have it like this ??PHP Code:$main.="<option value=\"$file_name[0]\">$file_name[0]</option>";
but as im usingPHP Code:echo"<option value=\"$file_name[0]\">$file_name[0]</option>";
it will appear at the top of the pagePHP Code:$main.="sample";
this is from the directory index code
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:
-
how about
then usePHP Code:$main.='<option value="'.htmlspecialchars($file_name[0], ENT_QUOTES).'">'.htmlspecialchars($file_name[0], ENT_QUOTES).'</option>';
PHP Code:htmlspecialchars_decode();
Leave a comment:
-
i have narrowed the problem down to this it wont work if i do it like this
but will work if i have it like this ??PHP Code:$main.="<option value=\"$file_name[0]\">$file_name[0]</option>";
but as im usingPHP Code:echo"<option value=\"$file_name[0]\">$file_name[0]</option>";
it will appear at the top of the pagePHP Code:$main.="sample";
this is from the directory index codeLast edited by crazybrumi; 12.05.13, 23:18.
Leave a comment:
-
he just posted some lines of the code , i think he is just protecting the value of the script =).Originally posted by arnage View PostYep, 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:
-
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:
-
Originally posted by crazybrumi View Postcant seem to get list of images in directory to show as an option value in a formPHP 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/>";
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 PostTry 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:
-
Try to add capture() in option value tag?
Im by phone now and i can't write some chars.
Leave a comment:
-
options form
cant seem to get list of images in directory to show as an option value in a formPHP 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/>";
capture is the the function that searches directory.Tags: None
Leave a comment: