Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Why Is Mail() Adding Periods In The Place Of Spaces?


I have a form that to send an email newsletter, the addresses get pulled from a mysql table. For whatever reason when you get the email all the spaces in the from field are replaced with periods.

For example, if the "From" field in the table was "Our Email Newsletter" and it got plugged into the $headers like this: PHP Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Adding Next And Prev Page To Code That Is Already In Place
I have code that I already had in place but my end user would like to have next page for the MYSQL display. I have read the doc that is posted on this site. Code:

View Replies !
Adding Spaces
I had this website on winXP w/ apache2 and php4, and the script worked perfectly but now I upgraded to Windows 2003 Server Enterprise, now I use IIS7 and php4, and whenever I go to add msgs or edit them in this script, it writes extra return characters to the file, im not quite sure why, but if you can pls look at the script, its at http://elemental2.no-ip.com/away_form.txt and the working script is at away_form.php (just change the .txt to .php)

The writing to files im talking about are around lines 775 but the display (which i think might also be a part of the problem) is on lines 312..

View Replies !
Adding Spaces To This
I nned to add a space between each variable. I have tried many ways but none have work. How is this done? what happens is that is displays like this

BillGates
104Micro
SomwhereNY65878

Thanks


$info[0]=$add_arr["fname"] ;
$info[0] .= $add_arr ['lname'];
$info[0].="
".$add_arr['address'];
if ($add_arr['']<>"") {
$info[0].="
".$add_arr[''];
$info[1]=4;
} else {
$info[1]=3;
}
$info[0].="
".$add_arr['city'];
$info[0].=$add_arr['state'];
$info[0].=$add_arr['zip'];

View Replies !
Adding Spaces Into A String
I have a post string that has eight characters in and need to add five spaces in between each character.

Eg.

$account = "12345678"

I need

$account = "1     2     3     4     5     6     7     8"

What would be the best way to do this?

View Replies !
Adding Spaces To A Text String
i want to do and im not sure how to go about it if i had a text string returned that was a long post of just characters no spaces included that displayed would break the width of my html frame causing scrolling and its a hassle i dont particually want.

so how can i go about looking for spaces and adding them if the character length is long with no spaces included?

View Replies !
Spaces In From: Mail Header
I'm trying to send an email that has spaces in the from header:

$header = "From: sKunKbad sKunKbad sKunKbad";

but when the mail comes through, there are periods between like this:

sKunKbad.sKunKbad.sKunKbad

What am I doing wrong?

View Replies !
Double Spaces In Mail Messages
When I send a message using the mail command in PHP some e-mail
addresses somehow put two returns in place of one return, so this:

$message = "Test
Test2"

becomes

Test

Test2

But if I mail this:

$message = "Test
Test2"

it works the same for all e-mail addresses. Why is it doing this? I use
Red Hat Linux and Apache.

View Replies !
Periods
I put a literal period (.) in a string value stored in an array.

$hrefs[0] = array("link" => "test.php?id=one", "id" => "one");

The period in 'test.php' is preventing the script from even running. In JS, I would just escape it with a back slash, but this doesn't do the trick in PHP. I've been running searches on php.net.

View Replies !
Date Periods?
Id like to be able to add text to my site but have it only saying that for a
couple of months. Is this easy to do?

View Replies !
Periods Out Of A String
I've search 3 different forums and I'm still unable to find the answer. I know it should look something like this though: PHP Code:

preg_replace("[/.]", "", $string)

View Replies !
Adding Smtp To Mail Script
I been trying to figure this out but I just cannot seem to get it
I need to take this PHP Code:

View Replies !
Adding Result Row To Mail Function
I have an email script that will pull the addreses from my club membership database. That part works fine. the problem I am having is being able to include row results inside of the actual email message. My message variable is something like this: Code:

View Replies !
Mail - Adding A Space Between Each Word
i need help on adding a space between each word for example

Fist Name: PHP
 
Second name: Code

Phone Number: 123456789

Subject: PHP

Message: HELP!!!

what i get is

Fist Name: PHP <p>&nbsp;</p>  Second name: Code Phone Number: 123456789 Subject: PHP Message: Code:

View Replies !
Why Use Concantenation Periods In Mysql_fetch_array?
Below is an example from the PHP manual. This example is found in the directory: MySQL Functions ->mysql_fetch_array.

My question pertains to the concantenation ( . ) mark before and after the $row variable ( that is, ".$row ["user_id"]." ) I think that this function will work just fine without the concantenation.

The question is: Why does the PHP manual use concantenation periods before and after the $row variable? Is the concantenation required for some reason? PHP Code:

