Hello, I'm new to PHP, yet is a language i look for to control, i was trying to make this tutorial http://www.ngxdesigns.com/tutorials/view/?...=view&id=13, and when I run it it gives-me this Error
"Add News TopicHello and welcome to the News administration. From here you can add, delete and modify news topics. You may have to click here? for effects to take place. Un-Validated
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/workshop/public_html/admin.php on line 26
Validated
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/workshop/public_html/admin.php on line 55"
I checked it out and found it both have something to be with
Line 26
while($row = mysql_fetch_array($query)) {
echo"
<table width='100%''>
<tr>
<td width='50%'>
$row[title]
</td>
<td width='10%'>
<a href='$self?action=delete&id=$row[id]'>Delete</a>
</td>
<td width='10%'>
<a href='$self?action=mod&id=$row[id]'>Modify</a>
</td>
<td width='10%'>
<a href='$self?action=view&id=$row[id]'>View</a>
</td>
<form action='$self?action=valid&id=$row[id]' method='post'>
<td width='10%'>
<input type='submit' name='submitvalid' value='Validate?'>
</td>
</form>
</tr>
</table";
}
echo"";
And line 55
while($row = mysql_fetch_array($query)) {
echo"
<table width='100%''>
<tr>
<td width='50%'>
$row[title]
</td>
<td width='10%'>
<a href='$self?action=delete&id=$row[id]'>Delete</a>
</td>
<td width='10%'>
<a href='$self?action=mod&id=$row[id]'>Modify</a>
</td>
<td width='10%'>
<a href='$self?action=view&id=$row[id]'>View</a>
</td>
</tr>
</table";
}
echo"";
And I wonder what am I doing wrong, I hope someone can help me to figure this out.
Thanks .
Ignatheos
PHP News system
Started by Ignatheos, Jun 04 2007 11:49 AM
1 reply to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
