Member Avatar for Andrew_23

Hi,
Im creating a website and i basically need to do the following.

I have a drop down menu with names in it. What I need is on the selection of one of those options in the drop down menu, that information which is wriiten into the drop down menu needs to be put into a simple table row.

I supposedly need to use php to do this but im confused, any help is appreciated.

thanks in advance

Recommended Answers

All 2 Replies

What do you mean supposedly? If you aren't sure how is anyone less going to know?

You need to get a clear understanding of what the requirement is, then give it a try and for the issue(s) you run into, post your relevant code you are having trouble width. This can be done client or server side so it depends on what you need it to do.

Member Avatar for Andrew_23

Hi Sorry,

This is new to me so I will try to explain clearly. THis is the question i have to provide an answer to in code

A timetable must be displayed when the user enters the departure point and the destination point. this page would link to another page as well, I.e. Routes.html

The process should be client side

This is the datalist i have

<datalist id="places">
    <option value="Johannesburg">
    <option value="Cape Town">
    <option value="Durban">
    <option value="Richards Bay">
    <option value="East London">
    <option value="Kimberly">
    <option value="Pretoria">
    <option value="Bloemfontein">
    <option value="Pietermaritzberg">
    <option value="Polokwane">
    </datalist>

This is the textfields where the user selects the departure point and arrival point.

<form onsubmit="return onSubmit()">
  <fieldset>
      <label>Enter Departure Point</label>

  <input list="places" id="departure" placeholder="Departure Point" size="30">

      <label>Enter Arrival Point</label>

  <input list="places" id="arrival" placeholder="Arrival Point" size="30">

    <button>Submit</button>
  </fieldset>
</form>

And finally this is the table. The information selected in the textfields should appear here

<table>
  <tr>
  <!-- These are coloumn headings -->
    <td>Departure Point</td>
    <td>Specials</td>
    <td>Arrival Point</td>
    </tr>
  <tr>

  <td>
  <!--The information selected in the textfields should appear here-->
  </td>

  <td>
  <!--The information selected in the textfields should appear here-->
  </td>

  <td>
  <!--The information selected in the textfields should appear here-->         </td>

    </tr>
</table>

I just need to understand how to print out data selected in the texfields into the table. This should happen anytime the user selects different options.

Hope that was clear enough

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.