|
Hi, i know this may sound stupid or a dumb obvoius question, but please help, i am using the following code:
<?php
$link = mysql_connect("divineright.org" , "NotForYouToKnow" , "NotForYouToKnow") or die("could not connect\n");
echo "Connected Successfully<p>\n\r";
$db = $_GET['db'];
$db = preg_replace("/^[a-zA-Z_&]/i","",$db);
mysql_select_db($db);
$table = $_GET['jabaglyf'];
$table = preg_replace("/^[a-zA-Z_&]/i","",$table);
$query = "SELECT * FROM " . $table;
$result = mysql_query($query) or die("query failed: " . mysql_error());
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)){
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr><div>\n";
}
echo "</table>\n";
mysql_close($link);
?>
When i try to use just one of the Direct Inputs, it works fine, but when i added in the second one, it fails. Can you tell me what i'm doing wrong??
Last edited by Tinutarm; 05-06-2004 at 05:34 PM..
|