ah have ah form that when data is inserted it would go to a welcome page which it does but I keep getting this error

( ! ) Notice: Undefined index: first in C:\wamp64\www\luana_itec244\php\welcome.php on line 25 Call Stack #TimeMemoryFunctionLocation 10.0007237872{main}( )...\welcome.php:0 ( ! ) Notice: Undefined index: last in C:\wamp64\www\luana_itec244\php\welcome.php on line 26 Call Stack #TimeMemoryFunctionLocation 10.0007237872{main}( )...\welcome.php:0

is there a way to fix this error. would like to move on. here is my codes that i have used.




<?xml version="1.0" encoding="UTF-8"?>

<html xmlns="http:www.w3.org/1999/xhtml"xml:lang="en" lang="en">

        <title> Welcome - <?php echo "".$_SESSION['user']; ?></title>

            Welcome!!! <option value="Realname"><?php echo $_SESSION['first'] . ' ' 
                    . $_SESSION['last'] ?></option>
                echo " you are now a member of the Caribbean Culinary Network (CCIN). 
                        Your monthly newsletter will be email to you."


I think you are missing ; at the end of your code line 26. Also the undifined index does state that the first is not defined which means at the time of you loading that pay, first wasn't assigned any thing or wasn't even declared as it takes it as something that doesn't exist. Please check your other file code that calls this file and check if this file is called after first was declared and initialiezed, or you can post that other file code here so we will have a look at it. The error says first and last wasn't declared so look into that.