Hi,

Could anyone please help a n00b girl on this one? Thx:)

<?php
session_start(); //allows session
include('config.php');

if($admin == 6) {
echo "Admin";
}
?>

include "includes/header_account.php";

if($logged[id]) {
//welcomes the member

<div id="mainContent">
		<div id="profile" class="clearfix">
			<div id="col-left">

				<div class="profile-section">
        <a href='editprofile.php' class="manage">Uredi svoj Profil</a>
					<h2>echo "Živjo $logged[username]</h2>";
					<div>

                                 <table cellpadding="5" cellspacing="0" border="0">
							<tr valign="top">
								<td align="center">
										
	<div class="clearStyles photoBox pB-ss" >
			<a href='members.php?user=$user[username]'><img src="$user[photos]" alt="moje fotke" ></a>
	</div>

								</td>
								<td>

                 <span class="emphasis1">Foto:</span> <a href='user_photos.php?user=$user[username]'>Naloži fotko</a><br>
		<span class="emphasis1">Vzdevek:</span> user=$user[username]<br>
		<span class="emphasis1">Naslovnica:</span> <a href='editprofile.php'>user=$user[tagline]</a><br>
								</td>

							</tr>
						</table>
					</div>
				</div>

				<div class="profile-section">
                                <a href="editprofile.php" class="manage">Uredi Email naslove</a>
					<h2>Email naslovi</h2>

					<div>
						&#149; <span class="highlight2"><a href="mailto:$user[email]">$user[email]</a></span> (Primaren)<br>
					</div>
				</div>

				<div class="profile-section">
					<a href="editprofile.php" class="manage">Uredi Podatke o računu</a>

					<h2>Podatki o računu</h2>
					<div>Uredi podatke o svojem računu na Spotterju.</div>
				</div>

				<div class="profile-section">
					<a href="changepassword.php" class="manage">Spremeni Geslo</a>
					<h2>Geslo</h2>

					<div>Uredi geslo na svojem računu na Spotterju.</div>
				</div>

					<div class="profile-section">
						<a href="profile_sharing.php" class="manage">Spremeni nastavitve</a>
						<h2>Zunanje storitve</h2>
							<div>Uredi nastavitve za Facebook in Twitter.</div>

					</div>

			</div>

			<div id="col-right">

				<div class="profile-section" >
					<a href="my_friends.php" class="manage">Uredi Prijatelje</a>
					<h2>Moji Prijatelji</h2>

					<div>
							<p><a href="newfriends.php">Poglej svoje nove prijatelje.</a></p>
							<p><a href="my_friends.php">Povabi prijatelje</a> da se ti pridružijo na Spotterju še danes.</p>
					</div>
				</div>

				<div class="profile-section">
                                     <a href="newfriends.php" class="manage">Spremeni Geslo</a>
					<h2>Moja povabila k prijateljstvu</h2>

				</div>

				<div class="profile-section">
					<a href="saved_reviews.php" class="manage">Uredi shranjene Spote</a>
					<h2>Moji shranjeni Spoti</h2>
					<div>
					Uredi svoje shranjene Spote

					</div>
				</div>

				<div class="profile-section">
					<a href="editprofile.php" class="manage">Uredi prejemanje Spotterja</a>
					<h2>Tedenski Spotter</h2>
					<div>Uredi svoja naročila na prejemanje tedenskega Spotterja.</div>

				</div>

				<div class="profile-section">
					<a href="messaging_prefs.php" class="manage">Uredi nastavitve sporočanja</a>
					<h2>Nastavitve sporočanja</h2>
					<div>Uredi možnost sporočanja s strani podjetij in javnih osebnosti.</div>
				</div>

			</div>
		</div>
	</div>
";
}else
//if there trying to login
if(isset($_GET['login'])) {
//removes sql injections from the data
$username= htmlspecialchars(addslashes($_POST[username])); 
//encrypts the password
$password = sha1(md5(md5(sha1(md5(sha1(sha1(md5($_POST[password]))))))));
//gets the username data from the members database
$uinfo = mysql_query("SELECT * FROM `members` WHERE `username` = '$username'") or die(mysql_error()); 
//see if the user exists
$checkuser = mysql_num_rows($uinfo);
//if user name not found in database error
if($checkuser == '0')
{
echo "Uporabniško ime ni najdeno";
}else{
//fetch the sql
$udata = mysql_fetch_array($uinfo);
//checks see if the account is verified
if($udata[userlevel] == 1) { 
echo "Ta račun še ni bil aktiviran.";
}
//if it is continue
else
//if the db password and the logged in password are the same login
if($udata[password] == $password) {
$query = mysql_query("SELECT * FROM `members` WHERE `username` = '$username'") or die(mysql_error()); 
//fetchs the sql
$user = mysql_fetch_array($query);
//sets the logged session
$_SESSION['id'] = "$user[id]";
$_SESSION['password'] = "$user[password]";

echo "Zdaj si prijavljen/a, prosimo počakaj. . .";
//redirects them
echo "<meta http-equiv='Refresh' content='2; URL=login.php'/>";
}
//wrong password
else{
echo "Napačno uporabniško ime ali geslo!"; 
}
}
}else{
//If not the above show the login form
echo "<form action='login.php?login' method='post'>
<table width='312'>
  <tr>
    <td width='120'>Uporabniško ime:</td>
    <td width='180'><input type='text' name='username' size='30' maxlength='25'></td>
  </tr>
  <tr>
    <td>Geslo:</td>
    <td><input type='password' name='password' size='30' maxlength='25'></td>
  </tr>
    <tr>
    <td colspan='2'><center><input type='submit' value='Prijava'></center></td>
  </tr>
</table>

</form>";
}
include "includes/footer.php";
?>

if it is one page code... then i can clearly see that u forgot to put particular code inside the php tag..

include('include "includes/header_account.php"');
if($logged[id]) {
Member Avatar for diafol

Looking at the rest of your code, you look as if you're echoing without php tags. Next time you post code, place it inside [ CODE ] tags (the last button on the text editor).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.