Jump to content
#StayAtHome ×


  • Content Count

  • Joined

  • Last visited

  • Days Won


ginerjm last won the day on March 22

ginerjm had the most liked content!

Community Reputation

247 Excellent


About ginerjm

Profile Information

  • Gender
  • Location
    Voorheesville NY

Recent Profile Visitors

58,431 profile views
  1. What people are telling you is to NOT write your code like this and to learn how it SHOULD be done. Ignoring that - what is the problem now? YOu can't find the right value? Are you allowing for case being incorrect? Or have you researched how to make a proper compar to allow for different cases? Research, research, research - something a programmer has to do.
  2. So have you got your answer yet from Philw's post?
  3. Probably will need a good php reference guide to help you learn.
  4. I"m confused. Do you want to find the records with a specific id num or the ones that are students? And - a table with named "user_info" with a column named "userid" kind of implies that there is only one row that matches. Hmmm.....
  5. I"m guessing you did a little research to look up that function. Also called "implode". But you probably found that out too. Good work!
  6. Yes - forums (including this one) DO help people. But not with all of their tasks. Forums like this one help you address your code. Help you correct it or debug it or help you amend your solution. We are not here to just plain write it for you. We are here for people who are having difficulty but that means showing us the difficulty.
  7. And you are asking the PHP forum to do what for you?
  8. The message is correct. The problem is in the query. If you did it the way I said to do previously, you echo out the query itself with your error message and look at it. YOu have some bad logic in that query. Do it this way: $q = "SELECT cat_id, subcat_id, subcategory_title, subcategory_desc FROM categories c, subcategories s WHERE ($parent_id = categories.cat_id) AND ($parent_id = subcategories.parent_id"); $select = mysqli_query($con, $q); if (!$select) { echo "Error running query - $q<br>", mysqli_error($con); exit(); } Note how I wrote the query to make it more readable. And how I saved the query itself so that it can be echo-ed out to review. Your problem may very well be that you have two tables but you don't distinguish which selections are from which table. If you have fields with the same name in both tables the query engine doesn't know which one you want. Note how I assigned aliases in the query to the table names. Add those aliases to your field names by doing "c.cat_id" or "s.cat_id" depending which table the field comes from. And you are missing a closing paren.
  9. Add some checking in your code to be sure that the query was run successfully. Something like: // check if there was an error running the query if (!$select) { echo "Error running query : " . mysqli_error($con); exit(); } I'll let you figure out where to place this block of code This will print out a message if the query is failing you. Or if the $con did not get properly made prior to that. Suggestion. Always assign your query statement to a variable and then use the variable in the query call. That way you can have your error handling code print out the query for your review. As you have it now you can't do that.
  10. ginerjm

    php insert

    When you figure out where your "name" field went to, I highly suggest you modify some of your db field names. Using "date" and "time" is not good practice. NAME the field, don't just say date or time. And are all of these fields necessary on that one record? Should there be some division of them amongst a couple of tables to make a proper RDBMS?
  11. Since you're not showing us any code, let's play a guessing game. How do you know when they have paid on Paypal? Are you waiting for a message from PP telling you such? Or is there some connection you are making with code you have written that will give you back a response? This is fun!
  12. YOu posted an awful lot of c.... The problem is on LINE 20. Look at it and then figure out why your db connection or your query is failing you. That is the problem. Do you have error checking turned on?
  13. First change the while to an if. Then put all that at the top of your script and only execute it if your detect that the POST method has been submitted. If not, that's when you fall down to output the html part.
  • 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.