Page 1 of 1

****I dont know how to do this

Posted: Fri Aug 15, 2008 1:45 am
by seyz4all
I dont know how to go about this

i have a form that i want to retrieve data, i mean some of the textfields.

on the top frame, i would i have 1 textfield
ID

and a retrieve button

user will insert the id of the data and click on the retrieve button to retrieve the data on the bottom frame.
/////////////////////////////////////////////////////////////////////////

on the botton frame, i would 5 textfields. 3 are readonly from database after retrival and 2 others are not readonly, data would be inserted into those

ID
Name (readonly)
Age (readonly)
Sex
Weight


then a button in the bottom to submit all into the database...

i tot of this and this is the solution to a small form i am creating, but i dont know how to create the script...

Please anyone that can help me write this one script, or if you have a better solution to this, i would be very grateful

Re: ****I dont know how to do this

Posted: Fri Aug 15, 2008 8:06 am
by ghurtado
seyz4all wrote: Please anyone that can help me write this one script, or if you have a better solution to this, i would be very grateful
"Help" implies that you will also be doing some of the work. Are you sure you are not asking for someone to write the whole thing for you?

Re: ****I dont know how to do this

Posted: Fri Aug 15, 2008 8:49 am
by desmi
Just like ghurtado said, everyone here is willing to help you, but you must show some effort too, write that script on your own, then if its not working, post it here, and we'll help you through it.

But the basic idea what you need is:

Text input for that ID
Submit button (Button that submits that ID to eg. query.php page)

Query.php includes:

basic mysql_query select for that ID
echoing 3 fetched readonly values
echoing 2 labels with values or not
Submit button to submit these 2 writable values into update.php

update.php includes:

mysql_query update

Re: ****I dont know how to do this

Posted: Fri Aug 15, 2008 9:08 am
by seyz4all
not all, i just want to know what to do with my textfield....
maybe its in the value that i would insert the php code to show the result or i need some ajax..., which i dont really know about..

my textfield is suppose to read from the database after a search and the retrived value inserted into another table

Re: ****I dont know how to do this

Posted: Fri Aug 15, 2008 9:37 am
by desmi
Im not really sure now what you want, but if its about where you echo the text that comes in that textbox from database:

Code: Select all

<input type="text" name="somename" value="This is where you echo what you want there to be">

Re: ****I dont know how to do this

Posted: Fri Aug 15, 2008 11:51 am
by seyz4all
thanks works fyne