![]() |
|
#1
|
|||
|
|||
value in text boxhow can i show the value in the input text box when i click edit from the previous form? so i can edit the value. thanx a lot.
|
|||
|
#2
|
|||
|
|||
|
Pretty simple, you just slot the values back into the form, like so:
<input type="text" name="data" value="$_POST['data']"> or something like that. The value attribute fills in the text box with a default value. Also for radio buttons and checkboxes to be selected by default, the syntax is: <input type="radio" name="male" checked="checked"> Garth Farley |
|
#3
|
|||
|
|||
menu??the problem is the menu can't display the value when I click the edit button from the previous form.
I know the the text field is <value="<? echo $name ?>"> but how about the menu? <select name="State" value="<? echo $state ?>"> ?????? |
|
#4
|
|||
|
|||
|
Skyloon,
How is your site set up? Is your menu part of the same page as the form with the edit button (or an included script)? Anyway, if you submit the form to the same page again (<form action="<?php echo $PHP_SELF; ?>" method="post">) upon clicking your Edit button, then to read and output the submitted values you could use the following format that I've been using: <select name="State" value="<? echo "$_POST['state']"; ?>"> Let me know if it works, samtediou |
|
#5
|
|||
|
|||
|
i click the submit button from the previous form, not from the same form
|
|
#6
|
|||
|
|||
|
Is it specifically the Select dropdown-y form element you are trying to have set?
Here's how to place a default: Code:
To have your PHP script be able to set a preset value, you'd have to put an if statement into each option. Like : PHP Code:
Note, if it is a multiple select, $_GET['dropdown'] will be an array! So you'll have to check each element in the array against the options in the SELECT. GF |
|
#7
|
|||
|
|||
|
thank you
|
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CD Burner Help - Power Calibration Error.... | JonBoy420 | Computer Hardware Forum | 111 | 19-Feb-2009 04:54 |
| CD Buring Failed | skanth2000 | Computer Hardware Forum | 1 | 15-Nov-2003 04:52 |
| text field problm | zuzupus | Web Design Forum | 3 | 04-Sep-2003 06:18 |
| Placing Flash/Images/Grapics inside TEXT with DHTML CSS Style Filteres | 000 | Web Design Forum | 1 | 24-May-2003 12:25 |
| Scrolling Text Ads - Free advertising on other peoples sites | jrobbio | Advertising & Affiliates Forum | 0 | 19-Feb-2003 01:00 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The