Help - Search - Members - Calendar
Full Version: HTML and PHP
HTMLHelp Forums > Programming > Server-side Scripting
I'm new to all this and basically what I'm trying to do is get my website to execute this code:

session_start(); $toplinks = "";
if (isset($_SESSION['id'])) {
$userid = $_SESSION['id'];
$username = $_SESSION['username'];
$toplinks = '<a href="member_profile.php?id=' . $userid . '">' . $username . '</a> &bull;
<a href="member_account.php">Account</a> &bull;
<a href="logout.php">Log Out</a>';
} else {
$toplinks = '<a href="join_form.php">Register</a> &bull; <a href="login.php">Login</a>';

within a .html webpage how would i do that? can I convert what this is doing to html ? what do you suggest and if it is converting it could you please show me how or just do it tongue.gif thanks.
Christian J
Brian Chandler
(I can't see that the PHP manual entry for echo is particularly useful...)

You need more program than this, and a database-backed server to store the information. Where did this fragment come from?

No, you cannot "convert" this to html.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.