here's my code:
$sql="select catid,catname from categories";
print "sql:$sql";
$result = @($sql, $db);
print "<table cellpadding=5 border=1>\n";
while ($myrow = @mysql_fetch_row($result)) {
$ucatid = urlencode($myrow[1]);
$ucat = 'xx';//urlencode($myrow[2]);
print "<tr><td>$ucat</td><td><a href='$PHP_SELF?action=DelCat&category=$ucatid'>X</a></td></tr>\n";
}
print "</table><br>\n";
There is one record in the table when I run the query from php admin. Nothing is showing up when I display it here. The connection is opening okay.
Also when I run the following
$sql="insert into categories(catname) values('$category')";
@( $sql, $db ) or die( "Error : " . mysql_error() );
}
I get a blank screen with the word "Error:" on it.
What am I doing wrong?
Any ideas?