Search found 49 matches

by Shahlin
Sat Feb 04, 2012 7:04 pm
Forum: PHP
Topic: How To Let Users Visit Others Profile?
Replies: 19
Views: 3254

Re: How To Let Users Visit Others Profile?

Oh I Am Sorry. I Fixed It...And It works Perfectly Now! :D
Only Thing Is...When I Go To profile.php The Fields Are Blank. No Info Is Shown...Is There A Fix?
by Shahlin
Sat Feb 04, 2012 12:42 pm
Forum: PHP
Topic: How To Let Users Visit Others Profile?
Replies: 19
Views: 3254

Re: How To Let Users Visit Others Profile?

I Tried What You Said! But I Get This Error Repeatedly : Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 6 in C:\xampp\htdocs\php\budzzem\core.php on line 17 Warning: Missing argument 2 for getuserfield(), called in C:\xampp\htdocs\php\budzzem\profile.p...
by Shahlin
Sat Feb 04, 2012 12:09 pm
Forum: PHP
Topic: How To Let A User Whose Logged in change his info!?
Replies: 8
Views: 986

Re: How To Let A User Whose Logged in change his info!?

jacek wrote:You could populate the form fields with default values from the table, that way they will just update to the current value if they don't change them.


How To Set A Default Value? :?

Is It Just Like....Making A Variable Of What They Previously Added!? :?:
by Shahlin
Fri Feb 03, 2012 6:16 pm
Forum: PHP
Topic: How To Let Users Visit Others Profile?
Replies: 19
Views: 3254

Re: How To Let Users Visit Others Profile?

