If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Member unclekyky's Avatar
    Join Date
    Sep 2003
    Member #
    I have a script that checks if the user is logged in(that part works). I can request the username with $_SESSION['username'].

    I also have a table in my DB with the location of the user.

    So when i collect some info from a textbox(that works), the username of the person who submited it(that works too), and the location(this doesn't work).
    When i request the location it say: Resource id #10 or Resource id #12. What is the problem?

    PHP Code:
    require 'db_connect.php';
    $logged_in == 1) {
    'You are logged in as '.$_SESSION['username'].'.');

    $db mysql_connect("localhost","webjunk","**********"); 
    mysql_select_db ("webjunk_test"); 
    $q mysql_query("SELECT location FROM users WHERE username = '".$_SESSION['username']."'");

    $query "INSERT INTO post (name, comments, location) 
    $result mysql_query($query); 
    include "post.php";


  3. #2
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    San Francisco, CA
    Member #
    2 times
    Most likely you are trying to output the value of a mysql_query, that's what the Resoruce ID # are AFAIK. From your code, it's hard to tell exactly what's going on since post_view and post are missing and probably contain the offending code.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 09:14 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: