|
|
|
|
Thread title: PHP Mail question |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
05-16-2008, 12:36 PM
|
#1
|
Status: Paladin
Join date: Jul 2006
Location: Sheffield, UK
Expertise: design, front-end markup
Software: Photoshop
Posts: 2,353
|
PHP Mail question
Hello,
In the majority of email clients you can select whether an email should flag as important. Usually puts a red exclamation mark next to the subject or where ever it is.
I'm wondering if it is possible to make this happen when a user selects it on a simple mail form.
I have a field called 'urgent', and the user can select yes or no.
So basically what I want is this;
if urgent is yes, make this email important.
I can't seem to find anything related to it, maybe it is an extra $headers line as well.
Can anyone help please?
|
|
05-16-2008, 01:13 PM
|
#2
|
Status: Paladin
Join date: Jul 2006
Location: Sheffield, UK
Expertise: design, front-end markup
Software: Photoshop
Posts: 2,353
|
Nevermind guys, I managed to do it lol. I'm amazing!
|
|
05-16-2008, 01:41 PM
|
#3
|
Status: Paladin
Join date: Jul 2006
Location: Sheffield, UK
Expertise: design, front-end markup
Software: Photoshop
Posts: 2,353
|
Ok now I just had another idea and I would like some one to help.
Basically I have a simple contact form, which work exactly how it's needed to.
However, I intend on redistributing it therefore I want to do this;
1) Add a secondary form in the sidebar, which will allow you to add a contact
2) In the For.. dropdown field, it will pull these contacts in.
3) The form in the sidebar will obviously have 2 fields, name / email, email for the select value.
4) I want to have this non-database driven, so is it possible to use XML maybe? Or something that populates the dropdown field properly.
5) If the above is possible, is there a way of using javascript/ajax/jQuery to make it so if you add a contact in the form, it will automatically add to the dropdown box, so no page refresh is needed?
Any help is highly appreciated.
|
|
05-17-2008, 04:30 AM
|
#4
|
Status: I love this place
Join date: Jan 2007
Location: Charlotte
Expertise:
Software:
Posts: 542
|
Originally Posted by iamAdam
1) Add a secondary form in the sidebar, which will allow you to add a contact
|
ajax? use the insertion...
idk.. explain more if you can
Originally Posted by iamAdam
2) In the For.. dropdown field, it will pull these contacts in.
|
use an array?
populate the drop down list
Originally Posted by iamAdam
3) The form in the sidebar will obviously have 2 fields, name / email, email for the select value.
|
...
Originally Posted by iamAdam
4) I want to have this non-database driven, so is it possible to use XML maybe? Or something that populates the dropdown field properly.
|
...array
Originally Posted by iamAdam
5) If the above is possible, is there a way of using javascript/ajax/jQuery to make it so if you add a contact in the form, it will automatically add to the dropdown box, so no page refresh is needed?
|
xmlHttp
heres something that might get u started
Code:
<script type="text/javascript">
function doAjaxCall(url)
{
if (window.XMLHttpRequest)
{
req = new XMLHttpRequest();
req.onreadystatechange = getAjaxResponse;
req.open("GET", url, true);
req.send(null);
}
else if (window.ActiveXObject)
{
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req)
{
req.onreadystatechange = getAjaxResponse;
req.open("GET", url, true);
req.send();
}
}
}
function getAjaxResponse()
{
if (req.readyState == 4)
{
resp = req.responseText;
alert(resp);
}
}
</script>
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|