Jump to content

pranjalgoenka

New Members
  • Posts

    3
  • Joined

  • Last visited

pranjalgoenka's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks but after correcting that it is showing undefined variable error for main_system in while($row=mysql_fetch_array($result)) { $username_array[] = "\"".$row[main_system]."\""; }
  2. ahamdabad_vpn_ip$ is a table. and i don't think if it matters if we have a $ sign at the last
  3. dear all my code is showing error as Invalid query: No database selected the code is as follows <?php $dbc = mysql_connect("localhost", "root", "123456"); mysql_select_db("ahamdabad_vpn_ip$", $dbc); $sql = "select main_system from ahamdabad_vpn_ip$"; $result = mysql_query($sql); if (!$result) { die('Invalid query: ' . mysql_error()); } $username_array = array(); while($row=mysql_fetch_array($result)) { $username_array[] = "\"".$row[main_system]."\""; } $username_string = implode(",", $username_array); echo $username_string; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.