•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 423,579 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,435 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1899 | Replies: 4 | Solved
![]() |
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
http://www.w3schools.com/php/php_mysql_select.asp Check this. Instead of echoing $row['FirstName'] and $row['LastName'] in the example, assign it to a variable and use it as the 'value' of the textbox.
<input type="text" name="firstname" value="<?php echo $firstname; ?>"> Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
•
•
http://www.w3schools.com/php/php_mysql_select.asp Check this. Instead of echoing $row['FirstName'] and $row['LastName'] in the example, assign it to a variable and use it as the 'value' of the textbox.
<input type="text" name="firstname" value="<?php echo $firstname; ?>">
thx nav33n. but how about textboxes inside a
<?php ?> tags? do i have to echo<input type="text" name="firstname" value="<?php echo $firstname; ?>">? •
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
textbox inside <?php tags ? Yep, you have to echo it. But this way.
echo "<input type=\"text\" name=\"name\" value=\"$firstname\">"; Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
Or u can write as
php Syntax (Toggle Plain Text)
echo "<input type='text' name='name' value='$firstname'>";
Last edited by peter_budo : Mar 24th, 2008 at 7:43 am. Reason: Keep It Organized - please use [code] tags
We only have to do a very few things right in our life, so long as we don't do too many things wrong.
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
age amd avatar backup blue gene breach business chips daniweb data data protection database development dos economy energy enterprise europe government hacker hardware hp ibm ibm. news intel ibm it linux medicine memory microsoft news open source openoffice pc ps3 recession red hat russia security server sql sun supercomputer supercomputing survey technology trends ubuntu working x86
- displaying the last insert id (ASP.NET)
- Inserting Data into the database using vb.net (VB.NET)
- disable a textbox (PHP)
- database connection (PHP)
- Creating Table using SQL query from wondows Form (VB.NET)
- inserting variable value into fields in access? (Visual Basic 4 / 5 / 6)
- GridView Insert Problem (ASP.NET)
- Beginner: Insert, Update, Delete & Search records from/to sql database (ASP.NET)
- Error connecting to database (ASP.NET)
- insert datetime into the database (C#)
Other Threads in the PHP Forum
- Previous Thread: MySQL Connection Class not working
- Next Thread: missing php folder



Linear Mode