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!
Hi I am currently building a website (PHP/MYSQL etc) and I have a registration page, login etc, and a page where members can update their details. The way I have done it is a member can view their details on a page which has a link at the bottom to edit their details (and another to close their account). If they click edit details, they are taken to a new page where they have another registration form (table) to fill in which updates their details accordingly (with the usual checks for duplicates etc).
I was wondering if anybody is aware of a way of rather than going to another page, i could have text areas in the table which displays existing details where the user can type in a new detail and click an individual update button for each detail (without navigating away from the page or update all the fields).
Many thanks in advance for any advice
I would send them to another page to edit their details. But instead of giving them a bunch of empty boxes, fill them with the details that the user already has. For example:
Many thanks for the reply Johan. I have just tried this approach which would be ideal for what i want, but i have a problem with it.
When i try and echo a value back from the database it displays: 'Resource id #6'...if i echo something else it says 'Resource id #7' etc...I have no idea what this means or what is causing it.
The code i am using is something like this:
$mail=($_SESSION['username']); //session username is activated on login and works fine
$email=mysql_query("SELECT email FROM users where username = '$mail';")or die(mysql_error());
echo $email; //this displays resource id
If you have any more advise it is very, very much appreciated. Thank you.