Is it safe to use sessions...

Yes, with care. Always perform checks on session data to maintain security and integrity. For example:

$goal = $_SESSION["goal"];
if (strlen( $goal ) < 1)
   $goal = "Not set";

Just a simple example, but you get the idea...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.