options form

Started on the old forum in May 2013 · view the original in the archive · old links redirect here

8 replies · 415 views · started 13 years ago · 1 min read

4 participants
crazybrumi Super moderator Principal · 1,064 posts #1
$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.

http://flagcounter.com/more/W80q

arnage Lead · 811 posts #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***
just_m3. Developer · 199 posts #3

crazybrumi wrote:

$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:

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

Like this ?:

$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/>"; 

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!

arnage Lead · 811 posts #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***
just_m3. Developer · 199 posts #5

arnage wrote: 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!

crazybrumi Super moderator Principal · 1,064 posts #6

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

$main.="<option value=\"$file_name[0]\">$file_name[0]</option>";

but will work if i have it like this ??

echo"<option value=\"$file_name[0]\">$file_name[0]</option>";

but as im using

$main.="sample";

it will appear at the top of the page

this is from the directory index code

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

kevk3v Senior · 332 posts #7

how about

$main.='<option value="'.htmlspecialchars($file_name[0], ENT_QUOTES).'">'.htmlspecialchars($file_name[0], ENT_QUOTES).'</option>';  

then use

htmlspecialchars_decode();

Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

arnage Lead · 811 posts #8

crazybrumi wrote: i have narrowed the problem down to this it wont work if i do it like this

$main.="<option value=\"$file_name[0]\">$file_name[0]</option>";

but will work if i have it like this ??

echo"<option value=\"$file_name[0]\">$file_name[0]</option>";

but as im using

$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***

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close