I know I can use a underscore in the name, but how do I get rid of that one in the output???
Pretty new to this, but let me give you some code I wrote for this:
<?PHP
$link = mysql_connect();
$db=content;
if (! $link)
die( "couldn't connect");
mysql_select_db($db)
or die ("won't open test:".mysql_error() );
$db_res=mysql_list_tables("$db",$link);
$num=mysql_num_rows($db_res);
for($x=0; $x<$num; $x++)
{
$table=mysql_tablename($db_res,$x);
/////////Don't want underscore here////////////////
print "<option>".$table."</option><br>
////////That way my link shows the space/////////
{
$query = "SELECT DISTINCT * FROM $table";
$result = mysql_query($query) or die("Error in query");
while($row = mysql_fetch_assoc($result))
{
print "<option value=".$row['Field2']."> -".$row['Field1']."</option><br>\n";
}
}
}
?>
sorry for being a newbie
Jacco