Jump to content

ryeman98

Members
  • Posts

    286
  • Joined

  • Last visited

    Never

Everything posted by ryeman98

  1. That wasn't there error. Count the braces before you post.
  2. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/4617/domains/somesite.com/html/admin/customisation/index.php on line 515 Lines 512-531: // BACKGROUND=EDIT $id = $_POST['id']; $getback = ("SELECT id FROM CustomisationBackgrounds WHERE id='$id'"); $row5 = mysql_fetch_array ($getback); ?> <form name="editBackground" action="editBackground.php" method="post"> <input type="hidden" name="id" value="<?php echo $row5['id']; ?>" /> <table width="100%" border="0" cellpadding="0" cellspacing="5"> <tr> <td><b>Name:</b></td> <td><input type="text" name="name" value="<?php echo $row5['name']; ?>" /></td> </tr> <tr> <td><b>IMG URL:</b></td> <td><input type="text" name="img_url" value="<?php echo $row5['img_url']; ?>" size="60" /></td> </tr> <tr> <td> </td> <td><input type="submit" name="submit" value="Edit Background" /></td> </tr> </table> </form>
  3. It's showing the page now but still has that error... :-\
  4. When I take out the mysql_fetch_array() it works fine...
  5. True. Sorry. $editclothing = mysql_query("SELECT * FROM CustomisationClothing WHERE name='$name'");
  6. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/4617/domains/sunnyneo.com/html/admin/customisation/index.php on line 355 Line 355: while($row4 = mysql_fetch_array($editclothing)) { Help?
  7. Ok, thank you! If I have any problems, I'll come back
  8. // all the if statements here } mysql_query("INSERT INTO table (`stuff`, `stuff`, etc.) VALUES('$variable', '$variable', ect.)") or die(mysql_error());
  9. OK. But if the query is outside of the if braces { } will it still get the correct variables?
  10. Well, the only thing is that I have to make 54 of those so if it doesn't work (I'll check multiple times for errors) then... yeah Will it still work if the the query isn't within the braces?
  11. <?php if ($_POST['check'] == "yes") { $check = "yes"; } else { $check = "no"; } ?> Will that work when I insert it into a query or no?
  12. Ok. I have a script where there is a long list of 54 names with checkboxes under each name. When I submit the form, how can I enter them in the database? Each name is ENUM 'yes', 'no' so whichever ones are checked, I want them to say yes and whichever aren't to say no. Any ideas on how to do this? Thanks.
  13. I'm not sure how to go about this. I have a bunch of things in database and I want them to show in a table. Only problem is that I only want 5 columns per row. How can I make it so that after 5 columns are full, it'll automatically have a new row? I have about 54 entries that need to be displayed.
  14. Thanks rcorlew! I completely forgot to add in the WHERE! xD
  15. Hi there! I've created a page where there are 2 categories of a list of projects. The first one is Current Projects where it'll display current projects and another that is Future Projects. In my database, I have a column called 'status' which can either be current or future. How can I make it so that the Future Projects will only display the projects when the status 'future' and the Current Projects display when the status is 'current' I've attempted a few things but they don't work, both lists will show all of the entries.
  16. Nothing appears... It's just a blank page. :-\
  17. 1You have deleted the project from the list. Back? I noticed the 1 but I don't know what that means.
  18. <input type=\"hidden\" name=\"id\" value\"".$row['id']."\"> <input type=\"image\"src=\"http://php.sunnyneo.com/images/cancel_f2.png\" alt=\"Delete\"> I just don't get it... :-\
  19. I just don't get it... the connection is fine and the page doesn't show any errors at all so I have no idea what's wrong. Please help. <?php require($_ENV['SITE_HTMLROOT']."/include/dbconnect_class.php"); $db = new DB; ?> <?php $id = $_POST['id']; mysql_query("DELETE FROM projects WHERE id='$id'") or die(mysql_error()); echo "You have deleted the project from the list. <a href=\"/project.php\">Back?</a>"; ?>
  20. I did before but there still isn't any.
  21. I'm sorry I have to double bump but I don't know why it isn't working... there aren't any errors or anything.
  22. This place is usually for people that have code that may have an error in it. Do you have any code at all? Your post lacks both detail and 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.