View Replies !
Match Multiple Periods?
Im just checking a string to see if it contains 3 or more fullstops in a row.

preg_match("/.../")
or
preg_match("/.../")

dont seem to work, i get pretty stuck on what needs backslashing etc.

View Replies !
Date - Calculating Periods
How would I get the next 2 week period (closest to current date). Periods - 1st - 15th each month, 16th - end of month.

[php]
$now = time();
$currentDate = date("Y-m-d H:i:s", $now);

$previous_period = ? // Y-m-d H:i:s
$next_period= ? // Y-m-d H:i:s
[/php]

example output would be:
today = 21st August 2007
Prev Period = 15th August 2007
Next Period = 1st September

View Replies !
Regex Assistance :: Contain Periods And Apostrophes
I need to parse a text file that is in the form shown below. However, I only need to get the data from some of the fields. we are only storing some fields in mysql

[id]8935[description]a description goes here[price]8.95[deptID]T[subdeptID]G

What I need is a regex that will identify a certain key (e.g. price) and get the data that follows that key (8.95) . So I need what's between "]" and "[" The data will contain periods and apostrophes.

View Replies !
Adding IP Address Of The Sender When Sending Mail Through MailI()
How can we add the IP address of sender in the Headers of the Email address? if we use the mail() to send an email, the receviing person will get the IP address of the server in the header of the mail. but i want that he should get the IP address of the Sender as well.

View Replies !
Mail() Function Not Working When Adding A Headers Parameter?
This works:

$to = "email@address.com";
$subject = "CONTACT FORM";
$body = "test";
mail($to, $subject, $body);

But when I add an additional parameter $headers, it doesn't work:

$to = "email@address.com";
$subject = "CONTACT FORM";
$headers = "From: My Name Here";
$body = "test";
mail($to, $subject, $body, $headers);

What could I be doing wrong?

View Replies !
Preg_replace :: Remove Exclamation Marks And Periods Etc.
I'm passing some strings to this preg_replace here.

$stuff = preg_replace('[^0-9a-zA-Z-\_]', '', $stuff);

it doesn't seem to be working; it isn't stripping out anything it seems. still leaving all the stuff in there like exclmation marks & periods etc.

View Replies !
Regex :: Letters, Hyphens, Apostrophes And Periods Allowed Only
I am using this:

if (!eregi ("^[A-Z -'.]{2,35}$", $name)) {
//error
}

Why does it allow ( ) & @ and some other characters? If anyone can help me write or rewrite this statement I'd appreciate it. All I want is letters, hyphens, apostrophes and periods allowed.

View Replies !
Where Do I Place This?
i have a script which allows users to edit their information. I can make the form edit and update the data, but when the user returns to the form to update the information, it retunrs to the first value. I am not sure where to place this tag <?=$a13?> PHP code:

View Replies !
Where Does Php Place Cookies?
This is baffling me. I am starting a session and I know it is setting a
cookie on my computer - I called getallheaders() and see that it is
setting the cookie, and it is also accessible in $_COOKIE. I cleared
all cookies in my Cookies folder before starting the session, and
everytime I run the script it does not create a cookie in the folder.
For testing I even set the browser to accept all cookies to make sure.

session.use_cookies is on in php.ini, session.use_only_cookies is off,
and session.use_trans_sid is off. The session data file is definitely
being created, but I cannot find the corresponding cookie no matter what
I try.

View Replies !
Best Place To Transform XSL
Hi, I have a question that a friend was asking me a few minutes ago.

Is it better to transform XSL on the client side, or let the server
handle it? Or both, ensuring that everyone can view the site correctly.

View Replies !
Backslashes All Other The Place
this is the text i type into the database:

this is some 'example text' and is a "test"

and this is what is displayed when its in the database:

this is some 'example text' and is a "test"

is there anyway to stop that? or hide the backslahes?

View Replies !
Place And Image Onto Another
Using the GD functions how can one image be placed ontop of another.. I want to add a border around each uploaded image using another background image as the border...like place the smaller image in the middle of the larger image

View Replies !
Place A Tab In Between Data
I have a number of lines of code which display information to the screen.

<code>

$msg .= "Name :     $name
";
$msg .= "Address :     $address
";

</code>

I want to be able to put tabs in between the "Name" and "$name" so I can align all the data in a column to look easier on the eye. How do I do this? I think it's something like "/t" but i'm not sure.

View Replies !
Place Various PHP Action
I have this script, it works outside the function, no probs with it BUT I need to place the output of the function in one string in order to return in how do I do it?

