Search the Community
Showing results for tags 'form'.
-
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
-
Hello, is there some one who know a way to have a private e-mail contact form; with some kind of captcha? A form that dont show the e-mail destination "private", and with some kind of captcha; to be assured it's not some robot that submit a message. Why the form dont show at all the e-mail the message is sent to? It's because i would not want to have some spam's and would not want that some robots send a lot of e-mail to my e-mail account i want. Wich could result into some server that are over loaded and my email account way to full. I have seen a lot of website that offer this kind of service, an example would be: http://www.jotform.com , like i have for now. The problem with those websites, is that you must pay some money each month; and the free version have a lot of limitations. I'm sure a lot of peoples out there, would appreciate to have a private e-mail contact form into there website with some kind of captcha. So the user can be sure it's not a robot that continue to send e-mail messages "knowing the e-mail address the message is sent to". Also the form with name sender, e-mail of the user, message box; and captcha to verify before sending. Is a great thing. Wonder if some one could help me with it? Thank's for your time!