Jump to content

Need Help Quick. Willing to pay!


zrueda

Recommended Posts

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>

 

Link to comment
Share on other sites

remove it and add this

 

<?php 

$result = mysql_query("SELECT id, url FROM urls") or die(mysql_error());

while($row= mysql_fetch_array($result))
{
      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>';
}

?>

Link to comment
Share on other sites

That would mean there is no table named 'urls' in the 'bortix_lockerzinv' database. Is that the correct database?  Does the table exist?  Check the case, 'urls' might not be the same as 'URLS' depending on the configuration.

Link to comment
Share on other sites

That would mean there is no table named 'urls' in the 'bortix_lockerzinv' database. Is that the correct database?  Does the table exist?  Check the case, 'urls' might not be the same as 'URLS' depending on the configuration.

 

It must not be in the database. Thanks!

Link to comment
Share on other sites

Crayon can you please ban him (via ips associated with his account), he brings nothing but smear and indecency to these threads.

 

I would have helped regardless, it is not about the money, but rather the false proposition made. I bet he never had any intentions of following through, what is more disturbing is that he did this with the intention and foreknowledge that it would steal attention/aid from ALL other members and focus it all on his issue. Done so maliciously, selfishly and intentionally.

 

 

Link to comment
Share on other sites

I'm not defending the OP, but I really don't understand why you are so upset. 

 

Technically, he could paypal you $0.01 and fulfill his end of the bargain. Even more technically, "willing to pay" does not mean "will" pay, nor does it mean what will be paid.  Same goes for "reward." He promised a reward, but did not mention what that reward would be.  Instead of asking for details or securing anything with him, you jumped right in and helped.

 

He could technically fulfill his end of the bargain by forking over a penny or just saying "Thanks!" ("Thanks" can be a payment, and it can also be a reward).  You are obviously not happy with him saying "Thanks!"  Would you have been happy if he paypaled you $0.01?  I have a sneaking suspicion you would have been bitching just the same.  But for what? As mentioned, you guys came to no official, or even unofficial agreement on anything. 

 

Again, I'm not defending the OP.  But I put this in the same category as people who purposely post in higher volume forums to get a quicker answer, or post in multiple forums, or bump every 2 seconds. 

 

I think instead of you getting upset at him about it and demanding vengeance, you should chalk it up as a lesson learned, laugh about it, and get over it.  Sorry, but that's just the way it is.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.