₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,184 members, 8,420,698 topics. Date: Friday, 05 June 2026 at 09:16 AM

Toggle theme

Please I Need An Urgent Answer - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingPlease I Need An Urgent Answer (1137 Views)

1 Reply (Go Down)

Please I Need An Urgent Answer by Nobody: 4:25pm On Aug 01, 2017
How can i create an edit profile like that of nairaland where user data is displayed in form of a input box and is updated when the update button is pressed using MySQL/PHP.
Re: Please I Need An Urgent Answer by Godhead4(m): 4:36pm On Aug 01, 2017
.
Re: Please I Need An Urgent Answer by Nobody: 5:08pm On Aug 01, 2017
?
Re: Please I Need An Urgent Answer by Kingdolo(m): 5:35pm On Aug 01, 2017
Whatsapp: 0-8-1-8-6-9-9-2-7-4-5
Re: Please I Need An Urgent Answer by Nobody: 5:53pm On Aug 01, 2017
dhtml18:
?
I want to create a web page with a couple of form textboxes under a table (like the image below) so that when i click on the web page data from the database appears immediately (again just like the image ) but when i change the data(eg from apple to guava) and click update it changes apple to guava in my database.

Re: Please I Need An Urgent Answer by Nobody: 6:12pm On Aug 01, 2017
The answer to this question is a very long one, and I cannot answer it.
Re: Please I Need An Urgent Answer by Nobody: 6:14pm On Aug 01, 2017
ok thank you
Re: Please I Need An Urgent Answer by Nobody: 6:49pm On Aug 01, 2017
The OP has been killed
Re: Please I Need An Urgent Answer by ibnSalaudeen(m): 7:11am On Aug 02, 2017
Basic php/mysql
Then JQuery-Ajax
Re: Please I Need An Urgent Answer by Nobody: 8:18am On Aug 02, 2017
How can i create an edit profile like that of nairaland where user data is displayed in form of a input box and is updated when the update button is pressed using MySQL/PHP.
The truth is i don't know how you programmed your table but i will just give you a simple illustration as to how that works

This below part is supposed to be before the document type of your user profile.php page

if(isset($_POST['update']))
{

$id = $_POST['id'];

$signature= $_POST['user_signature'];

// checking empty fields
if(empty($signature)) {

if(empty($signature)) {
echo "<font color='red'>The signature is Empty</font><br/>";
}
} else {
//updating the table
$result = mysqli_query($mysqli, "UPDATE u_data SET user_signature='$signature' WHERE id=$id"wink;

//redirectig to the display page. In our case, it is index.php
header("Location:updated.php"wink;
}
}
?>

Then in the body of the same document just add this below form there


<form method="post" action="">
<input type="text" name="signature" value="<?php echo "$signature";?>">
<input type="submit" name="update" value="update">
</form>

I believe i did not confuse you and i believe you already have basic understanding of php. So goodluck
Re: Please I Need An Urgent Answer by badthinds: 7:51pm On Aug 02, 2017
dhtml18:
The answer to this question is a very long one, and I cannot answer it.
Ill try
Re: Please I Need An Urgent Answer by badthinds: 7:57pm On Aug 02, 2017
How can i create an edit profile like that of nairaland where user data is displayed in form of a input box and is updated when the update button is pressed using MySQL/PHP.
As I always say...a programmer should always try to code an answer according to his demand.

If you know how to fetch data ( I'm sure you know)

Then fetch it and display it in a box !!!

Eg

echo '<input type="text" name="fullName" value="'. $row[n] .'" />';

...
Did I answer your question?

Sincerely, badthinds
Re: Please I Need An Urgent Answer by CryptoCoinr(f):
CryptoCoinr:
S/He has deactivated his/her account.
-
Re: Please I Need An Urgent Answer by badthinds: 8:07pm On Aug 02, 2017
CryptoCoinr:
S/He has deactivated his/her account.
O boy!. I noticed "Nobody" but didn't process till after I posted.
1 Reply

I Need A Senior Php Or Node.js Developer For An Urgent ProjectWeb/app Developer Needed For An Urgent Job234

Austin Decor POPUses Of Different Programming LanguagesMlm Website Builder That Resides In Lagos Is Urgently Needed