Hi, i'd some requests for my PHP, can anyone guide me?
Q1: Any upload server can be used so that i can test my upload.php? My currently used web hosting may need permission.

Q2: using <? session_start(); .....?> at every page and assign

$_SESSION['name']=$_POST['name'];

. and at the second page it can show this

<?php echo $_SESSION['name'];?>

, however from second page link to the 3rd page, $_SESSION cant be shown anymore, there is just a blank. Did anyone know the problem?

Thank you for guiding.

Recommended Answers

All 2 Replies

You must include session_start(); at the top of every page that you plan to use session variables. This may or may not be the problem, but it is easy to forget to do.

however from second page link to the 3rd page, $_SESSION cant be shown anymore, there is just a blank.

As buddylee has mentioned, you need to have session_start on top of every page. And also, check if $_SESSION is over-written by any other variable (so that $_SESSION is null)!

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.