Jump to content

zrueda

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

zrueda's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Uhm, what the hell? I was doing you guys a favor.. and I worked hard on that thread.
  2. Wait how do I put a table in my database?
  3. It was a simple fix. Thanks for your time.
  4. It must not be in the database. Thanks!
  5. Ok now it says. Table 'bortix_lockerzinv.urls' doesn't exist
  6. Now since I know the error its. Table 'bortix_lockerzinv.urls' doesn't exist
  7. Can you change what I need for me? I'm kinda a noob at this.
  8. Nope didnt work. Same error on line 93. Someone told me that I need an sql file and another told me it just stores in the database.
  9. Niether of those worked. oni-kun, something was wrong with echo '<td><center><input type="button" value="Delete" onclick="window.location.href=\'index.php?delete=\' . $row['id'].''"alt="Delete"></center></td></tr>';
  10. Woops! Ok I put 93. before the line. It should be like 93.while ...
  11. Ok I have had this problem all day with mysql for my Admin Panel. I get this error. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/bortix/public_html/lockerzinv.com/admin/index.php on line 93 This is the php. Code I will mark which is line 93. With 93. If you solve this I will reward. <?php $con = mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("database", $con) or die(mysql_error()); if ($_POST['newurl'] != '') { $url = $_POST['url']; mysql_query("INSERT INTO urls (url) VALUES ('$url')"); $new_url = true; } else if ($_GET['delete'] != "") { $del = $_GET['delete']; mysql_query("DELETE FROM urls WHERE id='$del'"); $url_delete = true; } ?> <html> <head> <link rel="stylesheet" type="text/css" media="all" href="../main.css" /> <title>Lockerz Invites - Admin Panel</title> </head> <body> <center> <? if ($add_new) { echo '<div class="success"><center>New URL added successfully!</center></div>'; } ?> <? if ($url_delete) { echo '<div class="success"><center>URL Deleted successfully!</center></div>'; } ?> <form name="addurl" action="" method="post"> <input type="hidden" name="newurl" value="1"> <table class='alternate'> <tr bgcolor="b96e00"> <td><font color="ffffff"><center>URL</center></font></td><td></td> </tr> <tr bgcolor="555555"> <td><center><input type="text" name="url" value="" maxlength="1024" size="90%"></center></td> <td><center><input type="submit" value="Add"></center></td> </tr> </table> </form> <br> <table class='alternate'> <tr bgcolor="b96e00"> <td><font color="ffffff"><center>URL List</center></font></td><td></td> </tr> <? $searchresult = mysql_query("SELECT * FROM urls"); 93.while($row = mysql_fetch_array($searchresult)); { echo '<tr bgcolor="555555">'; echo '<td><center><input type="text" name="url" value="' . $row['url'] . '" readonly></center></td>'; echo '<td><center><input type="button" value="Delete" onclick="window.location.href=\'index.php?delete=' . $row['id'] . '\'" alt="Delete"></center></td></tr>'; } ?> </table> </center> </body> </html>
  12. Ok I have had this problem all day with mysql for my Admin Panel. I get this error. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/bortix/public_html/lockerzinv.com/admin/index.php on line 93 This is the php. Code I will mark which is line 93. With 93. If you solve this I will reward. <?php $con = mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("database", $con) or die(mysql_error()); if ($_POST['newurl'] != '') { $url = $_POST['url']; mysql_query("INSERT INTO urls (url) VALUES ('$url')"); $new_url = true; } else if ($_GET['delete'] != "") { $del = $_GET['delete']; mysql_query("DELETE FROM urls WHERE id='$del'"); $url_delete = true; } ?> <html> <head> <link rel="stylesheet" type="text/css" media="all" href="../main.css" /> <title>Lockerz Invites - Admin Panel</title> </head> <body> <center> <? if ($add_new) { echo '<div class="success"><center>New URL added successfully!</center></div>'; } ?> <? if ($url_delete) { echo '<div class="success"><center>URL Deleted successfully!</center></div>'; } ?> <form name="addurl" action="" method="post"> <input type="hidden" name="newurl" value="1"> <table class='alternate'> <tr bgcolor="b96e00"> <td><font color="ffffff"><center>URL</center></font></td><td></td> </tr> <tr bgcolor="555555"> <td><center><input type="text" name="url" value="" maxlength="1024" size="90%"></center></td> <td><center><input type="submit" value="Add"></center></td> </tr> </table> </form> <br> <table class='alternate'> <tr bgcolor="b96e00"> <td><font color="ffffff"><center>URL List</center></font></td><td></td> </tr> <? $searchresult = mysql_query("SELECT * FROM urls"); while($row = mysql_fetch_array($searchresult)); { echo '<tr bgcolor="555555">'; echo '<td><center><input type="text" name="url" value="' . $row['url'] . '" readonly></center></td>'; echo '<td><center><input type="button" value="Delete" onclick="window.location.href=\'index.php?delete=' . $row['id'] . '\'" alt="Delete"></center></td></tr>'; } ?> </table> </center> </body> </html>
×
×
  • 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.