Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. Try to change your query to: $queryi = "SELECT DISTINCT(album) FROM `photoalbum` WHERE `userid` = '$idpic'";
  2. Are you calling session_start() at the top of your script?
  3. If what Guardian-Mage suggested doesn't fix it, try to use mysql_real_escape_string() on all your variables.
  4. <table border=0 cellpadding=8> <tr> <td>Name:</td> <td>--</td> </tr> <tr> <td>Date:</td> <td>--</td> </tr> <tr> <td>Description:</td> <td>--</td> </tr> <tr> <td>Image:</td> <td>--</td> </tr> </table>
  5. You never stated your exact problem, but looking at your code you need to change this line: $team = $_GET['team']; To $team = $_POST['team'];
  6. Look at the function str_replace().
  7. You never close your left() function. function left() { So put the closing bracket wherever that function ends.
  8. We are not here to program scripts for you. We are here to help you along with your struggles as you attempt to write the script yourself. If you don't want to try yourself, you should be posting this in the freelance section and paying someone for it. There may be someone here generous enough to take time away from their life and program this for you, but that's really not what this forum is for. Would you like me to point you to some tutorials so you can try to help yourself?
  9. It's mysql_real_escape_string(), not mysql_escape_string(). Try $delete = mysql_query("DELETE FROM mytable WHERE user='".mysql_real_escape_string($_REQUEST['delete'])."'",$c); Also, what is the point of the line below the query? I don't understand why you just have $delete there.
  10. When they visit a page they have to be logged in to view, store the URL of the page they were trying to visit into a session. Then when they log in, just redirect them to whatever page the session has in it.
  11. You want these variables set BEFORE the form is submitted? So in other words, you want them to automatically set as soon as they type text into the fields? If that's what you want, I'm sure you can get it done using AJAX. You can't do that with just PHP. If what your trying to say is that they have already submitted one form and you want to fill the second one with the values of the first, then you would do this: <html> <body> <?php $imageURL = $_POST['imageURL']; $imageHeight = $_POST['imageHeight']; $imageWidth = $_POST['imageWidth']; $URL = "http://localhost/thumbnails/thumbs.php?image=".$imageURL."&height=".$imageHeight."&width=".$imageWidth; ?> <form action="<?php print $URL; ?>" method="GET"> <input type="text" name="imageURL" value="<?php echo $imageURL; ?>"> If I completely missed the question, please explain in more detail.
  12. What is ":cid"? I don't know why your putting a colon in there, I think you mean for it to be "$cid".
  13. You can use a switch statement. It's really not going to shorten your code much, but it was made for situations like this.
  14. You still haven't made it clear to what you want.
  15. Why do you need it as a separate loop? You need to explain exactly what your trying to do.
  16. I only see one loop...? Exactly how do you want them separated?
  17. Why are you echoing $i++? The problem your having now is just an HTML issue. You need to put <td>'s around the $i. while($member = $query->fetchrow()) { echo "<tr>\n"; echo "<td>$i</td>; echo "<td><a href=\"profile.php?id=" . $member['username'] . "\">"; echo ($member['username'] == $player->username)?"<b>":""; echo $member['username']; echo ($member['username'] == $player->username)?"</b>":""; echo "<td>" . $member['money'] . "</td>\n"; echo "<td>" . $member['level'] . "</td>\n"; echo "</tr>\n"; $i++; } Also, you never close any of your <th>'s.
  18. $i = 1; while($member = $query->fetchrow()) { echo "<tr>\n"; echo "<td>$i</td>"; echo "<td><a href=\"profile.php?id=" . $member['username'] . "\">"; echo ($member['username'] == $player->username)?"<b>":""; echo $member['username']; echo ($member['username'] == $player->username)?"</b>":""; echo "<td>" . $member['money'] . "</td>\n"; echo "<td>" . $member['level'] . "</td>\n"; echo "</tr>\n"; $i++; } EDIT: Beat to it.
  19. When you update the database, are you also updating the session? If you are, show the related code.
  20. user $_SERVER['PHP_SELF'] instead fo $PHP_SELF.
  21. Replace the question mark in your query $query = "SELECT user_id, username, pwd, user_email FROM users WHERE user_id = '$user_id' LIMIT 1"; Make sure the query doesn't return an error. It's hard to tell you how to find errors in your code, because you have your own database class. If it comes down to it, echo out the query and try manually putting it in phpmyadmin to see if it works.
  22. Try to echo it out $user_id = $_GET['user_id']; echo $user_id; If that doesn't display anything, double check that "user_id" is in the URL, and is spelled correctly.
  23. Maybe there is an error in your query for the view records script. Try changing $r = @mysqli_query ($dbc, $q); To $r = mysqli_query ($dbc, $q)or die(mysql_error()); I'm not familiar with using "mysqli", so hopefully the error function is the same. Also, is there a reason your suppressing errors with the @?
×
×
  • 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.