This is my login form : [syntax=php]<?php include_once 'config.php' ; require_once 'core.php' ; if (loggedin()) { //loggedin is a function I created in core.php header ('Location: access_denied.php') ; } else { if (isset($_POST['username'])&& isset($_POST['password'])) { $username = $_POST [...
by Shahlin
Fri Feb 03, 2012 4:29 pm
Forum: PHP
Topic: How To Let Users Visit Others Profile?
Replies: 19
Views: 3254

Re: How To Let Users Visit Others Profile?

I Tried This : [syntax=php] else if ($query_num_rows==1) { $user_id = mysql_result ($query_run, 0, 'id') ; $_SESSION ['user_id']=$user_id ; $sql = mysql_query ("SELECT id FROM users"); $row = mysql_fetch_assoc ($sql) ; $id = $row [$_GET['id']] ; header ('Location: profile.php?id='.$id.'') ...
by Shahlin
Fri Feb 03, 2012 2:01 pm
Forum: PHP
Topic: How To Let Users Visit Others Profile?
Replies: 19
Views: 3254

Re: How To Let Users Visit Others Profile?

In My Login Form...The Code Looks Somewhat Like This : [syntax=php] $_SESSION ['user_id']=$user_id ; header ('Location: profile.php?id='.$user_id.'') ; [/syntax] This Is Only For The Current User! If I Type profile.php?id=4 ...the same users profile is shown! Where Should I Use The $_GET method and ...
by Shahlin
Fri Feb 03, 2012 1:41 pm
Forum: PHP
Topic: How To Let A User Whose Logged in change his info!?
Replies: 8
Views: 986

Re: How To Let A User Whose Logged in change his info!?

One Last Question! I Did What You Said...But Now What Happens Is If They Leave Age Empty And Their Next Field Empty...Their Age Updates And The Next Field Value Blanks Out From The Profile. This is the current edit page! [syntax=php] <?php include_once 'config.php' ; include_once 'core.php' ; $user_...
by Shahlin
Fri Feb 03, 2012 1:38 pm
Forum: PHP
Topic: How To Let A User Whose Logged in change his info!?
Replies: 8
Views: 986

Re: How To Let A User Whose Logged in change his info!?

jacek wrote:It should be a comma separated list of columns to update

[syntax=sql]UPDATE `table` SET `column` = 'value', `column2` = 'value2' WHERE `id`= 7[/syntax]


Thanks! I Tried! And It Works! :D
by Shahlin
Thu Feb 02, 2012 6:22 pm
Forum: PHP
Topic: How To Let A User Whose Logged in change his info!?
Replies: 8
Views: 986

Re: How To Let A User Whose Logged in change his info!?

What If I Have Many Optional Fields To Fill In?

Should I Use

[syntax=php]
$sql = "UPDATE `users` SET `age`='$age' AND `gender`='$gender' "
[/syntax]

Is It Done That Way?
by Shahlin
Thu Feb 02, 2012 2:10 pm
Forum: PHP
Topic: How To Let A User Whose Logged in change his info!?
Replies: 8
Views: 986

How To Let A User Whose Logged in change his info!?

This Page Is Currently Just For Updating Your Age! When I Type An Age And Click On Update...It Doesn't Update In My Database! It's The SQL Query's Problem! Please Help! Thanks! [syntax=php] <?php include_once 'config.php' ; if (!isset($_SESSION['user_id'])&& empty ($_SESSION['user_id'])) { e...
by Shahlin
Thu Feb 02, 2012 11:48 am
Forum: PHP
Topic: How To Let Users Visit Others Profile?
Replies: 19
Views: 3254

Re: How To Let Users Visit Others Profile?

jacek wrote:You can use $_GET['id'] in the SQL to decided which users information to fetch ?


Sorry For The Late Reply!

But Where Should I Put $_GET ['id'] ?
by Shahlin
Thu Jan 26, 2012 4:39 pm
Forum: PHP
Topic: Coding Help! (POSTS)!
Replies: 6
Views: 657

Re: Coding Help! (POSTS)!

store it in the database, when you fetch it, use order by id desc to reverse it This is my current code! : [syntax=php]<?php require 'config.php' ; if (isset($_POST['post'])) { $post = $_POST['post'] ; if (!empty ($post)) { $query = mysql_query ("SELECT * FROM `post` ORDER BY id Desc LIMIT 30&...
by Shahlin
Thu Jan 26, 2012 5:55 am
Forum: PHP
Topic: How To Let Users Visit Others Profile?
Replies: 19
Views: 3254

How To Let Users Visit Others Profile?

I've seen Jacek's video...in which he teaches how to do that! but i don't know how to do it in my profile!
So, Can you tell me what are the codes and where to put it?

I want it to look somewhat like this... "profile.php?id=123" or somewhat similar!
by Shahlin
Wed Jan 25, 2012 1:11 pm
Forum: PHP
Topic: Coding Help! (POSTS)!
Replies: 6
Views: 657

Re: Coding Help! (POSTS)!

Thanks!
by Shahlin
Wed Jan 25, 2012 10:59 am
Forum: PHP
Topic: Coding Help! (POSTS)!
Replies: 6
Views: 657

Re: Coding Help! (POSTS)!

I didn't mean this!

What I meant was....when a user types something it should post above....and he posts something else..it should be posted above the old post! For Example :

User : 2
User : 1
<Text Box> <Submit Button>

Should We Connect It To The DataBase For This?
by Shahlin
Tue Jan 24, 2012 1:11 pm
Forum: PHP
Topic: Coding Help! (POSTS)!
Replies: 6
Views: 657

Coding Help! (POSTS)!

I have a text box and a submit button...which posts...the text typed in the text box! It's A Very Simple Script! [syntax=php]<?php if (isset($_POST['post'])) { $post = $_POST['post'] ; if ($_POST['submit']) { if (!empty ($post)) { echo $post.'<br>' ; } else { echo 'Please Type In Something!' ; } } }...
by Shahlin
Mon Jan 23, 2012 2:14 pm
Forum: PHP
Topic: Profile Picture Question!
Replies: 11
Views: 1023

Re: Profile Picture Question!

There Was No Problem In that Set Of Codes!

Actually I Mixed This File With My Profile Page...So There Was A Bit Of Confusion..!
by Shahlin
Sat Jan 21, 2012 5:56 pm
Forum: PHP
Topic: Remember Me! In Login Form!
Replies: 1
Views: 400

Remember Me! In Login Form!

I Want A Remember Me Feature In My Login Form. Can You Tell Me The Script (for remember me feature) And Where To Place It In My Login Form Script? This is my loginform.php [syntax=php]<?php include_once 'config.php' ; require_once 'core.php' ; if (loggedin()) { header ('Location: access_denied.php')...
by Shahlin
Sat Jan 21, 2012 8:01 am
Forum: PHP
Topic: Profile Picture Question!
Replies: 11
Views: 1023

Re: Profile Picture Question!

Nevermind.... I Fixed The Profile Picture Part! :D
by Shahlin
Sat Jan 21, 2012 5:19 am
Forum: PHP
Topic: Profile Picture Question!
Replies: 11
Views: 1023

Re: Profile Picture Question!

Explain the problem When I Upload A Picture And Submit The Form. It says your profile has been updated! But when I go to the profile page. Only the info's updated, the picture isn't. And The Location Is Shown In 'Location' Field And The 'About' Field! And One More Problem Is That....If I Go To A Pr...
by Shahlin
Wed Jan 18, 2012 5:40 pm
Forum: PHP
Topic: Profile Picture Question!
Replies: 11
Views: 1023

Re: Profile Picture Question!

edit_profile.php [syntax=php]<?php include('core/init.inc.php'); if (isset ($_POST ['email'], $_POST ['location'], $_POST ['about'])) { $errors = array () ; if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)=== false) { $errors [] = 'The email address you entered is invalid.' ; } if (preg_match(...