Jump to content

Getting data uning a form


nisroc

Recommended Posts

Im trying to get a field to display on the same page by using a mysql table and a form a drop down menu / submit button. The drop down menu is populated with the names fields within the table. When I hit the submit button I want the dynamic data returned for that specific name. I am not sure how to get the forum to react this way. Any help please im very lost here

[code]<form id="appview" name="appview" method="post" action="get">
  <select name="select">
    <?php
do { 
?>
    <option value="<?php echo $row_appview['gamename']?>"><?php echo $row_appview['gamename']?></option>
    <?php
} while ($row_appview = mysql_fetch_assoc($appview));
  $rows = mysql_num_rows($appview);
  if($rows > 0) {
      mysql_data_seek($appview, 0);
  $row_appview = mysql_fetch_assoc($appview);
  }

?>
  </select>
  <input type="submit" name="Submit" value="Submit" />
</form>[/code]
Link to comment
Share on other sites

Let me get this correct.

Pass 1. You want a user to click on an item from a select-box that is populated from the database (with $row_appview['gamename').
Pass 2. After submit you want to display some other items (depending on the selected gamename) from the database to the user.

Does that sum up your problem?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.