Posts

Showing posts from June, 2019

Index Code

"; } ?> 25||strlen($fn)>25||strlen($ln)>25) { echo "The maximum limit for username/first name/last name is 25 characters!"; } else { // check the maximum length of password does not exceed 25 characters and is not less than 5 characters if (strlen($pswd)>30||strlen($pswd) Welcome to findFriends Login to your account to get started ..."); } } } else { echo "Your passwords don't match!"; } } else { echo "Please fill in all of the fields"; } } else { echo "Sorry, but it looks like someone has already used that email!"; } } else { echo "Username already taken ..."; } } else { echo "Your E-mails don't match!"; } } ?> "); } else { echo 'That information is incorrect, try again'; exit(); } } ?> Already a Memeber? Login below ... Sign up Below ... "> ...

View Albums Code

Image
"; exit(); } } } ?> Albums: $album_title "; } ?>

Upload Photo Code

Upload your Photos:

Home Page Code

Image
"; } else { ?> Your Newsfeed: Show Comments $added_by posted this on your profile: $body "; } } ?>

Log Out Code

Comments Frame Code

"; } ?> Post Comment " method="POST" name="postComment "> Enter your comment below: " value="Post Comment"> $posted_by said: ".$comment_body." "; } } else { echo " No comments to display! "; }

Sending Messages Code

Compose a Message: ($username) Enter the message you wish to send ... "; } else { header("Location: $user"); } } } } ?>

Account Setting Code ( to create a social network like Facebook)

Edit your Account Settings below UPLOAD YOUR PROFILE PHOTO: " width="70" /> CHANGE YOUR PASSWORD: Your Old Password: Your New Password: Repeat Password : UPDATE YOUR PROFILE INFO: First Name: "> Last Name: "> About You: CLOSE ACCOUNT:

Code For Creating A Like Button

Create Your Like Button = 1) { echo "Already exists ..."; } else { if ($like_button_url2) { $create_button = mysql_query("INSERT INTO like_buttons VALUES ('', '$username', '$like_button_url', '$date', '$uid')"); $insert_like = mysql_query("INSERT INTO likes VALUES('','$username','-1','$uid')"); echo " <iframe src='http://localhost/tutorials/findFriends/like_but_frame.php?uid=$uid' style='border: 0px;height: 23px; width: 110px;'> </iframe> "; } else { $like_button_url = "http://".$like_button_url; $create_button = mysql_query("INSERT INTO like_buttons VALUES ('', '$username', '$like_button_url', '$date', '$uid')"); $insert_like = mysql_query("INSERT INTO likes VALUES('','$username','-1','$uid')"); echo...

Friend Requests Code

'; ?> = 1) { $add_friend_query = mysql_query("UPDATE users SET friend_array=CONCAT(friend_array,',$user_from') WHERE username='$user'"); } if ($friendArray_count_friend >= 1) { $add_friend_query = mysql_query("UPDATE users SET friend_array=CONCAT(friend_array,',$user_to') WHERE username='$user_from'"); } $delete_request = mysql_query("DELETE FROM friend_requests WHERE user_to='$user_to'&&user_from='$user_from'"); echo "You are now friends!"; header("Location: friend_requests.php"); } if (isset($_POST['ignorerequest'.$user_from])) { $ignore_request = mysql_query("DELETE FROM friend_requests WHERE user_to='$user_to'&&user_from='$user_from'"); echo "Request Ignored!"; header("Location: friend_requests.php"); } ?> " value="Accept Request"> " value="Ignore Req...