Search found 69 matches

by leverkusen
Thu Dec 06, 2012 12:39 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

when i put in edit.profile.php $user_info = fetch_user_info $_SESSION['uid']; i get error Parse error: syntax error, unexpected T_VARIABLE in public_html/edit_profile.php on line 39
but when i put $user_info = fetch_user_info( $_SESSION['uid']); its still the same :twisted:
by leverkusen
Thu Dec 06, 2012 12:55 am
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

still the same nothing happens :roll:
session in user.inc.php is $uid = ($_SESSION['uid'] = $row['uid']);
session in edit.profile.php is $user_info = fetch_user_info ($_SESSION['uid'] = $row['uid']);
session in login is of course $_SESSION['uid'] = $row['uid'];
by leverkusen
Wed Dec 05, 2012 11:57 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

[syntax=php]<?php if(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username'])) { ?> <?php } elseif(!empty($_POST['username']) && !empty($_POST['password'])) { $username = mysql_real_escape_string($_POST['username']); $password = md5(mysql_real_escape_string($_POST['password']))...
by leverkusen
Wed Dec 05, 2012 11:52 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

i can edit session LoggedIn and put session uid then?
by leverkusen
Wed Dec 05, 2012 11:47 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

Im setting
[syntax=php]<?php
if(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username']))
{[/syntax]
When they are logged in they can see the page.
by leverkusen
Wed Dec 05, 2012 11:31 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

well i removed $_SESSION ['uid'] = 1; from init user.inc.php is getting a new error because i inserted include('core/init.inc.php'); maybe i shouldnt do that? Fatal error: Cannot redeclare fetch_users() (previously declared in public_html/core/inc/user.inc.php:7) in /public_html/core/inc/user.inc.ph...
by leverkusen
Wed Dec 05, 2012 9:06 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

User.inc.php [syntax=php] <?php session_start(); function fetch_users (){ $result = mysql_query('SELECT `uid` AS `id`, `username` AS `username` FROM `users`'); $users = array(); while (($row = mysql_fetch_assoc($result)) != false){ $users[] = $row; } return $users; } function fetch_user_info($uid){ ...
by leverkusen
Wed Dec 05, 2012 8:32 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

Yes i inserted that now, it was empty in the bottom of edit.profile.php and user.inc.php, but still thats not the main problem :roll:
by leverkusen
Wed Dec 05, 2012 1:30 am
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

well the point is that im not getting any information in edit-profie.php about user i only get html box without echo in it <label for="username">Username</label> <input type="text" name="username" id="username" value="<?php echo $user_info ['username']; ?...
by leverkusen
Tue Dec 04, 2012 11:08 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

well i removed them but nothing
[syntax=php] mysql_query("UPDATE `users` SET `username` = `$username`, `grad` = `$grad`, `drzava` = `$drzava`,`fan` = `$fan`, `website` = `$website` WHERE `uid`=`$uid`");
}[/syntax]
by leverkusen
Tue Dec 04, 2012 7:17 am
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

hmm no solution? :?
by leverkusen
Fri Nov 30, 2012 2:41 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

[syntax=php]<?php function fetch_users (){ $result = mysql_query('SELECT `uid` AS `id`, `username` AS `username` FROM `users`'); $users = array(); while (($row = mysql_fetch_assoc($result)) != false){ $users[] = $row; } return $users; } function fetch_user_info($uid){ $uid = (int)$uid; $sql = "...
by leverkusen
Thu Nov 29, 2012 11:17 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

code is fine o smth is missing?
by leverkusen
Wed Nov 28, 2012 11:46 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

i dont have any errors when i want to edit :cry:
by leverkusen
Wed Nov 28, 2012 1:29 am
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

I added to my code that only logged users can see this page, thats why is now longer When i edit profile i get echo 'Your profile has been succesfully updated!' but it makes no changes in phpmyadmin is something missing? or wrong sessions? [syntax=php] <?php include('core/init.inc.php'); if(isset($_...
by leverkusen
Wed Nov 28, 2012 12:40 am
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

ok now i need to put $mysql query for this changing, how should be right to put?
[syntax=php]$sql_mysql_query("update users set ='$grad' where uid = '$uid'");[/syntax]
is that right? and should i add else if before this?
by leverkusen
Tue Nov 27, 2012 9:10 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

[syntax=php]<?php include('core/init.inc.php'); if(isset($_POST['name']){ $errors = array(); } if (empty($errors)){ $grad = htmlentities($_POST['grad']); $drzava = htmlentities($_POST['drzava']); $fan = htmlentities($_POST['fan']); $website = htmlentities($_POST['website']); $titles = htmlentities($...
by leverkusen
Tue Nov 27, 2012 6:32 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

yea but i dont know how to post it properly, i tried to copy paste and edit from my changepassword.php script but its not good
by leverkusen
Tue Nov 27, 2012 6:21 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

Re: cannot edit profile

nooo
by leverkusen
Tue Nov 27, 2012 6:04 pm
Forum: PHP
Topic: cannot edit profile
Replies: 89
Views: 11173

cannot edit profile

I cant edit profile, i think that id is not recognised When i enter in edit.profile.php i get echo "Your profile has been updated! " and normal form without any editing instead of echo 'Click update to edit your profile.'; I dont have any errors or anything, maybe i should fetch user with ...
by leverkusen
Sun Nov 25, 2012 2:41 am
Forum: PHP
Topic: my_sql_fetch problem
Replies: 12
Views: 1914

Re: my_sql_fetch problem

Haha incredible!Tnx alot that was the main problem now it works ! 8-)