Menu

#1 Can't add records unless there's already at least one

open
6
2011-04-28
2011-04-28
No

Need to move this section:

if ($can_add=='1') {
$addstring="<a href='{$_SERVER['PHP_SELF']}?action=add&table=$table&limit=$limit'>Add</a>";
}
print('<br>'."\n".'<table width='.$width.'% align="center">'."\n");
print(" <tr><th colspan=$num_fields>View Table $table&nbsp;$addstring</th></tr>\n <tr><th><b>Del</b></th><th><b>Mod</b></th>\n");

OUT of the query results condition -- if($result=mysql_query($sql) so it can always be there!

Discussion


Log in to post a comment.

MongoDB Logo MongoDB