1.11M Members

Update query works on localhost but not on server

 
0
 

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

 
0
 

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.

 
0
 

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......

 
0
 

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.

 
0
 

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).

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article