| | |
Can you make this word wrap?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2008
Posts: 4
Reputation:
Solved Threads: 0
Hey folks,
Anyone know how to take the code below and make sure that all the stuff that gets sent to the email wordwraps at 400 pixels? Please HELP!
Thanks
Benjamin
Anyone know how to take the code below and make sure that all the stuff that gets sent to the email wordwraps at 400 pixels? Please HELP!
PHP Syntax (Toggle Plain Text)
<?php $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/")); session_start(); if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) { $message = wordwrap($message, 70); mail("rbeale@bealeinc.com,iam1az@cox.net","Membership Application","Form data: First Name: " . $_POST['field_1'] . " Last Name: " . $_POST['field_2'] . " Your Email Address: " . $_POST['field_3'] . " Street Address: " . $_POST['field_4'] . " City: " . $_POST['field_5'] . " State: " . $_POST['field_6'] . " Zip Code: " . $_POST['field_7'] . " Home Phone: " . $_POST['field_8'] . " Work Phone: " . $_POST['field_9'] . " Cell Phone: " . $_POST['field_10'] . " Name of Emergency Contact: " . $_POST['field_11'] . " Phone of Emergency Contact: " . $_POST['field_12'] . " Relationship To You: " . $_POST['field_13'] . " Brief History of Yourself: " . $_POST['field_14'] . " Make of Motorcycle You Own: " . $_POST['field_15'] . " Model of Motorcycle you Own: " . $_POST['field_16'] . " Year of Motorcycle You Own: " . $_POST['field_17'] . " Years of Riding Experience: " . $_POST['field_18'] . " State Reason For Joining: " . $_POST['field_19'] . " "); include("confirm.html"); } else { echo "Invalid Captcha String."; } ?>
Thanks
Benjamin
Here is a thread on wordwrap if you decide to go that direction:
http://www.daniweb.com/forums/thread151130.html
http://www.daniweb.com/forums/thread151130.html
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
•
•
Join Date: Oct 2008
Posts: 4
Reputation:
Solved Threads: 0
•
•
•
•
Hey folks,
Anyone know how to take the code below and make sure that all the stuff that gets sent to the email wordwraps at 400 pixels? Please HELP!
PHP Syntax (Toggle Plain Text)
<?php $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/")); session_start(); if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) { $message = wordwrap($message, 70); mail("rbeale@bealeinc.com,iam1az@cox.net","Membership Application","Form data: First Name: " . $_POST['field_1'] . " Last Name: " . $_POST['field_2'] . " Your Email Address: " . $_POST['field_3'] . " Street Address: " . $_POST['field_4'] . " City: " . $_POST['field_5'] . " State: " . $_POST['field_6'] . " Zip Code: " . $_POST['field_7'] . " Home Phone: " . $_POST['field_8'] . " Work Phone: " . $_POST['field_9'] . " Cell Phone: " . $_POST['field_10'] . " Name of Emergency Contact: " . $_POST['field_11'] . " Phone of Emergency Contact: " . $_POST['field_12'] . " Relationship To You: " . $_POST['field_13'] . " Brief History of Yourself: " . $_POST['field_14'] . " Make of Motorcycle You Own: " . $_POST['field_15'] . " Model of Motorcycle you Own: " . $_POST['field_16'] . " Year of Motorcycle You Own: " . $_POST['field_17'] . " Years of Riding Experience: " . $_POST['field_18'] . " State Reason For Joining: " . $_POST['field_19'] . " "); include("confirm.html"); } else { echo "Invalid Captcha String."; } ?>
Thanks
Benjamin
To restate: I want this code that sends an email to have the results that it generates within the email WORD WRAP at 100 characters including spaces.
HELP!
Take a look at the wordwrap function in PHP:
http://uk.php.net/wordwrap
http://uk.php.net/wordwrap
php Syntax (Toggle Plain Text)
wordwrap($text, 100, "<br />\n", true);
Last edited by Will Gresham; Oct 27th, 2008 at 11:30 pm.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
•
•
Join Date: Oct 2008
Posts: 4
Reputation:
Solved Threads: 0
So are you saying that I have to define the text that is wrapped before it will wrap it? In this case the input variables are always different. They are putting in things like address and reasons for joining. These will never be constant.
What do you do in the case listed above to make an unknown variable text wordwrap at such and such column width? Please use the php exactly as listed.
Excellent resource by the way this PHP library. Problem is I don't know PHP yet. I want to learn it but I have this pressing problem that needs solving now.
Please continue to help me figure this out.
Benjamin
What do you do in the case listed above to make an unknown variable text wordwrap at such and such column width? Please use the php exactly as listed.
Excellent resource by the way this PHP library. Problem is I don't know PHP yet. I want to learn it but I have this pressing problem that needs solving now.
Please continue to help me figure this out.
Benjamin
Last edited by benjamindemers; Oct 28th, 2008 at 12:54 am.
![]() |
Similar Threads
- IE pages opening while in Firefox (Viruses, Spyware and other Nasties)
- help clean HJT log please (Viruses, Spyware and other Nasties)
- Dev C++ (C++)
- word wrapping? (DaniWeb Community Feedback)
- Project Help 2 (VB.NET)
- ~Urgent~ Help Needed PLZ! (Viruses, Spyware and other Nasties)
- i want to start fresh (Windows NT / 2000 / XP)
Other Threads in the PHP Forum
- Previous Thread: How can I echo blog-article's headline to be the page "Title"; I tried this but didnt
- Next Thread: PHP Script to find Visitor's Location
| Thread Tools | Search this Thread |
ajax apache api array basics beginner binary broken cakephp checkbox class cms code codingproblem combobox cron curl database date display domain dynamic echo email error file files folder form format forms function functions google href htaccess html image include insert interactive ip java javascript joomla js limit link load login mail malfunctioning menu mlm mobile multiple mysql nodes oop outofmemmory paging parse paypal pdf php problem procedure query radio ram random recursion reference remote return script search server sessions sms source space sql syntax system table tutorial unset up-to-date update upload url validation validator variable video web webapplications websitecontactform youtube






