Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8163051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:55:58+00:00 2026-06-06T18:55:58+00:00

Sorry about the stupid question however I can’t see/ not good enough to solve

  • 0

Sorry about the stupid question however I can’t see/ not good enough to solve this:

I have a MYSQL db and a php form everything works but I can’t get out only one record – probably syntax error:

    $SQL = "SELECT * FROM massfelh WHERE user = $uname AND pass = md5($pword)"; - this is working
    $result = mysql_query($SQL); - this is too
    $catg = $result['categ']; - help
    $num_rows = mysql_num_rows($result); - this is ok too
    echo $catg; - for test and I can't print it on screen

DB structure: id, user, pass, categ

I only need the categ (either 1 or 0) but it just won’t show on screen.

Any help would be appreciated – and please say I am stupid too:)

Update:

thank you for everyone of you!!!!!!! Helped me a lot. I have fount the best solution for my code however all the reply was correct. Thanks again hop this will help to some one how is just as beginner as me:) thank you again

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:55:59+00:00Added an answer on June 6, 2026 at 6:55 pm

    Try This..

    $SQL = "SELECT * FROM massfelh WHERE user = $uname AND pass = md5($pword)"; 
        $result = mysql_query($SQL);
        $result = mysql_fetch_assoc($result);
        $catg = $result['categ'];
        $num_rows = mysql_num_rows($result); 
        echo $catg;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

sorry about input mistakes, english its not my mother lang. I have this code
Firstly I asked sorry if this is a stupid question. but I have a
I have a question about regex/Python. Sorry if this topic has been discussed millions
Sorry ... about this silly/stupid question, guys: Why aren't equals() and hashCode() being applied?
Yeah, sorry about asking a stupid n00b question. So I have a C# program.
sorry for stupid question. But really interesting and incomprehensible. In this session discussed about
Sorry if this is a stupid question, but it's something that I'm curious about.
Sorry about the extremely vague question title (any suggestions for improvements welcome) I have
Sorry about the wording for my question title. I have a basic HTML anchor
Sorry if this seems like a stupid question but im actually having a hard

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.