Search found 17 matches
- Wed Feb 15, 2012 5:54 am
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
This is my current code and my page is invisible again and not working. <?php function fetch_users(){ $result = mysql_query('SELECT `user_id` AS `id`, `user_username` AS `username` FROM `users`'); $users = array(); while (($row = mysql_fetch_assoc($result)) !== false){ $users[] = $row; } return $use...
- Wed Feb 15, 2012 5:38 am
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
yeah, well I died that before and it does not work. I manually added the user id to the url and got nothing. unless I add the value to the user manually like you showed me the tut does not find the kid and does not work, hence, i can't complete the last part of the tut
- Tue Feb 14, 2012 8:45 pm
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
Ok, I see. But I'm on a localhost MAMP. How can I make this program change the URL? Is that possible. All my url says is the name of the file profile.php. I also just realized I can't continue on with this tutorial because I have to connect to the session for the last part with the edit_profile page...
- Mon Feb 13, 2012 9:37 pm
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
Finally!!!!!! That worked. I removed this: ($_GET['uid']); Still can't understand what was wrong there? Thanks so much for taking the time to help. I actually think I learned a great deal about php through this.....I still have a very, very, long way to go though, obviously. thanks again for all you...
- Mon Feb 13, 2012 7:44 pm
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
I tried what you just said...entering an id in the browser and that doesn't work either. I tried with 0, 1, and 2. Same message....user does not exist. Am I supposed to specify the user better someplace in the PHP code????
Why does this code not work for me?
Why does this code not work for me?
- Mon Feb 13, 2012 8:42 am
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
SQLin user_profile is: SELECT * FROM `users` LIMIT 0 , 30 sql in users: SELECT `user_id` , `user_username` , `user_firstname` , `user_lastname` , `user_email` , `user_about` , `user_location` , `user_gender` FROM `user_profile`.`users` LIMIT 0 , 30 Also since removing that comma after gender I'm get...
- Sun Feb 12, 2012 6:53 pm
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
like this:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM `users` WHERE `user_id` = '0'' at line 9
That user does not exist.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM `users` WHERE `user_id` = '0'' at line 9
That user does not exist.
- Sat Feb 11, 2012 9:01 pm
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
I removed the comma and still get the same error message. Why is this TUT not working for me?????
- Sat Feb 11, 2012 8:14 pm
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
Ok, I changed that to semi quotes around the var and I still get the same error. I also found an error in the gender line and had a semi quote instead of a comma, I changed that too and still get the same error.
Any ideas????
Really stumped
Rob
Any ideas????
Really stumped
Rob
- Fri Feb 10, 2012 8:32 pm
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
Ok, I tried that and I got this: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' FROM `users` WHERE `user_id` = 0' at line 8 That user does not exist. But I don't know what this means or what syntax I should use...
- Fri Feb 10, 2012 6:24 am
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
Ok just figured something out......I did not create the inc folder and that seemed to fix the connect problem, obviously. Now I am getting a message that says "that user does not exist". So I think my user_info is certainly returning false but I am not sure why as I populated my database. ...
- Fri Feb 10, 2012 5:58 am
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
thanks again for taking the time to help me with this. Here is my code: ini.inc.php <?php session_start(); mysql_connect('localhost','root','mypass'); mysql_select_db('user_profile'); $path = dirname(__file__); include("{$path}/inc/user.inc.php"); $_SESSION['uid'] = 1; ?> user.inc.php <?ph...
- Thu Feb 09, 2012 5:32 pm
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
thanks again for the help. I just checked and there is nothing before the opening php tag and the mysql, localhost, tec are working fine too. is it possible this code is not letting me connect? # $path = dirname(__file__); # # include("{$path}/inc/user.inc.php"); Is there another way to ac...
- Wed Feb 08, 2012 8:20 am
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
Here is my error error_reporting(E_ALL); Warning: session_start(): Cannot send session cookie - headers already sent by (output started at -:4) in - on line 7 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at -:4) in - on line 7 Warning: mysql_conn...
- Wed Feb 08, 2012 8:17 am
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
Thanks again for replying and the assistance but it still did nothing. When I run profile.php I get a completely white/blank page with nothing on it at all. I added this code function fetch_user_info($uid){ $uid = (int)$uid; $sql = "SELECT `user_username` AS `username`, `user_firstname` AS `fir...
- Wed Feb 08, 2012 12:38 am
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
Re: User Profile tut not working
<?php function fetch_users(){ $result = mysql_query('SELECT `user_id` AS `id`, `user_username` AS `username` FROM `users`'); $users = array(); while (($row = mysql_fetch_assoc($result)) !== false){ $users[] = $row; } return $users; } ?> Thanks for the reply....I'm really stumped
- Tue Feb 07, 2012 9:17 pm
- Forum: Tutorials
- Topic: User Profile tut not working
- Replies: 30
- Views: 3949
User Profile tut not working
Hi, Ive spent about 3 hours now troubleshooting this tutorial and every time I get a blank page on my local server with absolutely nothing on it. an someone please help? Here is my code for ini.inc.php <?php session_start(); mysql_connect('localhost','root','mypass'); mysql_select_db('user_profile')...