This is a discussion on "[SOLVED] 2 weeks trying to update from a form" within the PHP Forum section. This forum, and the thread "[SOLVED] 2 weeks trying to update from a form are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] 2 weeks trying to update from a form
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
||||
|
||||
|
[SOLVED] 2 weeks trying to update from a form
i have spent the last 2 weeks trying to update a table from a form and just cannot get it, the times i get no errors, it does not update, please help
change.php
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Oct 13th, 2007 at 14:48. |
|
|
|
#2
|
||||
|
||||
|
Re: 2 weeks trying to update from a form
Hi Saltedm8,
Can you explain a bit more about what you're trying to do? Do you have the current user details available anywhere or are these values to create a new entry in the database? I have this code that is based off what little I could pick up from your script
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#3
|
|||
|
|||
|
Re: 2 weeks trying to update from a form
As Rakuli has shown in the script that he came up with, that your SQL query was wrong and you didn't specify which record was getting updated.
Hese has a lot of useful examples on PHP, SQl etc so it worth having a look http://www.tizag.com/sqlTutorial/sqlupdate.php |
|
#4
|
||||
|
||||
|
Re: 2 weeks trying to update from a form
i am just trying to create a form that is able to change an existing username and password stored in the database, but i wanted to use 'MD5()'
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
|
|
#5
|
|||
|
|||
|
Re: 2 weeks trying to update from a form
Who is doing the changing?
Is it the user who's username and password that need to be changed? |
|
#6
|
||||
|
||||
|
Re: 2 weeks trying to update from a form
there only needs to be one table with id, username and password fields, only access will be for admin to do EVERYTHING, there will be no user access to anything on the site at all
i just want to be able to adjust it without entering the database, obviously converting it to md5 etc
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Oct 12th, 2007 at 19:18. |
|
#7
|
|||
|
|||
|
Re: 2 weeks trying to update from a form
How are you getting that record that needs to be updated? Are all usenames displayed in a table somewhere (html table) or are you going to search for a specific record?
i.e. I have a list of records with radio buttons and I click the radio button to edit that record I only ask these questions becuase they are probably so many different ways to do it depending on the situation |
|
#8
|
||||
|
||||
|
Re: 2 weeks trying to update from a form
mysql
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
Last edited by saltedm8; Oct 12th, 2007 at 20:46. |
|
#9
|
|||
|
|||
|
Re: 2 weeks trying to update from a form
I've looked at your code and I should have a solution in my next post.
There seems to be a lot of confusion with you php and html and I will try and sort it out for you |
|
#10
|
|||
|
|||
|
Re: 2 weeks trying to update from a form
A few things here
First, this only needs to be executed once
4. Change these
If you want to see an old example of mine before i improved it i'll post the code |
|
#11
|
||||
|
||||
|
Re: 2 weeks trying to update from a form
what a bloomin pain that was !!!
ended with this
thanks for your help
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
|
|
#12
|
|||
|
|||
|
Re: 2 weeks trying to update from a form
You only need to perform one query for which action you want to take
When you add a new member you use
|
|
#13
|
||||
|
||||
|
Re: 2 weeks trying to update from a form
i was thinking about that, but i will sort that out later, at the moment i have built it for one user and no more, i could always re-write it later if i wanted - for now i am happy with what i have, cheers
Last Blog Entry: Strict and Transitional Doctype's (Sep 12th, 2008)
|