Display values from a table to a text zone in html
Moderator: General Moderators
-
phpDVWeaver
- Forum Commoner
- Posts: 28
- Joined: Sun Apr 29, 2007 11:00 pm
Display values from a table to a text zone in html
I do have an set of data in a mysql query. is there any way to assign these values to a set of text zone in an thml page
Thanks
Thanks
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: Display values from a table to a text zone in html
No.phpDVWeaver wrote:I do have an set of data in a mysql query. is there any way to assign these values to a set of text zone in an thml page
Thanks
But if you had a set of data in your MySQL result, and tried to add those values into a textarea on an HTML page, then maybe.
-
phpDVWeaver
- Forum Commoner
- Posts: 28
- Joined: Sun Apr 29, 2007 11:00 pm
Sorry if I did not explain enough.
I have a website where I enter info regarding student, and then save it in a mysql database.
I am trying to design a page to update rcords. Meaning Once I logon, a Mysql query is executed to select all the info where the logon is right.
What I want is once this query is run. I want to display it in the HTML form that I used to enter this data at first time.
Thanks
I have a website where I enter info regarding student, and then save it in a mysql database.
I am trying to design a page to update rcords. Meaning Once I logon, a Mysql query is executed to select all the info where the logon is right.
What I want is once this query is run. I want to display it in the HTML form that I used to enter this data at first time.
Thanks
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
-
phpDVWeaver
- Forum Commoner
- Posts: 28
- Joined: Sun Apr 29, 2007 11:00 pm
I already Have the logon form and the query that select a set of information if the logon is right.
I need to assign this set of information to a temporary set of variables, and then assign this set of temporary variables to the text zone inputs that used to enter this information initialy.
any idea.
Thanks
I need to assign this set of information to a temporary set of variables, and then assign this set of temporary variables to the text zone inputs that used to enter this information initialy.
any idea.
Thanks
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
-
phpDVWeaver
- Forum Commoner
- Posts: 28
- Joined: Sun Apr 29, 2007 11:00 pm
thanks for the reply.
the query is working.
to asign the result of the query to the taxt zone. I wa thinking of something similar to :
<input type="text" name="fname" style="background-color: #cccccc; font-size: 16px" size="30" maxlength="30" value= "<?php $_POST['fname']?>;">
the problem with this is that it does not take in consideration the database..
any idea?
thanks again.
the query is working.
to asign the result of the query to the taxt zone. I wa thinking of something similar to :
<input type="text" name="fname" style="background-color: #cccccc; font-size: 16px" size="30" maxlength="30" value= "<?php $_POST['fname']?>;">
the problem with this is that it does not take in consideration the database..
any idea?
thanks again.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Query the database. Use the result as an array that is fed into the form fields.
Code: Select all
<?php
// I'll leave it up to you to get here
$member = mysql_fetch_array($result);
?>
<input type="text" name="memberName" value="<?php echo $members['memberName']; ?>" />- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
-
phpDVWeaver
- Forum Commoner
- Posts: 28
- Joined: Sun Apr 29, 2007 11:00 pm
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA