Problem with php code

I am really in a bad picture, one of my programmer left me in the middle, and offered me wired coded CMS, designed on PHP + MySQL

I have one object which is taking date; and storing this into database.

All i want to enter a simple string from this object and store this value into database.

I have changed the DATABASE STRUCTURE from date to VARCHAR.

But i am not able to track down from where it’s taking the values to database, sothat i can initiatlize one variable to this object value, and move to database.

So please help…

bizManagment.php is the main page, where all fucntions are defined in an array.

$func_ary=array(“updateBiz_info”,“show_price”,“biz_webplan_edit”,“edit_webplan”);

This is the respossible funcation for add, edit

function edit_biz_reg($msg="")

{

	global $SVP;

	global $SVP_Main;

	$R=DIN_ALL($_REQUEST);

	$t=new Template("templates");

	$t->set_file("MyFileHandle","edit_biz_info.htm");

	if($R[bizId]>0){

		gri("tlbbizinfo","where bizId='$R[bizId]'","",$req);

		$t->set_var($req);         					 

	}

	gri("tlbcity","Where cityId='$req[cityId]'","cityStateId",$stateId);

	get_new_option_list("tlbstate","stateId","stateName","$stateId[cityStateId]",$option_state_list,0," Where status='1' order by stateName asc",1,0,"Select State");

	

	get_new_option_list("tlbcity","cityId","cityName","$req[cityId]",$option_city_list,0," Where status='1'",1,0,"Select City");

	//$todayDate="2011";
	$todayDate=$req[bizRegDate];
	//$todayDate=date("d/m/Y",$req[bizRegDate]); // to display date in edit mode

	

	$t->set_var(array("msg"=>$msg,

					  "option_state_list"=>$option_state_list,					

					  "option_city_list"=>$option_city_list,					

                      "checked_$req[bizStatus]"=>"checked",                    

					  "selectedPay_$req[bizPayMode]"=>"checked",					

					  "selected_$req[bizContactTitle]"=>"selected",					

					  "SVP"=>$SVP,

					  "SVP_Main"=>$SVP_Main,

					  "bizRegDate"=>$todayDate,  				 

					));

	$t->parse("MyOutPut","MyFileHandle");

	parse_index_c($t->get("MyOutPut"));

}

function updateBiz_info($msg="")

{

	global $SVP;

	global $SVP_Main;

	$R=DIN_ALL($_REQUEST);

	if($R[bizContactName]=="")

			$R[bizContactTitle]="";

	func_edit_newBiz($R); 	

	echo "Update successfully";

}

I want “bizRegDate” to be entered just as a simple VARCHAR, but whenever i try to do so, it taking a junk value in it; all the time “943900201”;

so please help.

Why do you want to store a date as a string?

Problem has been resolved, thread must be closed now.

Why not store date as a string? This way you can format it any way you’d like.

Care to share the solution with us? That way the thread might be useful for others.

Because it’s a date. You can format it any way you like when outputting it (with mysql or php date format functions), but in the database it should be stored as a date. That way you’ll have the possibility to use all available date functions in your queries.