Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. I would love to help you out but, to tell you the truth, I have no clue what you're talking about or asking...
  2. Just curious but what exactly is the difference between those two changes?
  3. Maq

    CURL LOGIN

    Do you mind explaining what exactly this is for? I'm not assuming it's malicious, just curious...
  4. Have you checked in the manual: error_reporting()?
  5. There's something before the SQL block causing a blank page. Put this at the top of your script: ini_set ("display_errors", "1"); error_reporting(E_ALL);
  6. I'm guessing your reply was directed at my response, since I'm the one that mentioned auto-increment. I am certainly aware that you needn't add the auto-increment field to your insert statement. What I was assuming and alwaysbrasilian later confirmed was that he has another table with user information. His primary key in that table could be an auto-increment, SSN, Student ID, whatever as long as it's unique. That ID would be a foreign key in this table that links the quiz results to the student who took them. If the student can take the quiz more than once, it would not be unique. And since it is not the primary key in this table it should certainly be added. No? I was referring to this chunk of code... He has "Where ID = '1' which is going to update the same record over and over: UPDATE lesson01 SET Q01='$Q01', Q02='$Q02', Q03='$Q03' Where ID='1' "; I agree with you, jlavik, that he should be using something similar to: $sql = "INSERT INTO lesson01 (Q01, Q02, Q03, ID) VALUES ('$ques[0]' , '$Q02', '$Q03', $User_ID)"; Because then he would have "ID" which would be the PK for the other user_table's PK. My point was that there should be another auto-increment "quiz_ID" that can keep track of each individual quiz.
  7. Show us line 9 along with some of the surrounding code.
  8. Yep sorry about that Regex definitely is better here for reasons CV mentioned
  9. Why don't you reference the manual - OOP?
  10. Correct except for you should be using explode() instead. It will return an array and you can have multiple delimiters (. ! ? etc...).
  11. You don't need to escape all of those single quotes in your values.
  12. The point is that this forum is free. No one here is obligated to answer your questions or help you. Personally, if I think someone is rude and demands someone to make it 'tidy' and have it done by a certain day, chances are, I probably won't help them...
  13. You need to use something like: LIKE 'V%'
  14. Not really, that's pretty impolite. Did you notice how no one helped you...?
  15. Wrong. Already discussed this. This too... There are multiple ways to get rid of these records but I find the easiest is with the DATE_SUB() function. There are some examples you can use from the link. You also need to use the crontab or windows task scheduler depending on what OS you're server is on. I think the command is "crontab -e" or something. Read more Here.
  16. Do you mean anywhere in their name, or starting with v?
  17. No one knows what this is or what it is supposed to do, nor can we read that.
  18. $sql = "SELECT username, password FROM adminlogin WHERE username = '$username' AND password = '$password'"; EDIT: What Yesideez said
  19. Most people use UPDATE like this: $sql = "UPDATE comments_test SET user = 'A', comment_Link = 'B', Project_Key = 12 WHERE Key=6;" echo "Your query: " . $sql; mysql_query($sql) or die(mysql_error()); Although I think you can use the syntax you were trying.
  20. Sure, you just had some SQL syntax errors. mysql_error() should have picked that up...
  21. $sql = "SELECT * FROM calender_events WHERE event_start = '$event_start'";
  22. What makes you think that it won't work, did you try it?
  23. Should be regular tags. Can we see a sample of your code and how you're displaying it?
  24. You would have to store the last time they filed. Then write a script and put it in the crontab that checks to see if the last time they filed is 30 days longer than now.
  25. Is there an echo in here?
×
×
  • 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.