View Full Version : Adding text to a textarea from a list box generated from mysql

05-29-2006, 01:54 PM
Hi. I'm not too sure if this is going to be php or javascript. I think probably a bit of both. I'm making a sort of cms system and have a text area where news is added. I want to add links into the text area to other areas of the site, but the links are something like this "events.php?cmd=view&id=#". So its going to be far too difficult to rememeber the link to each page. I can create a list of the events from the database but need make them selectable so that when they are clicked "<a href="events.php?cmd=view&id=#">event title</a> is added the text box.

thanks for any help

05-29-2006, 04:04 PM
you specify textarea then textbox

what do you want??????????

05-30-2006, 12:09 AM
sorry. i didnt explain very well. ok. i have a form to update (for example) the news page. its basically just a text area. but i need to be able to add links into the text area (so they show on the news page). the links will be to things like events with addresses like "/pages/events.php?cmd=view&id=#"

so to save having to remember each id or type the full link each time, iwas hoping for a list box that will display some details of the events, which you could click on and would add the <a href="/pages/events.php?cmd=view&id=#">Event Title</a> code to the text area, with the correct id for the event. hope thats a bit clearer :/