i have a string for example:
$str="The annual general meeting is scheduled on ::date:: at ::time::.
you all are requested to be present on ::date:: at ::time::."
i store it in the Templates_T table in my DB. Template_ID =1 [for eg.] now this format can be used further for drafting letters or creating newsletters etc..
Now in newsletters.php page for every ::date:: and ::time:: instance, for Template_ID 1 , i load textboxes in array for date[<input type =text name="dispdate">] and <select NAME="hours" > </select> <select NAME="minutes" > </select>in array for time. user enters some date and time in the textboxes and <select> respectively. now while updating the content in DB it should go as:
Step 1 : select the entire content from Template_T where Template_ID=1
Step 2: modify the message and replace ::date:: and ::time:: with relevant textbox values , <select > values. some thing like below
$EntireContent="The annual general meeting is scheduled on 'ValueOfBoxInArray' at 'ValueOfSelectInArray'.
you all are requested to be present on 'ValueOfBoxInArray' at 'ValueOfSelectInArray'."
$sql=mysql_query("insert into mytable_t values('$EntireContent')");
how will i accomplish this?