Ok i know some of yous will know what i mean, I want to know how to display the username of the logged in user EXAMPLE (Welcome, _______)
Index.php
[QUOTE]
<title>Pulse-Box</title>
<link rel=”stylesheet” href=”assets/css/style.css” type=”text/css” media=”all” />
</head>
<body>
<div id=”wrapper”>
<?php include (‘header.php’); ?>
<div id=”nav”></div>
<?php include (‘leftbar.php’); ?>
<div id=”right”>
<h1><font size=”2″>News & Updates</font></h1>
<p>
Well hello and welcome, Today i have fianled installed and fixed all errors on my login script, if you spot any errors
please report them to me <b>Via</b> <a href=”contact.php”>Contact</a> page.
</p>
<span class=”postinfo”> Posted by Admin on 22:20 02/07/2009</span>
</div>
</div>
<?php include (‘footer.php’); ?>
</body>
Register.php
[QUOTE]
<? include(“includes/connect.php”);?>
<title>Pulse-Box Tester</title>
<link rel=”stylesheet” href=”assets/css/style.css” type=”text/css” media=”all” />
</head>
<body>
<div id=”wrapper”>
<?php include (‘header.php’); ?>
<div id=”nav”></div>
<?php include (‘leftbar.php’); ?>
<div id=”right”>
<div id=”right”>
<?PHP session_start();?>
<? include(“includes/connect.php”);?>
<? if($_SESSION[‘logged_in’] == ‘Yes’) { ?>
<script type=”text/JavaScript”>window.location=”index.php”;</script>
<? } else { ?>
<?//#########################################################//?>
<? if($_POST[‘submit’]) { ?>
<?
$fullname=$_POST[‘fullname’];
$email=$
$username=$_POST[‘username’];
$password=$
?>
<? if(!$fullname) { ?>
Please enter your fullname.
<? } else if(!$email) { ?>
Please enter an email address.
<? } else if(!$username) { ?>
Please enter a username.
<? } else if(!$password) { ?>
Please enter a password.
<? } else { ?>
<?
$new = “INSERT INTO `members`ip`fullname`email`username`password
VALUES (‘127.0.0.1’, ‘$fullname’, ‘$email’, ‘$username’, ‘$password’)”;
mysql_query($new) or die(mysql_error());
?>
<div id=”right”>
<h1><font size=”2″>Registration Success</font></h1>
<p>
Thank you for registering with us, your accouunt has sucessfully been created, </ br>
Please click <a href=”index.php”>here</a> to be returned to home page.
</div>
</div>
<? } ?>
<? } else { ?>
<h1><font size=”2″>Register your free user account!</font></h1>
<table cellpadding=”0″ cellspacing=”0″ border=”0″>
<p>
<tr>
<td><p><font size=”2pt”>Username</font></p></td>
<td> <input type=”text” name=”username” id=”username” value=””> </td>
</tr>
<tr>
<td><p><font size=”2pt”>Password</font></p></td>
<td> <input type=”password” name=”password” id=”password” value=””> </td>
</tr>
<tr>
<td><p><font size=”2pt”>Full Name</font></p></td>
<td> <input type=”text” name=”fullname” id=”fullname” value=””> </td>
</tr>
<tr>
<td><p><font size=”2pt”>Email</font></p></td>
<td> <input type=”text” name=”email” id=”email” value=””> </td>
</tr>
<tr><td colspan=””> <br><input type=”submit” name=”submit” id=”submit” value=”Register!”>
</table>
</form>
<br>
<b><i>*All fields above have to be filled in otherwise you will not be able to sign up!
<? } ?>
<?//#########################################################//?>
<? } ?>
</div>
</div>
<?php include (‘footer.php’); ?>
</body>
Please help me correct my scipt if its rong, and help me getting username displayed
Regards Robert ?