Author Topic: <option value="fiat" selected="selected">Fiat</option>  (Read 1053 times)

0 Members and 1 Guest are viewing this topic.

Offline dropfaithTopic starter

  • Devotee
  • Posts: 1,114
  • Gender: Male
    • View Profile
    • dropfaith Productions
<option value="fiat" selected="selected">Fiat</option>
« on: September 25, 2008, 01:27:29 AM »
how do i get
selected options from my sql using php
Code: [Select]
<select name="OpenSun">
                                                        <option value="User selected time" selected="selected">User seleted time</option>
<option value="1am">1 am
        <option value="2am">2 am
<option value="3am">3 am
<option value="4am">4 am
<option value="5am">5 am
<option value="6am">6 am
<option value="7am">7 am
<option value="8am">8 am
<option value="9am">9 am
<option value="10am">10 am
<option value="11am">11 am
<option value="12am">12 am
<option value="1pm">1 pm
        <option value="2pm">2 pm
<option value="3pm">3 pm
<option value="4pm">4 pm
<option value="5pm">5 pm
<option value="6pm">6 pm
<option value="7pm">7 pm
<option value="8pm">8 pm
<option value="9pm">9 pm
<option value="10ppm">10 pm
<option value="11pm">11 pm
<option value="12pm">12 pm
</select>

Offline ratcateme

  • Devotee
  • Posts: 1,207
  • Gender: Male
    • View Profile
Re: <option value="fiat" selected="selected">Fiat</option>
« Reply #1 on: September 25, 2008, 01:36:24 AM »
$_GET['OpenSun'] or $_POST['OpenSun'] if your form use post instead of get

Scott.

Offline dropfaithTopic starter

  • Devotee
  • Posts: 1,114
  • Gender: Male
    • View Profile
    • dropfaith Productions
Re: <option value="fiat" selected="selected">Fiat</option>
« Reply #2 on: September 25, 2008, 01:40:47 AM »
problem is i need to do this for 14 different values opensun closesun and so on for all 7 days is there a tutorial anywhere on this ?

Offline ratcateme

  • Devotee
  • Posts: 1,207
  • Gender: Male
    • View Profile
Re: <option value="fiat" selected="selected">Fiat</option>
« Reply #3 on: September 25, 2008, 01:53:17 AM »
i think you would find that is the easiest you just have to write out the same code like 14 times.

Scott.

Offline dropfaithTopic starter

  • Devotee
  • Posts: 1,114
  • Gender: Male
    • View Profile
    • dropfaith Productions
Re: <option value="fiat" selected="selected">Fiat</option>
« Reply #4 on: September 25, 2008, 02:03:11 AM »
how would get work from the mysl tho??

im kinda learning php as  i go here

Offline dropfaithTopic starter

  • Devotee
  • Posts: 1,114
  • Gender: Male
    • View Profile
    • dropfaith Productions
Re: <option value="fiat" selected="selected">Fiat</option>
« Reply #5 on: September 25, 2008, 02:05:07 AM »
<?php echo $_GET["name"]; ?> i understand the get  echoed out but why use get i need the result from a mysql database which ive never used get for anything except getting things from the url (which i thought was the only thing it did)