Here is my code.
require('class.phpmailer.php');
$mail = new PHPMailer();
$email = '[email protected], [email protected], [email protected]';
$sendmail = "$email";
$mail->AddAddress($sendmail,"Subject");
$mail->Subject = "Subject";
$mail->Body = $content;
if(!$mail->Send()) { # sending mail failed
$m...
Hello,
i m using joomla default editor for a form and jquery validator plugin, now i want to validate that joomla text editor should not be blank.... how do i validate that??
i read an article regarding validation for tinymce, i want similar to this post
although if i click on toggle editor than validation works( coz it turn ...
I have created a chat application using PHP, but it works only into my site(like the user need come to my site and chat..), i want that user can chat with me through any chat server like Gtalk,yahoo, or MSN. How can it be done??
...
Hi, i used always $text = $datasql[0];
where $datasql = array('0'=>array('some'=>'text', 'some2'=>'text2'), '1'=>$data, etc...);
and found work costruction $datasql = &$datasql[0]; and work, why?
That really reference?? and how remeber php in memory this solution.
Thanks for reaply
...
Ok, I know it is best practice that once you change or remove a page URL, to redirect that url to the new relevant URL.
But for how long? forever?
For example, I am using Google website optimizer to test different variations of a page. So I have to create a different url for each like: original.php, var1.php, var2.php, etc.
once the t...
I have a string like this:
<div class="container">
<h3 class="hdr"> Text </h3>
<div class="main">
text
<h3> text... </h3>
....
</div>
</div>
how do I remove the H3 tag with the .hdr class using as little code as possible ?
...
Hi all,
I am trying to generate an excel file with php. This works fine in Firefox but with IE I am only getting an empty file. This is what I am doing basically:
header('Content-type: application/ms-excel');
header('Content-Disposition: inline; attachment; filename='.$filename);
echo $data;
I have tried various header settings but ...
Hi All,
I have created two simple files in php.
first file (i.e. input.php ):
Created one form having one textbox and one submit button
I have one textbox, user will add input in this textbox
One submit button, after clicking on this form will get submit ( used post method )
Second file (process.php) :
Posted contents are receive...
How can I number my results where the lowest ID is #1 and the highest ID is the #numberOfResults
Example: If I have a table with only 3 rows in it. whose ID's are 24, 87, 112 it would pull like this:
ID 24 87 112
Num 1 2 3
The reason why I want this, is my manager wants items to be numbered like item1, item2, etc. I initially ...
I'm trying to compare data from two sources.
ORIG Kick-Ass: Music From The Motion Picture
ALT Kick-A*s (Music from the Motion Picture)
ALT Kick-Ass: (Music from the Motion Picture)[Explicit]
ALT Kick-Ass: A dedication
ALT 1 ALT 2 and ORIG are the same match. ALT 3 is a dummy result.
I need to verify that these have a match, is there ...
I am looking to get the substring from the end of a line of text, say
$text = "bob/hello/myfile.zip";
I want to be able to obtain the file name, which i guess would involve getting everything after the last slash as a substring, can anyone help me how to do this is PHP? A simple function like
$fileName = getFileName($text);
...
I'm searching for a javascript obfuscator. Though I've found many obfuscators, no one so far seems to be able to handle (ie ignore) inline php code. Example of what I mean by inline php code:
var my_javascript_variable = <?php echo $my_php_variable; ?>;
Is this possible to obuscate, and if so, does anyone know of such a tool?
...
Can anyone tell me the best way to encrypt data between a CI application and a MySQL db hosted on separate servers. SSH tunnel? If so, has anyone gotten this working using CI? Code examples and/or links are welcome.
...
Can anybody explain to me why this won't work on CodeIgniter?
.linkBack{
background-image:url('/myBlog/CodeIgniter_1.7.2/pictures/arrow.gif');
display:block;
height:58px;
width:105px;
text-indent:-999px;
}
<div class="linkBack"><?=anchor('myBlog', 'Back to Blog');?></div>
while this would work perfectly:
#linkBack {
backgr...
I'm getting a JSON encoded array from Facebook which contains:
[{"message":"D\u011bkujeme Zuzana
Boh\u00e1\u010dov\u00e1 za na\u0161i
novou profilovou fotku :-)\nWe thank
Zuzana Boh\u00e1\u010dov\u00e1 for our
new profile picture :-)"}]
When I decode the JSON and output the contents I get:
DÄ›kujeme Zuzana BoháÄová za...
Hi,
I'm trying to use regex to parse some plain text and add a definition from a glossary to any words that match it. I'm doing it like this:
for ( $i = 0; $i < count($terms); $i++ ) {
$search = '|(?<=\b)('.preg_quote($terms[$i]['title']).')(?=\b)|i';
$replace = '<a class="tt2" rel="tooltip" title="'.$terms[$i]['pageBody'].'">...
What I would like is a snippet that when executed, grabs the TM_FILEPATH output
Explodes it on the slash /
Then split out each part as a placeholder containing that part and an underscore (apart from the last part (the filename))
For Example:
for a file in directory path
/Path/To/Original/file
we would get
class ${1:Path_}${2:To_}${3:Or...
I want to use two independent $_SESSIONs in a single PHP script.
I have attempted to verify that this is possible using the following code.
error_reporting(E_ALL ^ E_STRICT);
session_name('session_one');
session_start();
$_SESSION = array();
$_SESSION['session_one_var'] = 'test_one';
$output1 =
(
"session_id(): '" . session_id() ....
So I was wondering is this enough to be safe that user won't do any SQL injections and the number will be only and always integer? The $id in getArticle function is binded to SQL query.
<?php $id = (isset($_GET['id']) && is_int((int)$_GET['id'])) ? (int)$_GET['id'] : false ?>
<?php $news = $class->getArticle($id) ?>
As far I tested it...
Hello,
Does anybody know how to prevent FILTER_SANITIZE_SPECIAL_CHARS from converting the line breaks ( \n ) into ( ; ).
I'm developing a simple commenting system for my website and I found that the php filter converts \n to
so when using nl2br() there are no line breaks.
help please.
thanks :)
...