Pos_checkout.php has two <html> tags?

simpleone81 wrote on Tuesday, March 25, 2014:

I was looking at /interface/patient_file/pos_checkout.php and found that the file has two tags with different contents (one is for checkout, one is for receipt).

I thought that browser will only read the first available and ignore the following tags. Is that true? How does pos_checkout.php make browser to parse one tag at some times, and another tag at some other times?

thanks!

sunsetsystems wrote on Tuesday, March 25, 2014:

The browser will see only one. The script generates either the form or the receipt, depending on conditions.

Rod
http://www.sunsetsystems.com/

simpleone81 wrote on Tuesday, March 25, 2014:

Rod - that makes sense. Would you mind pointing out which script handles this and use what condition? This is kind of interesting to me. thanks.

sunsetsystems wrote on Tuesday, March 25, 2014:

It’s all built into that script (pos_checkout.php). Look for the function generate_receipt and for references to it. Note that the HTML for the receipt is generated entirely within that function.

Rod
http://www.sunsetsystems.com/

simpleone81 wrote on Wednesday, March 26, 2014:

I see. thanks Rod. Interesting design.