![]() |
|
#1
|
|||
|
|||
Also e-mail relatedI am designing a website for a Counter-Strike clan, and I have made a page for applying. I am trying to get the form on this page to be emailed to the clan leader for review. Here is what I have.
On the apply page- <form id="application" action="scripts/mail_to.php" method="post" name="application"> <input type="hidden" name="subject_line" value="iTeam Application"> And this is scripts/mail_to.php - <?php $to = "someone@hotmail.com"; $subject = "Application"; $message = "<?php echo $_POST["application"]; ?>"; mail($to,$subject,$message); echo "../thankyou.php"; ?> This is what I get - Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/"directory" on line 5 |
|
#2
|
||||
|
||||
Re: Also e-mail relatedExtra quotes in the string are the problem:
Check this difference: PHP Code:
PHP Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Also e-mail relatedChange the code to this -
<?php $to = "souljzsniper@hotmail.com"; $subject = "Application"; $message = "<?php echo $_POST[\"application\"]; ?>"; mail($to,$subject,$message); echo "../thankyou.php"; ?> Now I get this - **** error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/directory on line 5 |
|
#4
|
||||
|
||||
Re: Also e-mail relatedEpicnicity, you were trying to "open php in php"... if that's right...
Anyways, try the following: PHP Code:
|
|
#5
|
|||
|
|||
Re: Also e-mail related<form id="application" action="thankyou.php" method="post" name="application">
<input type="hidden" name="subject_line" value="iTeam Application"> <input type="hidden" name="order" value="namecheck,name,gamenamecheck,gamename,agech eck,age,emailcheck,email,xfirecheck,xfire,why"> This information is only seen by the Clan leader. Please check any information you would like to not be posted on our website. <p>Name<input type="checkbox" name="namecheck" value="nameprivate"><br /> <input type="text" name="name" value="Name" size="50"><br /> <br /> InGame Name<input type="checkbox" name="gamenamecheck" value="gamenameprivate"><br /> <input type="text" name="gamename" value="InGame Name" size="50"><br /> <br /> Age<input type="checkbox" name="agecheck" value="ageprivate"><br /> <input type="text" name="age" value="Age" size="20"><br /> <br /> E-Mail<input type="checkbox" name="emailcheck" value="emailprivate"><br /> <input type="text" name="email" value="E-Mail" size="50"><br /> <br /> X-Fire<input type="checkbox" name="xfirecheck" value="xfireprivate"><br /> <input type="text" name="xfire" value="X-Fire" size="50"><br /> <br /> Why would you like to join iTeam?<br /> <textarea name="why" rows="4" cols="48"></textarea><br /> <br /> <div align="center"><input type="submit" value="Submit" name="submitButtonName"> <input type="reset"></div> </p> </form> <?php $to = "souljzsniper@hotmail.com"; $subject = "Application"; $message = $_POST["namecheck,name,gamenamecheck,gamename,agecheck,ag e,emailcheck,email,xfirecheck,xfire,why"]; mail($to,$subject,$message); echo "../thankyou.php"; ?> Thanks for the help. Now the email sends but its blank. "application" didnt work so I tried the above. |
|
#6
|
||||
|
||||
Re: Also e-mail relatedYou can't call all the post values at the same time:
PHP Code:
I've added the "\n" after each line. That causes a line break, so that the contents aren't all on one line. Last edited by NHDriver4 : 07-Jan-2008 at 23:24.
Reason: Updated Code
|
|
#7
|
|||
|
|||
Re: Also e-mail relatedOkay I'm hopless...
The email sends just fine now but all that is in the content is Name: |
|
#8
|
||||
|
||||
Re: Also e-mail relatedHere is the complete page, self sufficient. (Meaning upload, and point people to it)
Code:
|
|
#9
|
||||
|
||||
Re: Also e-mail relatedOh, and P.S. let your leader know I just sent an application by mistake.. hah!
|
|
#10
|
|||
|
|||
Re: Also e-mail relatedThank you so much and sorry for all the trouble.
|
Recent GIDBlog
Developing GUIs with wxPython (Part 2) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Looking for link exchange partners: webmaster related website | metamorph | Webmaster / Web Designing Advertisements & Offers | 0 | 12-Nov-2007 00:22 |
| Halloween Doubles All Hosting Features- Come and See! | fcolor | Web Hosting Advertisements & Offers | 0 | 23-Oct-2007 08:23 |
| Mail Form in DreamWeaver | CallFaheem2 | Web Design Forum | 6 | 12-Dec-2006 00:45 |
| Looking For finance related only | seoexpert-hyd | Member Announcements, Advertisements & Offers | 0 | 10-Mar-2006 04:46 |
| E Mail Forwarding | nikkotash | Computer Software Forum - Windows | 3 | 30-Jun-2003 03:20 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The