Jump to content

jenneke

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Everything posted by jenneke

  1. sorry about that. it was a mistake made because my session timed out when i tried to reply to the last response to my question. but cant figure out how to delete this entry. Feel free to delete it if you know how.
  2. The change in code you suggested does call up the correct value from the database but when i view the form, the other options still appear in one long line instead of as a drop down menu. Example: Miscellaneous Footprint calculators Water saving Energy saving Home Garden Directory services At work Environmental labelling Recycling Investment Food Shopping Travel For the Kids Green groups Miscellaneous Note that the selected value 'miscellaneous' has appeared at the start indicating that the code you (mmarif4u) suggested worked. But how can I make it appear as a drop down menu instead of this long line of text?
  3. Here is the code with only one field selected. Thank you for your time, Jenneke $result=mysql_query("SELECT * FROM links WHERE id='$id'"); if ($row=mysql_fetch_array($result)) { echo ' <br><br><br> <h3>Links</h3> <form name="form1" method="post" action="links_update.php?id='.$id.'> <p> <br> <select name="area"> <option selected>' . $row["area"] . '</option> <option>Footprint calculators</option> <option>Water saving</option> <option>Energy saving</option> <option>Home</option> <option>Garden</option> <option>Directory services</option> <option>At work</option> <option>Environmental labelling</option> <option>Recycling</option> <option>Investment</option> <option>Food</option> <option>Shopping</option> <option>Travel</option> <option>For the Kids</option> <option>Green groups</option> <option>Miscellaneous</option> </select> <br><br> <input name="website" type="text" size="53" value="'.htmlentities($row['website']).'"> : Website <br> </p> <p> <textarea name="details" cols="40" rows="5">' . $row["details"] . '</textarea> : Details<br> <br> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> '; } else { echo '<br><br>sorry, this entry does not exist<br><br>'; } mysql_close(); include('footer.html'); ?>
  4. Here is the code with only one field selected. Thank you for your time, Jenneke $result=mysql_query("SELECT * FROM links WHERE id='$id'"); if ($row=mysql_fetch_array($result)) { echo ' <br><br><br> <h3>Links</h3> <form name="form1" method="post" action="links_update.php?id='.$id.'> <p> <br> <select name="area"> <option selected>' . $row["area"] . '</option> <option>Footprint calculators</option> <option>Water saving</option> <option>Energy saving</option> <option>Home</option> <option>Garden</option> <option>Directory services</option> <option>At work</option> <option>Environmental labelling</option> <option>Recycling</option> <option>Investment</option> <option>Food</option> <option>Shopping</option> <option>Travel</option> <option>For the Kids</option> <option>Green groups</option> <option>Miscellaneous</option> </select> <br><br> <input name="website" type="text" size="53" value="'.htmlentities($row['website']).'"> : Website <br> </p> <p> <textarea name="details" cols="40" rows="5">' . $row["details"] . '</textarea> : Details<br> <br> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> '; } else { echo '<br><br>sorry, this entry does not exist<br><br>'; } mysql_close(); include('footer.html'); ?>
  5. Thanks for the quick response. It still doesn't work. The selected value does appear at the start of the row, so that doesn't seem to be the problem. It looks like it is having trouble recognising the drop down menu as a drop down menu. Any other suggestions? Thanks again
  6. hello all, this is my first entry in the forum. i am making an cms to add and modify entries into a database. everything is going well except the modify page. the page gets the id of the entry, the text area but when it tries to collect the list/menu, it displays them as one long line, not as a drop down menu. does anyone know what could be the problem? code below with problem area in red: <h3>Links</h3> <form name="form1" method="post" action="links_update.php?id='.$id.'> <p> <br> <select name="area" size="1"> <option selected>' . $row["area"] . '</option> <option>Footprint calculators</option> <option>Water saving</option> <option>Energy saving</option> <option>Home</option> <option>Garden</option> <option>Directory services</option> <option>At work</option> <option>Environmental labelling</option> <option>Recycling</option> <option>Investment</option> <option>Food</option> <option>Shopping</option> <option>Travel</option> <option>For the Kids</option> <option selected>Green groups</option> <option selected>Miscellaneous</option> </select> <br> <input name="website" type="text" size="53" value="'.htmlentities($row['website']).'"> : Website <br> </p> <p> <textarea name="details" cols="40" rows="5">' . $row["details"] . '</textarea> : Details<br>
×
×
  • 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.