MySQL Forums
Forum List  »  PHP

Need to know if I should bother...
Posted by: Nancy LaPoint
Date: August 09, 2005 07:31AM

Can one of you please help me out and tell me if I should even bother to take on this project? Here's the scenario... this client has a site written in .asp with a shopping cart, login, etc.... They need the interface upgraded to give them reports by customer, by salesrep, by year mixed and matched. I can do the reports easily, but I don't know .asp.

I'm learning php and would prefer to stick to learning one language at a time. I've never written a shopping cart, but know that I can convert the .asp to .php easily...in fact, I've already converted it. However, the session and login are giving me problems because I'm not sure what I'm doing and if I'm understanding it properly.

I have the code for the login in .php, but I'm not understanding the session language (see code pasted below). I have the code converted from .asp to .php, but don't understand how to the session setup, or how ever you refer to it, works.

If I can get the session part of the page in a place in my head where I can understand it, I think I can take on this project. But, right now, I'm so confused about the session and how to set it all up to take it from .asp to .php that I'm not sure if I can do this. If I can do this project, I'll be set for a good many more clients...this will help me get rolling with working at home. Can anyone help me out here??? Please!!

<?
On Error Resume ;}

if (Session("LoginState") == True) {
Set $TSWebObj = Server.CreateObject("TSWebMonHth.WebInterface");

Set $docGetProdCats = Server.CreateObject("Microsoft.XMLDOM");
$docGetProdCats.$validateonparse = False;
$docGetProdCats.$async = False;
$docGetProdCats.$loadXML $TSWebObj.$GetProdCats["<ProdCat><CustNum>".Session("AcctNumber")."</CustNum></ProdCat>"];

Set $docRoot = $docGetProdCats.$documentElement;

Set $docShopCart = Server.CreateObject("Microsoft.XMLDOM");
$docShopCart.$validateonparse = False;
$docShopCart.$async = False;
$docShopCart.$loadXML '<?xml version="1.0"?>'.Session("ShopCart");

Set $docRoot1 = $docShopCart.$documentElement;

Set $docShopCart2 = Server.CreateObject("Microsoft.XMLDOM");
$docShopCart2.$validateonparse = False;
$docShopCart2.$async = False;
$docShopCart2.$loadXML $TSWebObj.$CalcTotalWeight['<?xml version="1.0"?>'.Session("ShopCart")];

Set $docRoot2 = $docShopCart2.$documentElement;

$TotalWeight = $docRoot2.$SelectSingleNode["//TotalWeight"].$Text;

Set $docShopCart3 = Server.CreateObject("Microsoft.XMLDOM");
$docShopCart3.$validateonparse = False;
$docShopCart3.$async = False;
$docShopCart3.$loadXML $TSWebObj.$CalcSubtotal['<?xml version="1.0"?>'.Session("ShopCart")];

Set $docRoot3 = $docShopCart3.$documentElement;

$Subtotal = $docRoot3.$SelectSingleNode["//Subtotal"].$Text;

Set $TSWebObj = Nothing;
} else {
response.redirect "index.php";
}
?>

Options: ReplyQuote


Subject
Written By
Posted
Need to know if I should bother...
August 09, 2005 07:31AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.