Click to See Complete Forum and Search --> : Problem with phpfreaks session tutorial


mp3mangr
11-14-2003, 03:20 AM
I will used this code

<?php
// start the session
session_start();
header("Cache-control: private"); //IE 6 Fix

echo "<strong>Step 2 - Register Session </strong><br />";

// Get the user's input from the form
___$name = $_POST['name'];

// Register session key with the value
___$_SESSION['name'] = $name;

// Display the sssion information:
?>

Welcome to my website <strong><? echo $_SESSION['name']; ?></strong>!<br />
Let's see what happens on the <a href="page3.php">next page.</a><br /><br />

from phpfreaks tutorials and i take this error Parse error: parse error in /var/www/htdocs/sessions_example/page2.php on line 9

I have used the default configurations in php.ini file
what is the problem? please help...
is something that i must change in the configurations (i used php 4.3.3 with slackware 9.1)

mrhappiness
11-14-2003, 03:28 AM
you see the underscores in your code?
remove them

mp3mangr
11-14-2003, 03:44 AM
oh my god!!! in my php editor the underscores didn't exists... they appeared in copy-paste! thanks a lot.
but it is really strange.