i made some pages. When i am running on xammp server, its working fine, every form gets submits and i can see data in database. After that i upload on net webserver, here page showing is ok. But when i am submitting the page than data is not comming in database.

Recommended Answers

All 3 Replies

hi, you should change the connection params in your file that is used to connect to your database. Please see with the sever config what params to used for Mysql runnig on the server.

i putted

DEFINE('DATABASE_USER', 'root');
DEFINE('DATABASE_PASSWORD', '');
DEFINE('DATABASE_HOST', 'localhost');
DEFINE('DATABASE_NAME', 'trivial');

and 

$dbc = @mysqli_connect(DATABASE_HOST, DATABASE_USER, DATABASE_PASSWORD,
DATABASE_NAME);

if (!$dbc) {
trigger_error('Could not connect to MySQL: ' . mysqli_connect_error());
}

It seems unlikely to me the password/username connection is as you've showed it on a production server, and if it is, you should probably change it.
if the database/password combo is right, you might want to run a default debug check by putting echoes in your save function. sometimes what works offline doesn't work online.

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.