unable to get line breaks when sending mail via php mail() function

Here is my code:
$body = “Name:{$name}”.PHP_EOL;
$body .= “Phone:”.$phone.PHP_EOL;
$body .= “Email:”.$email.”\n\n”;
$body .= “Comments:”.$comments.”\n\n”;
$headers = ‘From: MAILER <’.$emailTo.’>’ . “\r\n” . ‘Reply-To: ‘. $email.”\r\n”;
$headers .= “Content-Type: text/html; charset=UTF-8″;
[...]

Using javascript to assign a php variable

I purchased modalbox plugin from envato market place made in javascript i want to use it to implement my categories> subcategories> items. Anyhow i know JavaScript variable can be assigned a value using php however i need the opposite.
On my first step i let the user pick a category using basic links then onclick even [...]

Is it possible to embed a Servlet application on one site into another site using PHP?

Let’s say one website has a catalog made with Servlets.
How would one, theoretically, embed that catalog application inside his own website using PHP?
Is that possible?

Php Syntax Error

I’m trying to update a table in php and I keep getting syntax errors.
Here’s what I’ve got:
if (isset($_POST['inspect'])) {
// get gis_id from pole table to update fm_poles
$sql = “select gis_id from poles where pole_number = ‘”.$_GET['polenumber'].”‘”;
$rs = pg_query($sql) or die(‘Query failed: ‘ . [...]

PHP CURL request not working , not getting any data back

I’m posting XML data to a URL that is supposed to send me (echo) back results, and instead of sending them back to me , this is what I get after running the PHP .. My curl code is below this result … I am suspecting that something might be wrong with my CURL code [...]

MySQL connection within a PHP function overwrites existing connection (other database) – how can I prevent this?

We open a MySQL connection to host_1 at the beginning of our script. Somewhere in between, we call a function that opens & closes a connection to host_2 (function retrieve_information_from_host_2).
Unfortunately, the code after the function call still uses the connection of the function (host_2).
We need it though to continue with the preceding connection [...]

Search engine with multiple fields

I’m trying to find a good php search script with multiple fields (filter). And the information has to be in a mysql database.
Here is an example of what I want: http://www.neckermann.be (the box in the middle).

How to add html table, tr and td in php?

I write a php script, it has a html form. I want to put html table, tr, td also in php script. How it is possible?
php code is
while($row = mysql_fetch_array($result))
{
echo “<tr><form action=’driver-location-update-1.php?update=$_GET[update]‘ method=’POST’>
$row[did] <input type=’text’ name=’location’ value=’$row[location]‘ id=’location’>
<input type=’submit’>
[...]

How to invoke static method using two variables in PHP

I have two variables:
$a = ‘some_class’;
$b = ‘some_method’;

What I want to do is something like this (the method is static):
$a::$b;

Is it possible? I’ve tried the reflection class, but I can’t call static methods…

I am creating a new library to codeignighter, seem i cannot use/load helper i’ve created

basically i have a helper file with several function.
I auto load the helper in the config file so theoretically reloading it is not required.
However when i try to use the function that i created(from this helper) within a new library that i am working on it will through this error:
“Parse error: syntax error, unexpected ‘(‘, [...]

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories