Hi guys,

Please, I need your help.

I made a web site with a login page. In my laptop it works perfectly, bu when I move the site to other computer, and I put the user name, the password and submit it doesn´t move to the next page.

I´m using Apache 2.2.4, PHP5.2.1 and MySQL 5. 1, and I´m developing with Dreamweaver MX2004.

Can you please tell me what I can be doing wrong? I´m new on this...

Thnks
Nuno

Dani AI

Generated

Quick checklist that narrows the problem in a few minutes (based on the hints from , , and ):

  1. Confirm PHP is actually running on the target machine. Create a tiny test page and load it in the browser to see PHP info.
<?php
phpinfo();
?>
  1. Turn on error reporting while debugging so any runtime errors are visible.
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
?>
  1. Database: make sure the database and the user table were exported from the development machine and imported on the target machine, and that your connection credentials/host match. Use phpMyAdmin or a dump/import workflow; a command-line example:
mysqldump -u devuser -p devdb > dump.sql
mysql -u produser -p proddb < dump.sql
  1. Form, client-side, and sessions: verify the login fields have name attributes, the form actually issues a POST (or the method your script expects), and no JavaScript is preventing submit. Watch the Network tab in the browser devtools to confirm a POST is sent and note the HTTP status. If your login uses sessions, ensure session_start() runs before output and that session.save_path is writable on the target host; check the PHP session docs at session_start.

  2. Logs and privileges: check Apache/PHP error logs and MySQL access/privilege errors. On Linux you can watch the Apache log while reproducing the problem:

tail -f /var/log/apache2/error.log

If passwords are hashed, use modern verification (password_hash/password_verify) and confirm the same hashing method was used when you moved the data. For form/debugging guidance see MDN Forms: HTML forms, and for importing/exporting databases see phpMyAdmin docs: Import/Export.

Follow the steps above in order: phpinfo -> enable errors -> confirm POST in devtools -> check DB presence/credentials -> inspect logs. That will locate whether the issue is server configuration, missing data, or client-side blocking.

Recommended Answers

All 8 Replies

no errors are thrown ? can you post some code ?

Did you hash the password? using MD5 or SHA1...

Is your username and password text field inside a form?
Does the Form property METHOD box says POST?
Does the form property ACTION box says <?php echo $loginFormAction; ?>

Check those things, else try to send some of the codes?

Best Regards,

Berhe

Does the form property ACTION box says <?php echo $loginFormAction; ?>

why would the action attribute have to contain this ?

The Username and password text fields should be kept within a form. And that form have to know what action to do, like for example to insert a record, the form action should be;
<?php echo $editFormAction; ?>

Thanks,

Berhe

not necessarily. You may want to validate with js or post to another page

I agree, I am only giving an option.

Thanks,

Berhe.

Hi guys,

Please, I need your help.

I made a web site with a login page. In my laptop it works perfectly, bu when I move the site to other computer, and I put the user name, the password and submit it doesn´t move to the next page.

I´m using Apache 2.2.4, PHP5.2.1 and MySQL 5. 1, and I´m developing with Dreamweaver MX2004.

Can you please tell me what I can be doing wrong? I´m new on this...

Thnks
Nuno

LOL
It's because on your laptop you have a database with a table admin(or whatever you name it ) which contains the info to be checked when a user tries to log in .

When you take your script on another computer,you only take the php code , but not the table admin.U can export the sql you used to create the table in phpmyadmin using ,of course,the export comand.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.