Jump to content

bradkenyon

Members
  • Posts

    179
  • Joined

  • Last visited

    Never

Everything posted by bradkenyon

  1. I am trying to create multiple checkboxes in a form. Here is the code I have right now, right now it displays one checkbox. //this is what i use in an include file $f->ae(DF_xfield1($q->f('xfield1'),$xtra2)); //this is what i use to display it on the form <div><label>Areas of Interest:</label> <?PHP $mf->se("D_xfield1"); ?></div> //this is the function i try to get going to display multiple checkboxes, with names by each one function DF_xfield1 ($v) { $flabelss = array (array('label'=>'Childrens Area','value'=>'Childrens Area'), array('label'=>'Medium','value'=>'Medium'), array('label'=>'Large','value'=>'Large'), array('label'=>'X-Large','value'=>'X-Large'), array('label'=>'2X-Large','value'=>'2X-Large'), array('label'=>'3X-Large','value'=>'3X-Large')); return array("type"=>"checkbox", "name"=>"D_xfield1", "options"=>$flabelss, "multiple"=>124, "size"=>11, "extrahtml"=>$xtra2, "value"=>'$v'); } I looked this up somewhere, and and tried applying it to above: $f->add_element(array("type"=>"checkbox", "name"=>"compress", "multiple"=>1));
  2. I have a simple table setup, which I have 2 or 3 email addresses stored in the one field table, table titled email, and field titled email. I want to pull the emails from the table and put it in a input type box, as its value. For example: <input type="text" name="to" value="$email"> I don't know exactly how do this, currently I have it going into the text box, like explained above, but it is outputting a different text box for each email. I just want it all in the same text box, example: joe@joe.com, brad@brad.com, george@gmail.com This would be what I want, just like you would send an email to multiple people, separating the different emails by commas in the "to:" field of an email. [code] <?php // Make a MySQL Connection mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); // Get all the data from the "email" table $result = mysql_query("SELECT * FROM email") or die(mysql_error());  echo "<table border='1'>"; echo "<tr> <th>Email</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<input type=text value=$row[email]>"; } echo "</table>"; ?> [/code] This is what I have currently, which will output a text box for each email, instead of that, I just want one text box, with all the emails in it, separated by commas. Thanks in advanced.
  3. This is probably extremely easy, but I'll appreciate any help. I have created a two column table, "id" and "address". I want to a input box someone can type in their email address, and when they hit the submit button, it will be stored into the table "email_test". <input type="text" name="address"> <input type="submit"> Now what? Thanks in advance for reading this.
×
×
  • 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.