Jump to content

tork

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by tork

  1. Thank you, Guru, for taking the time to assist me. I have taken your suggestions and it resolved as you said. However, I see that the session ID changes when index.php is started after a successful login. echo '<h1>Welcome'; if (isset($_SESSION['first_name'])) { echo ", {$_SESSION['first_name']}!"; should produce "Welcome, Jimmy!", yet only "Welcome" is output, and should select the logout script group in nm_footer.php and nm_footer_for_index.php scripts. I only have session_start(); in the nm_header.php and nm_header_for_index.php scripts, and no session data being deleted (to my understanding). How do I get the session ID to remain the same?
  2. Here's the actual code (less credentials), and the .htaccess rewrite & redirect. The redirect forces a slight change in the nm_header and nm_footer menu hrefs, so I created nm_header_for_index.php and nm_footer_for_index to accommodate this. Here's the .htaccess .. I don't know if this code could screw the forum server, so I've prefixed each command with 'copy' .. and it starts with the rewrite engine ON. copy# Rewrite the URL for index.php with no path showing copyRewriteCond %{REQUEST_URI} ^/?$ [NC] copyRewriteCond %{REQUEST_URI} !index\.php [NC] copyRewriteRule .* /nm_app/htdocs/index.php [NC,L] copy## Redirect the user to the index.php file but with the path showing copyRedirect /index.php http://www.site_name.com/nm_app/htdocs/index.php .. the missing parts to the above link: .com/nm_app/h index.php nm_config.inc-copy-without-real-IDs.php nm_header_for_index.php nm_footer_for_index.php nm_login.php nm_header.php nm_mysqli_connect-copy-without-real-IDs.php nm_footer.php The directory structure: root (.htaccess) | nm_app (nm_mysqli_connect.php) | htdocs (index.php; nm_login.php) | includes (nm_config.inc.php; nm_header_for_index.php; nm_footer_for_index.php; nm_header.php; nm_footer.php)
  3. I tested to see if it arrived at the nm_login.php script, but it didn't. That's where the validation tests are conducted and the outputs confirming success are. So the redirection is taking place before this. What could redirect the submission before testing the data?
  4. Yes, it's redirecting to index.php. It was not written to do this since the only action is to the nm_login.php script. The question is, why is it redirecting with a change in data values?
  5. Hi: Basically, when the data I enter into the form is not valid, then the form action script statement "if (isset($_POST['submitted']))" works upon submitting. However, if the data is valid, then the form action is ignored and the index file is actioned. Eh .. see what I mean? Honestly, I'm taking my pills This is either so obvious or a secret only deep specialists know, methinks. You should know that there is an .htaccess redirection for the index file only, and that it's on the same shared server within the same root directory tree. For all my years of developing, I'm stumped! Attached is what I believe to be the relevant scripting. The directory tree.. root (.htaccess) | nm_app (nm_mysqli_connect where MYSQLI is defined) | htdocs (index.php; nm_login.php) | includes (nm_config.inc.php; nm_header.php; nm_footer.php) nm_app_php_post_issue.php
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.