473,385 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Form Filled values from mysql

32
hi Friends,


how to filled values from mysql database using php in html form.actually when user wants to edit his account.when fields filled with old details from musql database

for example :

<input type="text" name="uname" id="uname">

uname value in mysql database.how to get that name using PHP.


thanks
Jun 4 '08 #1
5 1786
vikas1111
122 100+
I am not sure regarding what you exactly want.. But i suppose this may help you.. Take a look..http://bytes.com/forum/thread797231.html
Jun 4 '08 #2
TheServant
1,168 Expert 1GB
Not sure if I understand either, but incase I do:

You need to connect to the database, and extract the field from where you want it. Like this:
[PHP]$raw_form_data = mysql_query("
SELECT uname
FROM your_table_name
WHERE another_table_value = 'your_way_to_choose'
") or die(mysql_error());
$form_data = mysql_fetch_array($raw_form_data);
[/PHP]

And then:

[PHP]<input type="text" name="<?php echo ($form_data['uname']); ?>" id="uname">[/PHP]

If this is all new to you, you should do some tutorials on MySQL and PHP. We can suggest some if you like?
Jun 4 '08 #3
apking
32
yea please suggest tutorials to me.iam new to PHP Programming.Thanks for reply theservant


apking
Jun 5 '08 #4
vikas1111
122 100+
http://www.w3schools.com/php/default.asp & php.net for php.. and mysql basics..
Jun 5 '08 #5
TheServant
1,168 Expert 1GB
yea please suggest tutorials to me.iam new to PHP Programming.Thanks for reply theservant


apking
No problem. Another good one for basics is Tizag
Jun 5 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: karolina | last post by:
Hi, I am making a small registration form about cars in three steps. The first step is to fill in member data. After filled out the member data hit "next" and enter car information. Hit "next"...
2
by: iwasinnihon | last post by:
I don't usually like to do this, but I need help. I have gone over this code and cannot figure out why it doesn't work. First of all it doesn't check to see if you have filled in the required...
5
by: Marcel | last post by:
Hello all, I am working on a generic (php) script to produce (X)HTML Forms through XML and XSL based on field-definitions stored in a database. The basic way i did HTML-forms in PHP was like...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
5
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input...
4
ak1dnar
by: ak1dnar | last post by:
Hi, I have created a PHP page that write down form data to mySQL table. Before i submit data I want to check the Input field, whether it has filled up or Not. the form should validate from the PHP...
4
by: dac | last post by:
I am quietly going insane on this project. I've never worked on a project like this one before. All my previous sticky forms were for data entry, not editing. I don't know how to display the form...
5
stepterr
by: stepterr | last post by:
Hi Everyone, I'm new to PHP and have been working on an existing from that had been in Coldfusion but needed to be converted to PHP. I have most of it working except I ran into a problem when...
10
flexsingh
by: flexsingh | last post by:
Hello there, I have a form and when data is inputted it goes into the table and I can get it out pefectly fine, the problem I have is that if the promary key is empty it will not submit, but if any...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.