php

Calling PHP From C

I am trying to write an application that will use PHP as a scripting language. The application is a CGI handler, and I want to be able to call PHP pages from it. I am looking for code that will let me initialize PHP inside the C program and then pass it either a buffer containing the php code, or a filename, for it to parse. I want to...

How is the performance after enabling php_pdo_mysql.dll?

Will I notice any loss in performance if I enable php_pdo_mysql.dll in php? ...

How do I update multiple records in a table with a single MySQL query?

Hello. I would like to update multiple records in a MySQL table using a single query. Basically, this is a tasks table, which has assignments for different people on different dates. When these assignments are changed and submitted via the Online form there is a lot of POST data that gets submitted (pretty much all the pending assignm...

Doctrine - Retrieving list of fields in subclass gets all fields in aggregate

I have an object model that contains a class with several subclasses. The subclasses share a few fields from the parent, but they each have their own fields as well. I'm using the column_aggregation inheritance type to do this because I want to be able to polymorphically store objects of the parent class type, but retrieve objects ...

JavaScript and Flash incompatibility with IE

Hey! I have a JavaScript Picture gallery. The arrows under the gallery make possible to move through all pictures of the gallery. When I have added to that page also a .SWF flash animation the gallery arrows stoped working properly in IE. But in other browsers like Mozilla, Google Chrome, Opera and so on it works! I have removed the .SW...

Can't save php.ini

I have PHP for FastCGI installed on Windows 7 through the Web Platform Installer. I need to edit php.ini to enable logging, but I'm not able to overwrite the existing file, apparently because something has it open and/or locked. Stopping the server in IIS Manager doesn't help; stopping the Windows Process Activation Service and the Wor...

cookie in javascript and php

Can I set a multi-dimensional array 30x200 in JavaScript as a cookie and then read it back in PHP? ...

Appropriate data structure for table that uses ranges

I have a table that looks like this: <22 23-27 8-10 1.3 1.8 11-13 2.2 2.8 14-16 3.2 3.8 and it goes on. So I'd like to lookup a value like this: lookup(11,25) and get the response, in this case 2.8. What is the best data structure to use for this? I have the data in CSV format. I'm looking to program this in ...

Modal login form how to fit it in my current login form?

Hello all, Can somebody please explain me how this code fit in to my current login form? This is the Modal code: <!-- #dialog is the id of a DIV defined in the code below --> <a href="#dialog" name="modal">My new login form</a> <div id="boxes"> <!-- #customize your modal window here --> <div id="dialog" class="window"> ...

Eclipse PDT vs. NetBeans for PHP development

How does Eclipse PDT compare to NetBeans for PHP development? I just bought a new computer with Windows 7 and I'm starting to set up a development environment for PHP. Has anyone used both IDEs lately and could make a quick comparison? If you know what major frameworks are supported, that would be great too. ...

Search Results and the Back Button / HTML Forms

I'm looking for a solution to a recurring problem I have with form based search results in my application. Basically when a user searches using an HTML form and I display the results from the Database on the next page, this works perfectly. However, when a user clicks on an individual record in the result set and then clicks "Back" on ...

Drupal — Fatal error: Class 'Memcache' not found

Hello, I have installed drupal on my localhost. It worked well 2 months ago, but now something happened and I don't know why. I'll be very grateful if you can help me. Thanks in advance. The full error looks like this: Fatal error: Class 'Memcache' not found in /srv/www/htdocs/modules/memcache/dmemcache.inc on line 177 1) ph...

Twitter URL encoding

Hi, We're about to launch a little twitter Christmas competition, and I've run into a little snag. To enter, people will need to post a tweet in the following format: @user blah, blah, blah #hashtag Currently, I have a form where they enter their answer (the blah, blah, blah) and a PHP script which encodes the entire statement and a...

Php upload file

The code looks like this: html <form action="contact.php" method="post" enctype="multipart/form-data" onsubmit="return Validare();"> <input type="text" name="nume" value="Nume" class="contact" id="Nume" onclick="if(this.value=='Nume')this.value='';" onblur="if(this.value.replace(/^\s+|\s+$/g,'')=='')this.value='Nume'" /><font colo...

Jquery UI Checkboxes - Check category only if all subcategories are checked.

Hi, I have the following code. I need help fixing it such that the "Category" checkbox for each category should be checked only if all the items under that are checked. Thanks <html> <head> <script src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script> google.load("jquery", "1.3.2"); google.load("jqueryui", "1.7.2"); </script...

Can this query be done without a loop?

So, basically, I have a MySQL table called 'topics' and another one called 'replies', for example. In table 'topics', there's a field called 'relforum' which relates this topic to a forum section. And in the table 'replies', there's a field called 'reltopic', which relates the reply to a topic. Both tables have an id field, auto_incremen...

Search entire table? PHP MySQL

Hello, I have made the following search script but can only search one table column when querying the database: $query = "select * from explore where site_name like '%".$searchterm."%'"; I would like to know how I can search the entire table(explore). Also, I would need to fix this line of code: echo "$num_found. ".($row['site_name']...

Files are getting corrupted via FTP Client Upload

I tried uploading files to my server my.php (normal local file) <?php $box_title= "SEARCH ME" ?> After uploading via FileZilla FTP Client (remote server file) // SOMETIMES ABOVE FILE BECOMES <?php$box_title= "SEARCH ME"?> // OR SOMETIMES LIKE THIS <?php $box_title= "SEARCH ME" ?> I suspect this is a server related issue, but no...

Php and mysql caching

I am currently working on a php/mysql project with the AbleDating system, my customer is worried about server load so he asked me to use "caching" as much as I could, he asked me to cache mysql query and some html zones... Is that possible to cache only some html zones with php? If yes how can I do this? For the mysql caching is it jus...

PHP how to run sql query one part at a time?

I have a table with roughly 1 million rows. I'm doing a simple program that prints out one field from each row. However, when I started using mysql_pconnect and mysql_query the query would take a long time, I am assuming the query needs to finish before I can print out even the first row. Is there a way to process the data a bit at a tim...