View Single Post
  #10   Spotlight this post!  
Unread 28-06-2004, 19:46
Joshua May's Avatar
Joshua May Joshua May is offline
Go Bears!
FRC #1110 (Binary Bulldogs)
Team Role: College Student
 
Join Date: Nov 2003
Rookie Year: 2003
Location: Berkeley, CA
Posts: 1,306
Joshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond repute
Send a message via AIM to Joshua May
Re: PHP, MySQL, and Dropdown lists

Quote:
Originally Posted by Raven_Writer
Well, I figured I'd do that part inputing the stuff I wanted manually.

But a new question has arisen.

My question now is, I need to get the value from the field after clicking on the submit button. Here's my code:

So, let's say the user chooses TV, and the belt owner's name is Ted. I'd like it to output "Teddy" into the input box.

Mainly, I just need to select the correct belt from the table, and output who owns it so far.

I don't mean to be seeming like I'm asking how to do this whole thing, I've just been working on this for the whole day, and it's starting to get underneath my skin here.

** PS: I know it sounds like wrestling here, I'm helping a friend on a summer project **
Here's a link to a news posting script that I wrote.

NOTE: This news script cannot be used directly, there are still a few errors.

If you look at the code under the if($action == "edit") section, you will see where a form is outputted. The following is a line of code from that, the name of the variable is modified for clarity:
PHP Code:
echo "<input type=\"text\" size=\"20\" name=\"name\" value=\"".$name."\">\n"
Using the "value" part of the HTML input tag, you can output data into an input box. Just use some PHP code previously to get the data from the table. Then, you can allow the user to rewrite the data in the input box, and press the Submit button, you can then use more PHP code to write the new value into the MySQL database. I think this should cover it.
__________________
The FIRST Wiki - openFIRST - Ultimate Robot Challenge - URC Wiki
I currently have 50 GMail invites, PM or email me for one.
UC Berkeley Class of 2009

2005 Las Vegas Regional Autodesk Visualization Award
2005 Las Vegas Regional #8 Seeded Alliance with 988 and 1505
2006 Southern California Regional #15 seed

Last edited by Joshua May : 28-06-2004 at 19:54.