tell me plzzzz how to edit a row in a php table ?

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
spice006
Forum Newbie
Posts: 12
Joined: Tue Feb 24, 2009 3:27 am

tell me plzzzz how to edit a row in a php table ?

Post by spice006 »

hello
tell me plzzzz how to edit a row in a php table ?
i am waiting
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: tell me plzzzz how to edit a row in a php table ?

Post by papa »

Just open the document in your favourite editor and use the keyboard to make the changes.
spice006
Forum Newbie
Posts: 12
Joined: Tue Feb 24, 2009 3:27 am

Re: tell me plzzzz how to edit a row in a php table ?

Post by spice006 »

no no
you didnt get me... listen i have a table and i wanna changes in any row with the help of php code.... for example on the web page if i click on the edit button... then i can edit some records on the page....
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: tell me plzzzz how to edit a row in a php table ?

Post by papa »

You need to be more specific.

Show us some code and what you've done so far.

Would you help me if I wrote: Please help me change the topic of my site ??????
spice006
Forum Newbie
Posts: 12
Joined: Tue Feb 24, 2009 3:27 am

like this code

Post by spice006 »

its not working very well .... i wanna do some changes on this (below)--> code


$edit=$_POST['ID'];
if (isset($edit))
{
$sqlreqqry="UPDATE tbl_newuser SET email='$email', password='$password', first_name='$firstname',
last_name='$lastname', gender='$gender', college='$college', phone_number='$phonenumber' WHERE ID = '$id'";
}
while($reqkeys=$db->get_results($sqlreqqry))
{
echo $reqkeys["comment"];
}
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: tell me plzzzz how to edit a row in a php table ?

Post by papa »

When updating user data always use: http://us.php.net/manual/en/function.my ... string.php

get_results is a method of the class $db. What error do you get and how does that class look ?

Code: Select all

while($reqkeys=$db->get_results($sqlreqqry))
{
echo $reqkeys["comment"];
}
Doesn't really make sense. What are you trying do to ?
spice006
Forum Newbie
Posts: 12
Joined: Tue Feb 24, 2009 3:27 am

Thanks

Post by spice006 »

thanks i solved my problem by self...

ok bye and takecare

see you again
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: tell me plzzzz how to edit a row in a php table ?

Post by pickle »

PHP has no tables. Period.
PHP can access the database & affect database tables, or it can be used to generate markup & create HTML tables. It has no tables of it's own.

That may have been why ~papa was unclear what you wanted.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply