I have a field in a MySQL table that defaults to "empty" unless it's written over. I'm using the following code to assign a variable based on what's written in that MySQL field.
Code: Select all
$query2 = "SELECT * FROM $table";
$row = mysql_fetch_assoc(mysql_query($query2));
if ($row['name'] == 'empty') { $joblink = "no download"; } else { $joblink = "download"; };
Thanks,
Gary