Jump to content

AStrangerWCandy

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Everything posted by AStrangerWCandy

  1. Hey Coreye I think I have allllll of those fixed If you have time could you give it a once over again?
  2. Hi I have a site at www.thebuddyfolder.com The site is written in PHP and structured with <DIV> tags that float. Whenever the site is zoomed in the page breaks and everything stacks on top of each other. I'm fairly newbish when it comes to CSS so any advice on what may fix that would be appreciated.
  3. Coreye was that including a ' in the subject or in the body or both on the PM error?
  4. Good catches, tyvm Don't think they should be too hard to correct
  5. Link: http://www.thebuddyfolder.com Basically it's a social networking site coded in PHP with help from these forums Rather then what MySpace/Facebook do, which is connecting users by real life times, Buddy Folder allows users to list the usernames they use in MMORPGs, Instant Messengers, Skype, Forums etc... and then allows others to search and friend them based on that info. Tested mainly in IE8 and Chrome. Would definitely appreciate any feedback. Especially those of you who create profiles and mess around with features. PHPFreaks is available to list your username under the communities section to get you started
  6. Sorry for my newbishness but how would that translate over to making a line like <tr><td><img src="$countryname.jpg"> $CountryName</td><td> $number_of_users Members</td></tr>
  7. So I have a site with a private member system. When users register they indicate their country. This is stored in it's own column in a mySQL database and is recalled later to display a little flag on their user profiles. I'd like to create a site stats page that shows the # of users from any particular country. There are 200+ countries listed as options to choose from. Is there a way to create a page that says the count for each country type without doing 200+ count SQL queries? (Meaning could I do one query and then sort through that data after having done the query)
  8. Sorry just going back now and doing all my security cleanup like addslashes on user input and whatnot and figured the user not being able to see the URLs would add a level of security.
  9. Don't need to worry about hiding URLs on links, but I'd like to hide them on some of my form buttons, is there a way to make where those forms redirect not appear on the status bar of IE?
  10. I also should probably add the loggedin session variable is being set within a function
  11. Added that in and the variable is still not going away
  12. of index.php? no I dont session_start() is the first line of the header.php that I require on all pages
  13. Might be better if I post the whole code of what I'm trying to do: <?php require("header.php"); // The banner logo and ad app. Also begins the overall page table. if ($_GET['action'] == "logout") { unset ($_SESSION['loggedin']; session_destroy(); require("sidebar.php"); // The app that determines if you're logged in, if logged in displays sidebar menu, if not offers login/signup require("announcements.php"); // Gives main page with announcements require("footer.php"); // Copyright info and ties up the overall page table. } else { require("sidebar.php"); // The app that determines if you're logged in, if logged in displays sidebar menu, if not offers login/signup require("announcements.php"); // Gives main page with announcements require("footer.php"); // Copyright info and ties up the overall page table. } sidebar.php is where the login box is and it starts off with: if ($_SESSION[loggedin] = yes) { and on from there
  14. Hrm I switched it to session_destoy() and had both the unset and session destroy and neither one logged the person out. It removed the variables indicating username and whatnot but the logged in session variable remains. I even had it print the session variable right after session_destroy and that variable remains
  15. Indeed you guys are awesome I'm still a beginner. Finally made a system of logging in that works great, validates and crypts but some simple stuff like this still trips me up. I am now returning the proper value however I have a feeling im using unset improperly. the rest of the code is as follows: if ($_GET['action'] == "logout") { unset ($_SESSION['loggedin']); It dosnt seem to actually unset that variable when the link is clicked or page refreshed.
  16. Is $_POST required prior to using $_GET? I have a hyperlink which is index.php?action=logout When that link is clicked Im trying to get it to unset the logged in session variable. I have this code: if ($_GET['action'] = logout) which unsets the variable if its true, however $_GET['action'] does not ever seen to equal anything. I've been trying to print it to see what the problem is as no error is generated and I get nothing. Am I going about this the wrong way?
  17. Okay so adding crypt () to the password box on my Login script since I did on my registration script and am getting the following error after doing so: Warning: mysql_result() expects parameter 1 to be resource, boolean given in URL on line 106 here is line 106: $Count = mysql_result ($result2,0); and here is the line in context to what I did: $securepass = crypt ($_POST['password']); $sql2 = "SELECT count(*) FROM Users WHERE userName='$_POST[username]' AND passWord='$securepass'"; $result2 = mysql_query($sql2); $Count = mysql_result ($result2,0);
  18. Thanks, what was it! However now that I removed the space I submit this: INSERT INTO users (user_Id, userName, pass, firstName, lastName, country) VALUES (id4a99b9563701d, abcd, abcd, abcd, abcd, UnitedStates) and its giving me an error stating #1054 - Unknown column 'id4a99b9563701d' in 'field list'
  19. Having the php program print out the mysql query it generates, and it looks fine. INSERT INTO users (user_Id, userName, pass, firstName, lastName, country) VALUES (id4a99b9563701d, abcd, abcd, abcd, abcd, United States) I cut and paste this line into phpmyadmin on the proper database and get #1064 - 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 'States)' at line 1 The columns match up perfectly in case and letters. All are VARCHAR 30 or higher
  20. Oh and thanks again for the help guys, I've completed the login script and it works perfectly!
  21. Another question that didn't seem like it needed another thread. Would it be a good security precaution to set a bunch of junk $_SESSION variables that essentially do nothing upon login and then using a random one of those as the actual login signifier as a defense against potential spoofing?
  22. yeah pretty sure I'll be rewriting it so that when user information in the database is created it adds a unique id the user never sees, and then stores THAT in the session to signify who is looking at the page. Would it be better to keep it seperate? One part of the session says you are logged in, then a second part says who the person logged in is. BTW I just have to say this forum is already phenomenal, never seen such quick and helpful responses regarding anything in my life ;P
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.