Jump to content

Search the Community

Showing results for tags 'tables'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • Website Management and Coding
    • Technology and the Internet
    • Philosophy, Politics, and Science
    • Art and Entertainment
    • Other Discussion
  • HelioHost
    • Questions
    • Customer Service
    • How You Can Help
  • HelioNet
    • News
    • Contact HelioNet

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 2 results

  1. Hi, I'm trying to build a dropdown in a form with, as options, the names of the tables of one database. How can I do? This is my script, it doesn't work: there isn't the dropdown... <form method="get"> <?php // database connection include('connect-db.php'); $result = mysql_query("SHOW TABLES") or die(mysql_error()); ?> <select name="select1"> <?php while ($line = mysql_fetch_array($result)) { ?> // The database I choose is "members", as can you see in the code below <option value="<?php echo $line['Tables_in_members'];?>"> <?php echo $line['Tables_in_members'];?> </option> <?php } ?> </select> <input type="submit" class="btn waves-effect waves-light" value="SEND"> </form> connect-db.php <?php /* CONNECT-DB.PHP Allow PHP to connect to the database */ // Database variables (I'm trying on XAMPP) $server = 'localhost'; $user = 'root'; $pass = ''; $db = 'members'; // Database connection $connection = mysql_connect($server, $user, $pass) or die ("Impossible connecting to the server ... \n" . mysql_error ()); mysql_select_db($db) or die ("Impossible connecting to the database ... \n" . mysql_error ()); ?> Thanks
×
×
  • Create New...