# Desperate need of Help with a partial completed PHP script..almost done

**URL:** <https://forum.kirupa.com/t/desperate-need-of-help-with-a-partial-completed-php-script-almost-done/21252>\
**Category:** programming\
**Created:** [May 19, 2003, 5:07pm UTC](https://forum.kirupa.com/t/desperate-need-of-help-with-a-partial-completed-php-script-almost-done/21252 "2003-05-19T17:07:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![craschnburn](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@craschnburn](https://forum.kirupa.com/u/craschnburn)\
**Post date:** [May 19, 2003, 5:07pm UTC](https://forum.kirupa.com/t/desperate-need-of-help-with-a-partial-completed-php-script-almost-done/21252/1 "2003-05-19T17:07:30Z")

</div>

Hey guys.

Just something simple here.

Here are the following scripts I have for my php scripts.

```php

<?

PRINT "<center><FONT SIZE=-1 face=verdana>"; PRINT "$contact_name, thank you for filling out our online quote submission form.";
PRINT "</center><p><center><TABLE border=0 width=500";
PRINT "cellspacing=0 cellpadding=7>"; PRINT "<TR><TD><FONT SIZE=-1 face=verdana>"; PRINT "Your $quantity quantity of $job_name $job_type job have been submitted to West Coast Graphics. You should be receiving a confirmation email at $email email address within the next 5 minutes. If you have not received this confirmation email, please contact us at (916) 641-5790. If you have any other comments, feel free to contact us by phone or by email at [email]quotes@westcoastgraphics.com[/email].
  We appreciate your business with West Coast Graphics as we are always looking to improve our ways to better service your printing needs.";
PRINT "<br>Thank you,<br>";
PRINT "West Coast Graphics";
PRINT "</FONT></TD></TR></TABLE></center>";

mail("$email", "Your Request for $job_type quotes", "Hello $contact_name,

Thank you for submitting a quote through our online submission process. This email confirms that you have successfully requested a quote for $quantity of $job_name $job_type job. A West Coast Graphics associate will process your request and fax your quote to $fax. If this is the wrong fax number, please contact us 916-641-5790.

Thank you once again.
West Coast Graphics");

mail("quotes@westcoastgraphics.com", "Request for $quantity $job_type Quote Online", "A request for a quote has been submitted through our online form:

 ");
?>

```

Here’s my problem. When the emails get sent, the from field comes up as it is from [redbarnnetwork.net](http://redbarnnetwork.net). How would I edit the From field in PHP?

Desperate need of help. Please? Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 5:10pm UTC](https://forum.kirupa.com/t/desperate-need-of-help-with-a-partial-completed-php-script-almost-done/21252/2 "2003-05-19T17:10:14Z")

</div>

this thread explains it in the 6th post down:

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17313](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17313)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 5:24pm UTC](https://forum.kirupa.com/t/desperate-need-of-help-with-a-partial-completed-php-script-almost-done/21252/3 "2003-05-19T17:24:30Z")

</div>

Hello again Jubba. Thanks for the help again. Here’s my problem though. I just tried it, but it didn’t work. When I get the email after they fill out my online form, the from field comes up as it is from [httpd@redbarnnetworks.net](mailto:httpd@redbarnnetworks.net). Any ideas or solutions?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 5:31pm UTC](https://forum.kirupa.com/t/desperate-need-of-help-with-a-partial-completed-php-script-almost-done/21252/4 "2003-05-19T17:31:16Z")

</div>

you tried adding headers? you have to edit the headers to get the e-mail to say what you want it to say. Your script is too messy for me to edit. so i’ll do this:

```php

<?
$to = "whatever@whereever.com";
$subject = "subject";
$message = "message";
$headers = "From: YourName <WhateverEmailAddressYouwant>";

mail($to, $subject, $message, $headers);
?>

```

I don’t know what you want it so say so I can’t be more specific…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 5:56pm UTC](https://forum.kirupa.com/t/desperate-need-of-help-with-a-partial-completed-php-script-almost-done/21252/5 "2003-05-19T17:56:22Z")

</div>

Thank you Jubba. Now I know PHP. It’s about time. Thank you so much.

Everything works out well.

thank you again.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 5:59pm UTC](https://forum.kirupa.com/t/desperate-need-of-help-with-a-partial-completed-php-script-almost-done/21252/6 "2003-05-19T17:59:22Z")

</div>

no problem.
