Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

value in text box

General discussions related to php

Moderators: macek, egami, gesf

value in text box

Postby superman » Thu Jul 10, 2003 9:33 pm

how 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.
superman
New php-forum User
New php-forum User
 
Posts: 36
Joined: Fri Jun 27, 2003 11:54 pm

Postby frogrocker » Thu Jul 10, 2003 10:20 pm

presuming you mean changing the value in a database, this can be done easily in Dreamweaver...

There is a change record command... this requires a form, and you can make a record set, and then drop the bindings onto the forms, to make 'dynamic initial values'..

However, if you aren't using DW, I can't really help.
User avatar
frogrocker
New php-forum User
New php-forum User
 
Posts: 98
Joined: Mon Jul 07, 2003 10:30 pm
Location: Manchester

Re: value in text box

Postby swirlee » Fri Jul 11, 2003 5:47 am

superman wrote:how 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.


Presuming you've stored value somewhere, then the user clicks on Edit you need to send them to a script where:

1. The stored value is retrieved and put into a variable, e.g. $myval
2. The value is displayed in a form text field, like so:

Code: Select all
<?
   echo '<input type="text" name="mynewval" value="' . $myval . '">';
?>


3. When the user submits the form, the form data is sent to another script which updates the stored data with the new value.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby superman » Sun Jul 13, 2003 7:09 am

thank you
superman
New php-forum User
New php-forum User
 
Posts: 36
Joined: Fri Jun 27, 2003 11:54 pm


Return to PHP General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.