I have the following in my controller:
$message['name'] = htmlentities(strip_tags(trim($_POST['name'])));
$message['email'] = htmlentities(strip_tags(trim($_POST['email'])));
$to = "info@mywebsite.com";
$subject = "Website Enquiry";
$content = html_entity_decode(implode("nn", $message));
$content.= "nnIP Address: ".$_SERVER['REMOTE_ADDR'];
$headers = "From: ".strip_tags(trim($_POST['name']))." <".strip_tags(trim($_POST['email'])).">";
@mail($to,$subject,$content,$headers);
And the following in my view:
echo '<tr><th><b>Name: </b></th><td>'.$message['name'].'</td></tr>';
echo '<tr><th><b>Email Address: </b></th><td>'.$message['email'].'</td></tr>';
This works as expected - the POST data is output to the page and is also sent in the email. However the email does not contain the field labels, for example 'Name: ' and 'Email Address: '.
This is obviously because I don't include the labels in their respective $message[] elements, as I need to enclose these in HTML tags in the view. I don't intend to include any HTML code in my controller, so does anyone have any idea how I can satisfy both requirements?
PHP Upload issue
Hi guys,I have stumble across an interesting issue with my script and is doing my head in.A little background on the application.I've got a document repository site which uses Jupload to upload
Disable Scrollbar in TableControl
Hello everbody,
Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious... i.e. different devices has a similar configuration, but how I can discern it by device? Code: <config><device
Multiple forms on the same page (safari)
Hello everyone,I have 3 forms on the same page, that opens in a new window and submits to a php file, this works great in IE8 but I can not get it to work in safari, I can click on the first submit
moving mouse to display image coordinates
I have an existing MFC application that shows an image in the main window.I'd like to be able to move the mouse within that image & display the correct image coordinates to the user.How difficult
Where am I going wrong
Been trying to work this out for hours I have two tables called 'Genres' and 'Films'. Genres contains two columns 'Genre_id' and 'Genre_Name'. Films contains a load of columns, the most important
Add_Months not Easy to Understand
Oracle is number 1, very fast and very easy. But....
Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and use ORDER BY to re-order whether DESC or ASCHow can i do the ORDER BY without re-order first 50
Material Master Update through BAPI - Follow up material not updated
Hi Experts,