Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Update record problem PHP MYSQL

Participant ,
Feb 02, 2007 Feb 02, 2007
hi all,
I have a problem with DW 8's update server behaviour. I'm not sure if its that or a MYSQL problem:
I have one page: upload2.php and there is an option for the user to change their password.

But when I enter the user details, and the new password, the database does not change at all.

Where am I going wrong?

TOPICS
Server side applications
303
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 03, 2007 Feb 03, 2007
The_FedEx_Guy wrote:
> But when I enter the user details, and the new password, the database does not
> change at all.
>
> Where am I going wrong?

You have two forms which are mutually exclusive: form1 performs the
insert, form2 performs the update. Only one can be processed at a time.
For it to work, both actions need to be applied to the same form. You
would also need to run a check to see whether the user had entered a new
password. Otherwise you'll end up with a lot of people with a blank
password.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 03, 2007 Feb 03, 2007
Hi,
I made the modifications and put the update form on a separate page. It works fine on my local machine.
But when I upload the file to my friends server i get weird errors:

Warning: Cannot modify header information - headers already sent by (output started at D:\companyname\wwwroot\sitefolder\update.php:6) in D:\companyname\wwwroot\sitefolder\update.php on line 52

I have removed the details for my friends company info
They have recently updated to PHP5 and MySQL 4++(current stable version)

Which header information is this? I have never come across this.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 03, 2007 Feb 03, 2007
LATEST
The_FedEx_Guy wrote:
> Which header information is this? I have never come across this.

It's probably the most common beginner's mistake in PHP after forgetting
such things as semicolons or matching quotes:

"Remember that header() must be called before any actual output is sent,
either by normal HTML tags, blank lines in a file, or from PHP. It is a
very common error to read code with include(), or require(), functions,
or another file access function, and have spaces or empty lines that are
output before header() is called. The same problem exists when using a
single PHP/HTML file."

http://uk.php.net/manual/en/function.header.php

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines