Jump to content

MmmVomit

Members
  • Posts

    319
  • Joined

  • Last visited

    Never

Everything posted by MmmVomit

  1. How exactly is the site supposed to work? What are you tracking? Why are you tracking it?
  2. It depends on what you want to do. You will probably have to use several of them.
  3. Your original post. Which would make sense. mysql_fetch_assoc() returns an array. You want to store the result of mysql_fetch_assoc() to a different variable, then grab the ID number from the 'id' element of the array. How can I do this? The second part, I mean. $row = mysql_fetch_assoc($result); $id = $row['id'];
  4. Which would make sense. mysql_fetch_assoc() returns an array. You want to store the result of mysql_fetch_assoc() to a different variable, then grab the ID number from the 'id' element of the array.
  5. ID = username? Like I said, I don't know how he has his db set up, but a column called "ID" doesn't generally contain usernames.
  6. ^^^ run this query and post the output ^^^
  7. The submit button is not part of the form. Move the closing form tag to after the submit button.
  8. I don't know how your db is structured, but this could be a problem, too. WHERE id = '".$username."'";
  9. Something I noticed, but I don't know if it is causing your problem or not. $aim = $_POST['aim']; $msn = $_POST['aim']; // msn = aim? $website = $_POST['msn']; // website = msn? $hobbies = $_POST['website']; // hobbies = website? $movies = $_POST['hobbies']; // movies = hobbies? $books = $_POST['movies']; // books = movies?
  10. The id attributes should probably be name attributes instead. Edit: wait, nm. They're already there.
  11. That second one isn't quite right. It will fail if $b is set to '0'.
  12. It's not going to be part of the form, it's going to be part of the script that checks the data retrieved from the form.
  13. Variable variable names don't work like that. You would need to pass two arguments, one being "_GET" and the next being "Variable", then use one parameter as an index to the array.
  14. http://www.phpfreaks.com/forums/index.php/board,7.0.html
  15. INNER JOIN members ON members.mem_id=topics.topic_author_id
  16. <?php $sql = "SELECT * FROM table WHERE team_name = '$team_name';"; $result = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($result) > 0) { // team already registered } else { // team not registered } ?> Do the same thing for username.
  17. Your WHERE clause needs to go after all the JOINs.
  18. You should post your question about database structure in the Application Design/Layout forum. If you have specific questions about your code, post some code, and the specific problem you're having.
  19. Try getting rid of the single quotes around $year
  20. I don't know. If someone's trying to be clever, you just get to show them that you're more clever and output some snarky message. Banning is a bit much, but I know I'd be amused if that happened to me. You could have the hidden input and simply put a completely unrelated value in it.
  21. You're going to have to store the last value selected in some manner. If you want this to persiste between visits to the website, you're going to have to store it in the database somewhere. If you only want it to work per visit to the website, do what BlueSkyIS suggested, but base it on the POST or GET data.
  22. All you're doing is creating a sql query and storing it in a string. You need to use mysql_query() to run the query and submit the data to the database.
  23. That is strange. Are you doing any monkeying around with cookies or GET variables that could be screwing up the sessions?
  24. $queryres = mysql_query("SELECT * FROM reservations WHERE YEAR(tour_date) = $var_containing_year ORDER by tour_date DESC", $mysql_connect);
  25. Put code tags around your code. Code tags look like this. [code] code goes here [/code]
×
×
  • 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.