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

PHP/mySQL Insert/Update Problems

Guest
Feb 09, 2007 Feb 09, 2007
I hope someone can help because I can't find anything online that is helping me with this problem. I can't get the Dreamweaver controls to work when coding a PHP insert or update record page. It looks like it creates the code correctly but when I put them out on my webserver and then fill out the form and click submit the page submits and tries to use a URL string of (null)/admin/index.php where index.php is the form page not the page I told it to redirect to. I don't know why the (null) value keeps getting inserted into the string either. The browser obviously can't find this URL so gives a page cannot be displayed screen and nothing get's inserted or updated in the mySQL database.

Any help would be greatly appreciated. This problem is driving me crazy because I want to save time not having to hand code things. Below is a User Authentication page using the Dreamweaver controls that does the same thing when I try to login.
TOPICS
Server side applications
276
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 10, 2007 Feb 10, 2007
tobyd wrote:
> the page submits and tries to use a URL string of (null)/admin/index.php
> where index.php is the form page not the page I told it to redirect to. I don't
> know why the (null) value keeps getting inserted into the string either.

The following two lines set the URL for login success and failure.

> $MM_redirectLoginSuccess = "../admin_index.php";
> $MM_redirectLoginFailed = "../admin/index.php";

As you can see, they are relative paths, suggesting that the login form
is in a different subfolder, but at the same level as admin_index.php
and the admin folder. The (null) almost certainly comes from the fact
that your login page is in the site root. If you're typing in the
redirect filenames manually, use the Browse button instead. Dreamweaver
should set the correct path for you.

--
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
Guest
Feb 10, 2007 Feb 10, 2007
David,

Thank you for the response. I appreciate any help I can get. I understand what you are saying and the reason I think those were set as ../admin_index.php and ../index.php was because I was using a template and defining the behavior in the template and when I applied the template to the actual page it wasn't changing those relative links. I went in and changed the behavior on the page so that the links were updated and it removed the ../ part of the redirects. It still is having the same issue with (null) being in the URL. In IE it shows this path when you rollover the Login button before you submit. I have used Dreamweaver since they introduced UltraDev way back when. I have always coded in ASP so I am still learning PHP. I really can't figure this one out.

Any more suggestions as what to do? I appreciate the help.
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
Guest
Feb 12, 2007 Feb 12, 2007
LATEST
The really strange thing is I can fix this error by changing the form action to the $_SERVER['php_self']. By doing that and adding a If $_POST command in the PHP script, it runs correctly. I don't get what the difference would be with out Dreamweaver codes it.
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