****I dont know how to do this

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
seyz4all
Forum Newbie
Posts: 3
Joined: Mon Jan 21, 2008 7:57 am

****I dont know how to do this

Post 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
User avatar
ghurtado
Forum Contributor
Posts: 334
Joined: Wed Jul 23, 2008 12:19 pm

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

Post 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?
desmi
Forum Commoner
Posts: 64
Joined: Sun Jun 15, 2008 4:55 am

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

Post 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
seyz4all
Forum Newbie
Posts: 3
Joined: Mon Jan 21, 2008 7:57 am

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

Post 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
desmi
Forum Commoner
Posts: 64
Joined: Sun Jun 15, 2008 4:55 am

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

Post 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">
seyz4all
Forum Newbie
Posts: 3
Joined: Mon Jan 21, 2008 7:57 am

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

Post by seyz4all »

thanks works fyne
Post Reply