Jump to content

[SOLVED] what's wrong with this select?


ok

Recommended Posts

can you see the problem with this codes below?

 

 

<select name="Sep29a" size="1" class="style41" id="Sep29a" style="border-style:solid; border-width:1; font-size:11">
<option selected value="0">_</option>
<option value="3/$150">3 Day</option>
<option value="4/$175">4 Day</option>
<option value="5/$200">5 Day</option>
</select>

 

the codes above don't work, could not it be the $ sign causing the problem?

 

for example --> <option value="3/$150">3 Day</option>

 

thank you.

Link to comment
https://forums.phpfreaks.com/topic/136456-solved-whats-wrong-with-this-select/
Share on other sites

shouldn't be a problem, unless you're trying to echo it with the double quotes; then it would be trying to interpret it as a variable.  But I don't see any echoes up there.  Perhaps if you were to be more specific than "it doesn't work"?

Yeah, more info would help....

 

<?php
echo '<pre>'; print_r($_POST); echo '</pre>';

?>
<form method="post" >
<select name="Sep29a" size="1" class="style41" id="Sep29a" style="border-style:solid; border-width:1; font-size:11">
   <option selected value="0">_</option>
   <option value="3/$150">3 Day</option>
   <option value="4/$175">4 Day</option>
   <option value="5/$200">5 Day</option>
</select>

<input type="submit" value="Submit"  />
</form>

 

When submitted gives me ....

 

Array

(

    [sep29a] => 5/$200

)

 

 

So that part is not a problem...

 

Even this does not present an error...

$var =  $_POST['Sep29a'];
echo "$var";

 

Nate

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.