$input = array('apple', 'orange', 'monkey', 'potato', 'cheese', 'badger', 'turnip');
$cols = 2;

function table_columns($input, $cols) {
[color=red]
$i=0;
echo = '<table border=1>
<tr>';
foreach ($input as $in){
$i++;
echo = '<td>'.$in.'</td>';
if($i==$cols){
echo = '</tr><tr>';
$i=0;
}
}
echo = '</tr><table>';[/color]

the bits in red should be placed in a variable called output

View Replies !
How To Place Code In $var.?
I'm trying to set html text ina a $var and I can olny get the $vars to print if they are alone... If I tyr to add an array or make them uc I get errors...

Anyone know what I need to add to this code?

$htmltext = "<html>
<head>
<title>ucwords($pagetitle)</title>
</head>
<body>$content</body>
</html>";

View Replies !
Place The Results In Another Table
I am trying to take the results from a query and place the results in another table.
I want to take all the results from $row join them together. is this possible to do?
And can the results be stored with the information from the print statement? (<br> from each row) Code:

View Replies !
Ip To Country Place Flag
Anyone provide me the php code for ip to country place flag.

View Replies !
1 Decimal Place Without Rounding
If I have a float number of say 3.478399 How can I reduce the number to 1 decimal place without rounding?

I've tried it will sprintf, but it rounds the 4 to a 5 which I want to avoid.

$float_number = 3.478399;
$new_float_number = sprintf ("%0.1f",$float_number);

Output returns  3.5 when really I need it to be 3.4

View Replies !
Place Numbers Into An Array
What i wish to do is place numbers into an array and keep the values in there and add new numbers to the array.

$array = array("1-a","2-b");

can this be done?

View Replies !
Copy File From One Place
I was interested if there is any simple way to copy file from one place to another on ftp.

View Replies !
Place Some Graphics In The Feed
I wanted to place some graphics in the feed and justify them left or right and have text wrap. I am trying to find somewhere that will tell me if I can and what the syntax should be for justification of elements.

View Replies !
Where To Place Object / Function
I have some core functions, say object.php and functions.php which are useful for a lot small php programs I've made.

Should I place that code in for instance a directory called "core" and let all the other programs use it like this:

/core
/program1 (calling core functions)
/program2 (calling core functions)
... and so on

Or should I copy the core functions into each and every other program directory, like this:
/program1/core
/program2/core
... and so on

Main question: If many useres try to access a php-file at the same time, is that a problem, or is the prosess forked (or something like that)?

View Replies !
Tournament Form With 3rd Place.
Well I was looking on the web for a while to see if there was a site made for the World Cup 2006 in which one can make their bracket and print it out, couldn't find one so I made my own. It has been working great, even with my lack of PHP skills, and I have hit a bump on the road. I can't make a 3rd place finish form. Here is what my final 2 pages look like: Code:

View Replies !
Parsing Variables All Over The Place
I've been given a new mission whether or not I chose to accept it. Eventually it's going to turn into a mortgage calcultor but I haven't bothered to get into any calculations at this point. Right now I'm more worried about parsing variables between frames... or even between windows.

I've taken a primtive screendump to try and explain my problem: So in the example the main window displays the "magic number" and the calculator is launched. In this calculator the user can input a new "magic number", and what I want is for this number to be parsed back to the main page. Code:

View Replies !
Insert To A Specific Place
i have an array called from db that is used for a menu bar. the order of the menu bar is set in the sql statment, i want to insert another item into this array between 2 oter items.

View Replies !
Return To Place On Page
I have a page that has an article on it and at the end I have a comment form (it's not online right now). It's not a comment form that displays comments on the page. It's a form that someone uses to send comments to me. Instead of having them redirected to another page, I just have the "thank you" displayed at the bottom.

When the form is filled out and submitted, the page is refreshed and a small thank you message is printed out with the person's name. However, when they submit the page, it returns back to the top. They would have to know to scroll down to the bottom to see the message.

How can I have the page refresh to the bottom with the message displayed?

View Replies !
How To Place Formatted Text On The Php Page
I'm entering data through textarea, and I want to display the same data on the
form with all formatting settings. means, if I pressed enter while entering text in the textarea to make a separate line, the separate line has to come when displaying on the form also.

View Replies !
Writing To A Specific Place In A File
I have a text file. I would like to write a line of data as the first
line and then another as the last line. What is the easiest way to do
this using php 4?

View Replies !
Place Banners From Database In An Array
i wonder how i can place my banners information from a database into an array. I try to reach a method like this: PHP Code:

View Replies !
Place A Cookie File For Keywords
Webmaster are starting to place a cookie file for keywords with alt tags and link to their page. So everytime you see the words INTERNET it would be underlined and the link would be the webmaster site! Question is how do I stop this from happening?

View Replies !
Session Problem (session_start(); Is In The Right Place.)
I now run into a session problem when adding in the sessions so it can store/pass values to the next page. I know the below session code works fine as on the next page it works without a problem.

Can anyone see why this would cause the errors (i've taken out the full URL btw in the error statement):

Warning: Cannot send session cookie - headers already sent by (output started at /***URL***.php:1) in /***URL***.php on line 2

View Replies !
What's A Good Place To Post Code?
I have been working on a nifty PDF library written in PHP that I want
to make available to the public. The package is a bit too large to be
posted at a forum somewhere. I'm also planning to include a good amount
of documentation and example. SourceForge seems a bit of an overkill
for such a small project. What I'm looking for is something like a blog
for programmer types.

View Replies !
Session Id Being Inserted In The Wrong Place
I have a link that must have a GET variable with spaces in it. PHP keeps
inserting the session id right in the middle of my links. I've tried
replacing all spaces with %20...it still sticks it in the middle.

I didn't write this by the way...the links are coming from another site and
my server is inserting the session id into it.

Here is what I'm talking about:

http://mysite.com/page.php?sSQLPreBuiltWhere=L.PROPERTY_STATE_ID%20= %20'FL'%
20AND%20L.NODISPLAY_IDX%20IS%20NULL%20%20AND%20L.N ODISPLAY_OWNER%20IS%20NULL
%20%20AND%20L.VOW_ENABLED_LIST_FIRM_ONLY%20IS%20NU LL%20%20AND%20L.STATUS_COD
E%20=%20'A'%20AND%20L.IDX_ENABLED%20IS%20NOT%20NUL L%20%20AND%20%20L.MLS_ID%2
0IN%20('midfl','newsmyrna','tampa','daytona')%20AN D%20L.CITY_ID%20IN%20('Y21
688')%20AND%20L.PROPERTY_TYPE_CODE%20=%20'S'%20AND %20L.SALE_PRICE%20&sessid=
4bc1f9c2fcbc2f78503cfddf93bc8d5f>=%200%20AND%20L.SALE_PRICE%20<=%20999999999
99

You can see the sessid variable (toward the end) right in the middle of the
sSQLPreBuiltWhere variable. I can't turn off transid...the entire site
relies on it.

What is going on here?

View Replies !
Round To The Hundreths Place In Circumstances
I have a page that multiplies an amount of a part by the quantity of that part, then gives a total. For example: PART (costs $5.00, quantity of 3) That yields a total of $15. I want to it say $15.00 and I want it to round to the hundreths place in circumstances where a part may cost $3.6554, for example. How can I achieve this?

View Replies !
Remove Row From Array And Move Next Value Into Place Etc
Let's say I have an array like this:

$array[0] = "ball";
$array[1] = "bat";
$array[2] = "glove";
$array[3] = "referee";
$array[4] = "strike";
$array[5] = "home run";

Now, let's say I want to get rid of [3] but move the next values up, automatically, into 3,4.

For example,

$array[0] = "ball";
$array[1] = "bat";
$array[2] = "glove";
$array[3] = "strike";
$array[4] = "home run";

Is there a way to simply do this? I could do it using for loops, but is there a simpler way, like a built in function, that will do this for me?

View Replies !
Could An SQL Injection Take Place From A Variable Entered Into A URL?
Could an SQL injection take place from a variable entered into a URL? I am unsure of this, but to the best of my knowledge, URL variables are automatically sanitized.

View Replies !
Holding Place Values In Mysql
I have a field in my database that is a winning percentage for each team in my league. This field is a float and I want the winning percentage to produce 3 decimal places. The problem I am having is that when I enter the value in the DB if the value is say, .650, itr only enters .65. I want it is this way for consistentcy when I print the data on my stats page. Is there any way to combat this?

View Replies !
Image To Either Not Be Extended Over 269x269 In The First Place
I've been making a roulette script that basicly spins the image in PHP (a roulette wheel), it's working fine except sometimes the image becomes bigger than I want it, the actuall roulette wheel remains the same size.

It's obviously because the corners of the image are now extending over the borders, so PHP then compensates for this and fills in the rest of the background. (I hope i'm making sense so far).

I want the image to either not be extended over 269x269 in the first place, or to be cropped after rotation. Can anybody help me do this? Here is a sample of the current rotation code. It all goes wrong on the imagecopyresampled() part. Code:

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved