Hi people, got some weird issue.

My update query isn't working once I upload my files on server, It works perfectly on localhost and delivers what its intended to do.

I echoed my update query

On local host it gave me:

UPDATE displayusertrip SET displaytripmnth='JAN', displaytripyr='2012', displaytriptrps=' Goa Trip, Bengal Trip,Kerala Trip, Manali Trip, Ooty Trip' WHERE displaytripid='1'

But after uploading on server, it gave:

UPDATE displayusertrip SET displaytripmnth='', displaytripyr='', displaytriptrps='' WHERE displaytripid='1'

Its just passing blank values....

I mean its same code, same tables, then how come it won't work on server if its working on localhost?

Anyone has encountered any similar issues in past.

Pls Reply...

Regards

it can depend on many things including differing versions of software installed on the server and the development machine (such as PHP or mysql).

It could also be different database configuration, assuming you are reading from an existing table to gather the data for your updates.

I suggest checking for differences between server configuration and your development machine, as well as any table data that you are relying on for certain assumptions in code.

Beyond that, post your code and see if anyone can notice any discrepencies.

Thanx for the reply Sir,

My updae query isn't working.... select and delete are fine....

I created a file ver.php to check the version and just inserted this code in it....

<?php

phpinfo();

?>

localhost php version is 5.2.6

But After uploading I went to the proper url but ver.php page is blank......

Just download the whole code that shows error. and again test it on your local machine..just ensure that If You dont have any little mistake in your code.

Just making a wild guess::
please check the method of the form or the names of the input/ select ... from the page/ file the data is posted.
Possible area of the error:
$_POST['month']
or something like that (May be the tagnames doesnot match).

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.