Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7007747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:38:50+00:00 2026-05-27T21:38:50+00:00

I have a page where values from a table in my database are being

  • 0

I have a page where values from a table in my database are being pulled out and shown on a drop down list. Once a value is chosen and the form is submitted, every data apart from the drop down list is submitted to my mysql database. the code is as follows:

   <?
$sql="SELECT user_id, firstname FROM Users WHERE role = 'chairperson'";
$result=mysql_query($sql);

$options="";

while ($row=mysql_fetch_array($result)) {

    $id=$row["user_id"];
    $thing=$row["firstname"];
    $options.="<OPTION VALUE=\"$id\">".$thing; 
}
?>
<form action="meetingsinserted.php" method="post">
...
<tr>
    <td>      <label for="chairperson">Chairperson:</label>
</td>
    <td><span id="spryselect1">
      <select name="thing" id="chairperson">

<OPTION VALUE=0>
<?=$options?>

     </select>
      <span class="selectRequiredMsg">You Must Choose A Chairperson For This Meeting</span></span></td>
  </tr>
...

meetingsinserted.php page is as follows:

     <?php

$title = $_REQUEST['title'];
$chairperson = $_REQUEST['chairperson'];
$secretary = $_REQUEST['secretary'];
$tof = $_REQUEST['tof'];
$occurances = $_REQUEST['occurances'];

$con = mysql_connect("*********","***","****");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db('mdb_hj942', $con);

$sql="INSERT INTO Meetings (title, chairperson, secretary, tof, occurances) VALUES ('$title','$chairperson', '$secretary','$tof','$occurances')";

if (!mysql_query($sql,$con))
  {
      echo '<h1>Meeting Has Been Sent To Chairperson For Approval</h1>';
  die('Error: ' . mysql_error());
  }
?>

any ideas guys? thanks..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:38:50+00:00Added an answer on May 27, 2026 at 9:38 pm
    <select name="thing" id="chairperson">
    

    It should be

    <select name="chairperson" id="chairperson">
    

    Also, consider adding closing tag for

    <option>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my page I have a drop-down select box, with a default value of
I have a string value coming from a label in the .aspx page as
I have a dropdownlist in a page. The values of all the list items
I have the following XML: <data> <page id=1118> <itms> <values> <value>1104</value> </values> </itms> </page>
I have a table displaying results from a database, and I am adding some
I have a page with several controls. The controls are bound to display values
I have got a form that posts values to a page in a wizard.
I have a page which expects a numeric query string value. For example: Details.aspx?rgn=1234
I have a page in which I want to maintain the value of object
Let's say I have a web page that currently accepts a single ID value

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.