1- How it can be done when user-1 login access his contents(photos,contacts,etc) in tab7.php. But user-2 and other can't access content of user-1 except if they're friends.
example: facebook or internet baking.
Thank in advance
index.php
<?php
ob_start();
$conn = mysql_connect("localhost","root", "");
mysql_select_db("mycontinent", $conn);
//IF SUBMIT BUTTON PRESSED
if(isset($_POST['signin']))
{
if(!$_POST['username']) die("Error: You must enter your email before logging in.");
if(!$_POST['password']) die("Error: You must enter your password before logging in.");
$username = $_POST['username'];
$password = md5($_POST['password']);
$sql = "SELECT * FROM `login` WHERE username = '$username' AND user_password = '$password'";
$result = mysql_query($sql, $conn);
$q = mysql_fetch_array($result);
if(!$q)
{
echo <<< form
<form action="index.php" method="post">
<button type="submit" style="background-color:blue;">
<p style="font-size:120%" style="color:white">Click to try again</p></button>
</form>
form;
//die("Login Failure: An error occured, please verify your email and password are correct.");
}
else $_SESSION[logged_in]=1;
header("Location: tabs7.php");
}
else
{
?>
<body BGCOLOR="white">
<center><img src="image1/MycontinetLogo1.gif"></center>
<br>
<form action="reg1.php" GET="post">
<td> <p style="color:">You can broadcast your news and toughts from Africa to around world.<br>
Uploading videos, pictures and makes friends with others Africans <br>who are around the World. Also the Africans
who are outside the Africa<br> they can uploading the videos and pictures to show home the the real life<br> in Europe,America etc.<br>
<p></p>
<table border="1" width="500">
<tr>
<td><p style="color:blue"><b>Countries</b><br/>
<a href="AfricaMap.php"><img src="image1/Copy of Calcadao.JPG" width="180" height="140"></a></td>
<td><p style="color:blue"><b>Bakong Gentleman(Fashion)</b></br/>
<a href="BakongGent.php"><img src="image1/Hector.JPG" width="200" height="150"></a></td>
<td><p style="color:blue"><b>Business</b><br/>
<a href="AfricanBus.php"><img src="image1/AfricaBusines.gif" width="180" height="140"></a></td>
<td><p style="color:blue"><b>Sport & Music</b><br/>
<a href="Sport&Music.php"><img src="image1/puma_africa_cd.JPG" width="180" height="140"></a></td>
<td><p style="color:blue"><b>Immigration</b><br/>
<a href="immigration.php"><img src="image1/immgration1.jpg" width="180" height="140"></a></td>
<td><p style="color:blue"><b>User Space</b><br/>
<a href="UserSpace.php"><img src="image1/noki-africa.bmp" width="180" height="140"></a></td>
<td><p style="color:blue"><b>Education & Your News</b><br/>
<a href="Education&News.php"><img src="image1/online_20journalism_20copy_1.jpg" width="180" height="140"></a></td>
</tr>
</table>
<br>
<input type=submit name="signing" value="Create Acount" style="background-color:blue;" style="color:white"></td>
</form>
<table align=right border="0">
<form name="login" method="post" action="index.php">
<tr>
<td><p style="color:Gray"><b>Email</b>          
<input type="text" id="username" name="username"></p></td>
</tr>
<tr>
<td><p style="color:gray"><b>Password</b>    
<input type="password" id="password" name="password"></p></td>
</tr>
<tr>
<td><br><input type="submit" value="Login" name="signin" id="signin" style="background-color:blue;"
style="color:white" style="font:bold"></td>
</tr>
</table>
</form>
</body>
<?php
}
?>

New Topic/Question
Reply




MultiQuote



|