Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
help with updating and editing a row
Old 08-05-2004, 01:33 PM help with updating and editing a row
scottsgameroom's Avatar
Super Talker

Posts: 101
Trades: 0
I basically want to be able to pull down a row and have it all be entered into text boxes and be able to update the row when i want as this is what is diesplyed on the front page. can you give me a script to do this i already have a db_connection.php so i jsut need to rest of hte script. if i coud just have one row i could sort it out from there

cheers
scottsgameroom is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-07-2004, 07:16 AM
scottsgameroom's Avatar
Super Talker

Posts: 101
Trades: 0
any help would be really apreciated! i could use it! all i need to know is how to populate text boxes etc in a form with information from a database so i can edit it and then up date the databse!
scottsgameroom is offline
Reply With Quote
View Public Profile
 
Old 08-07-2004, 08:31 AM
webwoRRks's Avatar
Ultra Talker

Posts: 426
Location: I hope so
Trades: 0
thats a whole lot of coding.... maybe this will get you started;

PHP Code:
<?php
$result 
mysql_query("SELECT * FROM database_name WHERE rowid='id_you_want_to_edit'"$db);
if(!
mysql_num_rows($result)) { $die(); }
$retval mysql_fetch_array($result);

echo 
"<table>\n";
foreach(
$retval as $key=>$value) {
   echo 
"<tr><td>$key</td><td><input type=\"text\" name=\"$key\" value=\"$value\"></td></tr>\n";
}
echo 
"</table>\n";
?>
That will put all your info into a row of text boxes.... really need more info to help more.
__________________
Theres 10 types of people; those who understand binary, and those who don't.
webmaster and webdeveloper resources,
Please login or register to view this content. Registration is FREE
webwoRRks is offline
Reply With Quote
View Public Profile Visit webwoRRks's homepage!
 
Old 08-07-2004, 09:12 AM
scottsgameroom's Avatar
Super Talker

Posts: 101
Trades: 0
well basically...i have a reiew script that generates a new row with loads of information about a game that i then put in to a template that processes the review! then inow need a page that will take all the information and put it into seperate boxes so that i can edit it and update the database. here is a copy of the form

http://www.scottsgameroom.co.uk/form.html
scottsgameroom is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to help with updating and editing a row
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33708 seconds with 12 queries