hi,
I'm using mimemail module in Drupal to send e-mails with attachments. The e-mails are correctly sent, but the attachments not. This is the code I use (I've just enabled the module):
$sender = '[email protected]';
$recipient = '[email protected]';
$subject = 'New order';
$body = 'Please, see the attachment.';
$plaintext = TRUE;
$...
Hi All,
So I'm trying to create a function that generates a SQL query string based on a multi dimensional array.
Example:
function createQueryString($arrayToSelect, $table, $conditionalArray) {
$queryStr = "SELECT ".implode(", ", $arrayToSelect)." FROM ".$table." WHERE ";
$queryStr = $queryStr.implode(" AND ",$conditionalArray); /*NE...
RewriteRule ([a-zA-Z0-9/_]+)/([0-9]+)x([0-9]+)_([0-9a-zA-Z_]+).([0-9a-zA-Z_]+)$ imgsize.php?&w=$2&h=$3img=$1/$4.$5 [L]
path to file:
/imgsize.php?w=200&h=100&img=uploads/elvita.jpg
/uploads/100x110_elvita.jpg
why its not working? :(
...
Hello...
I have a few files like below:
index.php:
require_once("foo.php");
require_once("bar.php");
foo.php:
class foo {
function1() {
}
}
bar.php:
class bar {
?????
}
My question is, is there any way of accessing function1 from the foo class in the bar class, without having to include the foo.php file in the ba...
I am looking for help in creating a Regular Expression that validates a URL of very long length (eg. a very long Google Maps address). I am new to regular expressions and I am using it in PHP with preg_match().
I have used the expression:
preg_match('/^(http|https|ftp):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/...
I'm trying to use ajax to make multiple simultaneous requests to a php script, however, it only seems to do 1 instance at a time and I cannot connect to do the next call until the previous one is finished. What do I have to do in order to make it do them all at the same time? I'm using apache (xampp) on windows. I've also tested this on ...
I have an e-commerce website (created with a ecommercetemplates shopping cart PHP template) and on the catalogue pages there are, at times, a few pages which are numbered at the bottom. The links to these pages are, for example, in the form:- /product.php?cat=27&pg=2 despite the main page having been mapped to:- /widgets using a rewrite...
Okay, so I am creating an MVC framework in PHP and I want it to be pretty flexible. This is all fine - I'm working on this at the moment and things are going well (So I don't want to use Zend or another pre-existing framework, haha!), but I wanted to make both the framework and application quite dynamic. I'll try explain:
Here's a simpl...
How can you search a partial string when typing (not to use MySQL) like the LIKE function in MySQL but using PHP when searching a string, e.g.
<?php
$string = "Stackoverflow";
$find = "overfl";
if($find == $string)
{
return true;
}
else
{
return false
}
?>
But that will obviously work won't, but is there a function whe...
How can I post a full URL in PHP?
For example:
I have a form allowing individuals to submit a long url. The resultant page is /index.php?url=http://www.example.com/
This is fine for short URLs, but for very long and complex URLs (like those from Google Maps) I need to know how to keep all of the data associated with variable url.
...
I've been receiving a lot of spam emails and I want to post them on my website to serve as a warning for others not to believe it. Since I'm too lazy to login to my email account and check. I'm thinking to write a script in php (since this is the only one i know)that logs in to the mailbox at regular intervals, retrieves the content of t...
I need all active sessions to be destroyed when I call a certain function. This function when called needs to destory all sessions NOT immediately but after exactly 30 seconds. Even if the user leaves the page where the session was called before the 30 seconds, his browser should still be cleared of all sessions so when he comes back to ...
Im getting the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10', '16:39:02', '292.35')' at line 1
this is the query im running in php:
mysql_query("INSERT INTO `copper`
(`month`, `time`, `price`)
VALUES
...
Hi,
I have a built a cakephp application. I have two models
one is groups and other is users
groups hasMany users
users belongsTo Groups
in my users table I have group_id column which displays the group id to which the user belongsto. (user can only belongto one group)
Now if I want to display count of all users in particular groups...
I've been building an event promotion site in PHP and MySQL for the past couple of months where anyone can sign up and add their local event's details along with a poster, which I resize.
As it stands, I've got the whole process working fine locally and on a hosting service, but before the site goes live I have a couple of questions on...
Dear All ,
I am new to html world . I build all our websites with flex . I have concepts of html ,php ,java(architect) ,Mysql( Oracle DBA) Looking for your help to build website like askmeflash.com . I mean
Are there any available frameworks I can use to build like that?
What should I learn to build website like this?
What tools I h...
Hi, I have been reading a bit lately about the singleton pattern. When readin the technical aspects of it, it appears to be ideally suited to managing a database handler or the likes. But after reading wider resources it appears that the developer community really does not favour the pattern.
I am struggling to find a better solution ...
I'd like to write a new website from scratch. I'll be using PHP for server-side and Flash/HTML for client-side.
How can I achieve a website navigation something like this http://mariotestino.com/ [site auto-plays sound]
Notice when you click on Projects | Arts | Contacts...etc...you do not see .html page, instead it has a clean URL.
I...
I dont think this is right...
$compname = $subformat_$subgame_$subname_$subseason;
What is the correct syntax?
THanks
...
I am starting a new project trying to create a web application for an electronic programme guide for TV. This is not going to be a large scale project, but just something that I can use to learn web application programming. I am going to be using PHP for this.
Before beginning coding for the application, there is a crucial question that...