Jump to content

cookspyder

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cookspyder's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks, I knew it was something simple just looking at the code too long!
  2. looking to write to a file with out overwriting the previous data? is there a way to turn overwrite off with the file put contents?? im trying to keep a log of form data.
  3. I have a form that pulls mysql data to build a drop down menu, and then to obtain the page reload for a series of check boxes. When I sumbit the page I do not carry over the first value selected in the drop down. Instead I get the number associated with that particular field. just as an example: localhost/form.php?=4 4 is the value asociated with dog in the drop down. the name of the selected value is called pet. ie cat=1 bird=2 reptile=3 dog=4 on reload to get the associated breeds it needs that number in the url associated to the animal. then on submit I can not get the animal instead of number... any ideas? can I submit both the num and animal type? here is the drop down and check box actual code. ///////// Getting the data from Mysql table for first list box////////// $quer2=mysql_query("SELECT DISTINCT category,cat_id FROM category order by category"); ///////////// End of query for first list box//////////// echo "<form method=post name=f1 action='dd-check.php'>"; ////////// Starting of first drop downlist ///////// echo "Please select the monitored Service:<select name='cat' onchange=\"reload(this.form)\"><option value=''>Select one</option>"; while($noticia2 = mysql_fetch_array($quer2)) { if($noticia2['cat_id']==@$cat){echo "<option selected value='$noticia2[cat_id]'>$noticia2[category]</option>"."<BR>";} else{echo "<option value='$noticia2[cat_id]'>$noticia2[category]</option>";} } echo "</select>"; ////////////////// This will end the first drop down list /////////// if(isset($cat) and strlen($cat)>0){ $quer=mysql_query("SELECT DISTINCT subcategory FROM subcategory where cat_id=$cat order by subcategory"); }else{$quer=mysql_query("SELECT DISTINCT subcategory FROM subcategory order by subcategory"); } ////////// end of query for second subcategory drop down list box /////////////////////////// echo "<p>"; ////////// Starting of checkbox///////// echo "Please Select the Application or Server effected by Maintenance:</br>"; //echo "<input type='checkbox' value=''>Entire Service</input></br>"; while($noticia = mysql_fetch_array($quer)) { if($cat>0){ echo "<input type='checkbox' name='subcat[]' value='$noticia[subcategory]'>$noticia[subcategory]</input></br>"; //echo "<option value='$noticia[subcategory]'>$noticia[subcategory]</option>"; }} echo "</input>";
  4. I have a form that has many check boxes built into an array. I need to email this array in an email message. ie the email message would look like: Hello, the following person would like to have these colors: array[1],array[2], and so on. the array length can change each time. any ideas
×
×
  • 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.