sydesign
03-19-2012, 08:27 PM
I'm pretty new to php and still am not understanding some things.
I am going through a tutorial on making a membership log-in system i got it working mostly. the issue I'm having now is that the way the tutorial was set up is that when a user is logged in it echoes out a message "welcome user" or something like that. however i would like to have it echo out the webpage i have already created. i looked it up and saw that you can't add quotes within the echo string. is there another way i can have the echo statement show the webpage without me having to input the html (and fix all the quotes) after within the string?
the code i have right now is
<?php
error_reporting (E_ALL ^ E_NOTICE );
session_start();
$userid = $_SESSION['userid'];
$username = $_SESSION['username'];
if ($username && $userid){
echo "Welcome Sydesign!";
}
else
echo "Please login to access this page. <a href='../login.php'>Login here</a>";
?>
where it says "Welcome Sydesign!" i want it to display the webpage i already created. I'm sure there are many other ways to do this and I'm open to anything i just want to learn how to do it right.
thank you so much for any help.
I am going through a tutorial on making a membership log-in system i got it working mostly. the issue I'm having now is that the way the tutorial was set up is that when a user is logged in it echoes out a message "welcome user" or something like that. however i would like to have it echo out the webpage i have already created. i looked it up and saw that you can't add quotes within the echo string. is there another way i can have the echo statement show the webpage without me having to input the html (and fix all the quotes) after within the string?
the code i have right now is
<?php
error_reporting (E_ALL ^ E_NOTICE );
session_start();
$userid = $_SESSION['userid'];
$username = $_SESSION['username'];
if ($username && $userid){
echo "Welcome Sydesign!";
}
else
echo "Please login to access this page. <a href='../login.php'>Login here</a>";
?>
where it says "Welcome Sydesign!" i want it to display the webpage i already created. I'm sure there are many other ways to do this and I'm open to anything i just want to learn how to do it right.
thank you so much for any help.