In my PHP program, I am having trouble with the mail() function.
I can call it in my scripts anywhere up until this line:
$this->db_conn = mysqli_connect($this->db_host, $this->db_user, $this->db_pass);
If I put a call to the mail function immediately before it, mail() succeeds and returns true. If I put mail() right after this line...
Hello all,
Just started using CodeIgniter, loving it.
Having enabled the database to be one of the libraries to be loaded. I noticed that on pages that I don't even use the database (static pages). CI complains:
A Database Error Occurred Unable to
connect to your database server using
the provided settings.
The error is not a...
I post pictures from other websites and I would rather have those on my servers, in case their server dies all of a sudden. Say the file is located at "www.www.www/image.gif", how would I copy it to my directory "images" safely?
I write in PHP.
Thanks!
...
Hi all,
In one of my previous questions, I've asked how I would replicate facebook's "new message" alert, that is shown in the head section of their website inline with the "inbox" link. The functionality allows data to be updated live, without the user refreshing their browser, and has since been integrated further into their technolog...
This was taken from O'Reilly's Learn PHP, MySQL, and Javascript:
function sanitizeString($var)
{
$var = stripslashes($var);
$var = htmlentities($var);
$var = strip_tags($var);
return $var;
}
function sanitizeMySQL($var)
{
$var = sanitizeString($var);
$var = mysql_real_escape_string($var);
return $var;
}
Is...
I have a set of defined constants, and for some I'm serializing new instances of a class and setting as a constant (probably not the best idea, I know...), the problem is that when information changes in the instance of the class, it doesn't update the referenced memory that was declared in the constant... I know a constant cannot be alt...
I am trying to integrate my custom user system with Wordpress, and I have recently asked a question on how to redirect requests to wp-login.php to my own login/registration page, but as I was working on the pluggable functions, I realized that requests to wp-login.php can either be for login, registration, or log out.
This is set in th...
I am trying to pas a variable using the Google search API.
To speed things up for you I believe the problem is with the third last line:
imageSearch.setSearchCompleteCallback(this, searchComplete, [imageSearch]);
I have a number of div elements, each with their own specific id (ie. "showImagesResults100" and "showImagesResults102", e...
Since AIM 7 beta 2, and now onto AIM 7 beta 6, and GM - AIM has started to use a new .aba file format for keeping files in. The files used to be located in a folder that we could access in program files, however due to "performance increasements", AOL has decided to put them in this .aba file instead. The file is not extractable using wi...
I'm making an interface-website to update a concert-list on a band-website.
The list is stored as an XML file an has this structure :
I already wrote a script that enables me to add a new gig to the list, this was relatively easy...
Now I want to write a script that enables me to edit a certain gig in the list.
Every Gig is Unique ...
I'm running PHP5 and Apache with mod_rewrite enabled.
As we know on every page load browser sends cookie data to requested files. This data could be useful for PHP files, however for images or css files it has no value and simply make communication between browser and server slower.
Is there any ways to tell browser or server to stop d...
Whats better to use with PHP, JQuery or AJAX and why?
What would you consider better AJAX or JQuery?
...
I'm trying to mimic a reddit feature. When you link to a specific comment in a threaded list (example), you can add a var 'context' in the url to show the context.
I can show you the comment I want you to see, plus a parent (context=1) or the parent's parent (context=2) and so on.
Now, cakePHP simplifies the threaded thing with find('th...
Hi how can i generate a password using php, to use for the htpasswrd file.
which encoding we are using?
...
Hello,
Im using Mantis bug tracker v1.1.8. When mails sent from mantis arrive in my company inbox,the date shown on the Inbox page is "Unknown Date" for the message.
On opening the message, i can see the actual date. The date of mails received from Mantis is of the format Thu, 31 Dec 2009 12:30:28 +0580, whereas the date format of othe...
<form method="post">
<label>
<input type="text" value="" size="18" name="searchtxt" class="box"/>
<input type="submit" value="Search" class="button" name=""/>
</label>
</form>
I pressed submit,but searchtxt is not submitted,why?
...
Is there a good rating/voting script that uses PHP?
...
I have a string like "6:15pm". Is there any function in PHP which will convert it directly to 24 hr format. ie to "18:15"?
...
I have an array something like this..
[0] => english
[1] => 85
[2] => mathematics
[3] => 75
[4] => science
[5] => 71
[6] => social
[7] => 92
I want all values with even indexes to go as keys and all values odd indexes to go values. Like this
[english] => 85,
[mathematics] => 75
[science] => 71
[social] => 92
Is there any good funct...
Hai
i have implemented a js in my Faq page.... Below is the Js Code
var Spry;
if (!Spry) Spry = {};
if (!Spry.Widget) Spry.Widget = {};
Spry.Widget.CollapsiblePanel = function(element, opts)
{
this.init(element);
Spry.Widget.CollapsiblePanel.setOptions(this, opts);
this.attachBehaviors();
};
Spry.Widget.CollapsiblePa...