php - If condition not checking the condition -


  समारोह pokemon2 () {include 'details.php'; $ क्षति = $ _POST ['हमला']; $ Oppo_health = $ _SESSION ['oppo_health']; अगर ($ oppo_health & lt; 0) {गूंज "मर गया!"; } और {$ oppo_path = $ _SESSION ['पथ']; गूंज "& lt; br / & gt;"; गूंज $ oppo_path; गूंज "& lt; br / & gt;"; $ Oppo_health = $ oppo_health - $ क्षति; गूंज $ oppo_health; $ _SESSION ['हमले'] = $ क्षति; $ _SESSION ['oppo_health'] = $ oppo_health; }}   

यदि कोड $ oppo_health 0 से नीचे जाता है तो कोड 'मर गया' प्रदर्शित होना चाहिए! लेकिन ऐसा नहीं होना चाहिए जैसा कि यह होना चाहिए ?? तर्क सही है और कोई भी त्रुटि दिखाई नहीं दे रही है।

आपको session_start () विधि का प्रयोग करके एक सत्र शुरू करने की आवश्यकता है।

Comments

Popular posts from this blog

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

python - Writing Greek in matplotlib labels, titles -

Pygame memory leak with transform.flip -