I think this is an escaping issue or something. When I execute the query and populate all variables, everything is peachy and all row is updated properly in the DB.
I looked on StackOverflow to get me rolling with these dynamic/contructed on the fly queries and I'm at the end of my rope.
My stuff looks like this:
$sql="UPDATE users S...
When using the function imagepng() in php, how can I make sure the images that I save are saved with a transparent background?
...
Hey everyone,
I have a jar file that I would like to execute using PHP, but when I run the script all I get is the following error: Could not reserve enough space for object heap. I have done some searching and it seems as though I am getting this because the command isn't being executed in a login shell. If this is the case how do I ...
My backend URLs look like this:
mysite.com/backend.php/blog
I'd like to change it to:
mysite.com/backend/blog
Technically this isn't limited to admin apps, as Symfony grants every application two front controller scripts. But I hate having the script name in URLs and as such I'd like to change it. Is this possible?
Thanks in ad...
Okay, so emoji basically shows the above on a computer. Is that another programming language? So how do I put those little boxes into a php file? When I put it into a php file, it turns into question marks and what not. Also, how can I store these in a MySQL without it turning into question marks and other weird thing...
I have a to match a field in MySQL, for which I thought I could use a regular expression, but it appears that MySQL doesn't have the functionality I need to do the job. Here's the scenario:
I have a variable in PHP called $url. Let's say this variable is set as the string "/article/my-article/page/2". I also have a table of URLs in M...
How to parser XML exactly XLIFF files and get the source content in PHP.
how to get the source content of the xml file http://docs.oasis-open.org/xliff/v1.2/cs02/Sample%5FAlmostEverything%5F1.2%5Fstrict.xlf
...
what's the difference between using a js library like jquery and using an ajax framework what's the most active ajax framework out there( preferably for PHP)
or a better question would be...what's the difference between an ajax request fired with Jquery and an ajax request fired using any "AJAX frameworks"
...
Hi all,
i am doing an online quiz using PHP, which contain essays and multiple questions. After finish answering, student will be graded immediately. for the multiple questions there are no problem, but having problem at the essay part.
My problem is:
how can i do auto check
and later i can edit the student answer to make a correcti...
Hello,
For a web application, I decided to store the sessions variables into a database. Everything is working like I want except for the logout, in which I thought that with a simple session_destroy() will do the job but is not.
As I mention all the session information is stored in the database, but I notice that when calling sessio...
I have a php page that I run ever minute through a CRON job.
I have been running it for quite some time but suddenly it started throwing up these errors:
Maximum execution time of 30 seconds exceeded in /home2/sharingi/public_html/scrape/functions.php on line 84
The line # will vary with each error ranging from line 70 up into the 90s...
How to log our own error messages(for ex: error due to invalid user date entry) which is generated in php program to drupal error log.
...
I'm having trouble enabling the socket transport "ssl" in PHP. When I run my script, I get the error:
Warning: fsockopen()
[function.fsockopen]: unable to
connect to ssl://www.my.site.com:443
(Unable to find the socket transport
"ssl" - did you forget to enable it
when you configured PHP?)
I'm running IIS6 on Windows and...
Was curious to know which is faster - If i have an array of 25000 key-value pairs and a MySQL database of identical information, which would be faster to search through?
thanks a lot everyone!
...
Hi,
I have a small requirement in PHP as below. Some thing like chat.
For eg there are 2 users A & B.
When "A" clicks on "Chat" link. "B" should automatically gets one javascript popup.
Is there any way of doing this except following.
- One JS script runs continuously with AJAX.
I dont want to happen client-server interaction conti...
if(preg_match('/^[a-zA-Z0-9]+\.(gif|jpe?g)$/',$row['filename'],$matches) &&
is_readable($row['filepath'].$row['filename'])){
echo header('Content-Type: image/'.$matches[1]);
echo header('Content-Length: '.filesize($row['filepath'].$row['filename']));
echo file_get_contents($row['filepath'].$row['filename']);
} else ...
Hi,
I'm trying to combine multiple JSON objects into a single one in PHP. I'm iterating through the JSON objets, decoding them, parsing out the parts I want to keep, and storing them in a property in my php class.
Supposing my json objects look like the following format:
{
"lists" : {
"list" : [
{
...
How would I get to the name variable given the object. $obj->@attributes['name']; would obviously not work.
SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => Address
)
[value] => Address
)
...
The XML file is here.
How can I get the source content in this XML file?
...
Suppose there is a site where we are uploading images. Now, when we have to display the album of that particular logged-in user. What we can do is:
We save the path of that image in the database and retrieve the image
Save only the name(unique) of the image and use fopen() because we save all the uploaded images in a single folder
N...