Jump to content

john010117

Members
  • Posts

    492
  • Joined

  • Last visited

    Never

Everything posted by john010117

  1. Ok, then. So first, get the data from the database. Then, using the code I've posted above... <?php // I'm assuming you've already made the db connection and have executed the query... // Substitute the row name while($row = mysql_fetch_array($result)) { echo '<img src="/images/' . $row['lang'] . 'flag.gif">'; } // blah... ?>
  2. http://www.phpbb.com/ ... or simply search it on Google...
  3. Yes, there is a way. First, name all of your image files the same way (ex: LANGflag.gif) and they should all be in the same folder. Then when you display it, just use <?php $lang = $_GET['lang'] // (or however you get your user's language) echo '<img src="/images/' . $lang . 'flag.gif">'; ?>
  4. Heh, I'd look into phpBB's lang source code. They have it in arrays, but you'll have to download additional language packs.
  5. Did you put session_start() at the very beginning of both files?
  6. <?php $idr = $_GET['idr']; $table = $_GET['table']; echo '<a href="printquote.php?idr=' . $idr . '&table=' . $table . '">link</a>'; ?>
  7. First of all, I suggest you put session_start() at the beginning of login.php. Then, in logout.php, you have to start the session first, then destroy it.
  8. Yes, it's a $_GET[''] function. <?php $idr = $_GET['idr']; $table = $_GET['table']; echo '<a href="printquote.php?idr=' . $idr . '&table=' . $table . ">link</a>'; ?>
  9. $query = "SELECT rank FROM `ranks` WHERE id IN(" . implode(',', $rankid) . ")"; $result = mysql_query($query) OR DIE (mysql_error()); Putting it in variables is sometimes easier.
  10. It'll be better if you posted the relevant part(s) of the code here, as I am not going to click those links. However, have you looked at array_merge() ?
  11. Try this: $result = mysql_query("SELECT rank FROM `ranks` WHERE id IN (" . implode (',',$rankid) . ")");
  12. What exactly were the errors that you got?
  13. We're here to help, not to make the entire thing for you. Try to get started on it first, and we'll be glad to help you along the way.
  14. Put <?php error_reporting(E_ALL); ?> at the very top of the page. See if any error message comes up.
  15. That worked! Thank you all so much for helping me out with this.
  16. I don't really get what you mean by the question, but the field "msg_id" is the same in both tables. I'll try that out.
  17. Nevermind. You started the session already ($_SESSION['username'] = $username). I overlooked that before. Sorry. Solution: check_login.php: <?php session_start(); mysql_connect("localhost", "root", "xxxxxxxx"); mysql_select_db("xxxxxxxxxxxx"); $username = $_POST['username']; $password = $_POST['password']; $sql = "SELECT * FROM users WHERE username = '$username' AND password = '$password'"; $result = mysql_query($sql); if (mysql_num_rows($result) == 0) { echo "Username and password combination not found."; } else { while($row = mysql_fetch_array($result)) { $_SESSION['username'] = $row['username']; } header("members.php"); } ?>
  18. Since I'm dealing with multiple tables, that wouldn't work.
  19. You didn't start $_SESSION['username'] in check_login.php...
  20. That just deletes ALL of the records. I believe I need the limit in there.
  21. DELETE privmsgs, privmsgs_spec FROM privmsgs, privmsgs_spec WHERE privmsgs.msg_id IN (4,5) LIMIT 2
  22. File 1: <?php // Blah Blah include ('file2.php'); ?> File 2: (the include file) <?php echo '<td></td>'; echo '<td>'; ?> You don't really have to use PHP in the include file... <td></td> <td>
  23. @ roopurt18: I got this error: My query now looks like this: <?php $query = "DELETE $privmsgs_tbl_name, $privmsgs_spec_tbl_name FROM $privmsgs_tbl_name, $privmsgs_spec_tbl_name WHERE $privmsgs_tbl_name.msg_id IN (" . implode(', ', $_POST['pm_delete']) . ") LIMIT " . count($_POST['pm_delete']); ?> Any ideas? @ Hypnos: I'll try it out.
  24. Try $_POST['check']['1'] or maybe $_POST['check'][1]
  25. Will this work with deleting rows from multiple tables that I have now? They all have the same ID as their common row.
×
×
  • 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.