I'm curious if there are any SubSonic ports for use with php on a unix environment. I'm using SubSonic at work and I love it, and I'd like to create a MySQL database on a FreeBSD server and talk to it using php. I was hoping to use SubSonic again, but I'm not sure if there are any versions of it that work with php.
Are there any versi...
I am currently developing a small CMS where the requirement is having subcategory of levels...
ROOT
SubCategory 1
The level is just one, is there any tutorial or code which will guide me.
...
hi,
I'm writing code in PHP that analyzes user input.
I'm hoping to analyze it through a AJAX request using jquery.
I'd like to provide real-time feedback to the user while I'm preforming the calculations.
For example:
"Uploading your input", "Analyzing", "Preparing final result" and so forth.
How can I go abut doing this?
...
I am processing credit cards using a payment gateway. To POST the data to their servers, I am using cURL in PHP. I have an SSL certificate issued to my domain, to ensure all POST'ed data is encrypted. Because the SSL certificate is already installed, do I still need to use the SSL options for cURL? If so, which of the options do I ne...
I have a array of associative arrays
aa[] = ('Tires'=>100, 'Oil'=>10, 'Spark Plugs'=>4 );
aa[] = ('Tires'=>454, 'Oil'=>43, 'Spark Plugs'=>3 );
aa[] = ('Tires'=>34, 'Oil'=>55, 'Spark Plugs'=>44 );
aa[] = ('Tires'=>454, 'Oil'=>43, 'Spark Plugs'=>45 );
aa[] = ('Tires'=>34, 'Oil'=>55, 'Spark Plugs'=>433 );
aa[] = ('Tires'=>23, 'Oil'=>33...
I have a template file that contains all my header, footer and common information. It includes the appropriate content for the current page (two-step view pattern).
I am trying to set up a login system using PHP Session variables. I can set the variable and sometimes they work but sometimes they disappear. Clicking on links will somet...
Storing an array submitted from forms stores elements with null values. Is there a way to store only non null fields into the php array?
$_SESSION['items'] = $_POST['items'];
is my current code.
...
I am planning on teaching myself PHP. I was wondering if I should use LAMP or a Microsoft stack. I have access to both. I would like to know which will ultimately be easiest to learn, but be the most relevant.
...
I recently ran up against a problem that challenged my programming abilities, and it was a very accidental infinite loop. I had rewritten some code to dry it up and changed a function that was being repeatedly called by the exact methods it called; an elementary issue, certainly. Apache decided to solve the problem by crashing, and the...
I'm working on a PHP web application with PostgreSQL. All of the SQL queries are being called from the PHP code. I've seen no Views, Functions or Stored Procedures. From what I've learned, it's always better to use these database subroutines since they are stored in the database with the advantages:
Encapsulation
Abstraction
Access rig...
There seems to be so many ways of uploading images to a PHP enabled server, it is difficult to make sense of the various options and under what circumstances it is prefereable to use one over the other.
On the front end you have the option to JPGencode or not, use a ByteArray or not, further compress the ByteArray or not.
On the server s...
Using php and mysql (and Drupal), I want to generate an index based on the number of items in the database by year - 20090001, 20090002, 20090003, etc.
Is there a way to do this without testing if the year has changed for each and every item - a cron job perhaps?
...
I want to convert my entire MySQL Table into XML... Can anyone Help me out with a tutorial or code.
...
I am trying to write a file to a sub folder of the directory my cron script is in using file_ put_ contents. However, I keep getting a warning "failed to open stream: No such file or directory."
I have this directory structure:
httpdocs/scripts/fileDirectory
The cron script lives in the scripts folder. I call it with the cron comm...
Is there a way to automatically go to a URL returned via XML from an API call? For instance I call and it returns the XML file that I parse with simple_xml_load() and then I create a link like so,
<a target=_blank href='" . $title->links->homedetails . "?scrnnm=Nexus-Software'>".
$title->address->street . "</a>
But I do not want the...
Hey everyone,
Before I start coding, I want to come up with a good design first. Basically, I have a database table filled with dates, and users who are associated with those dates (the dates are in sql format).
Using PHP I want to, for each user, calculate (count in total) how many weekdays they are associated with, as well as how ma...
Hi there,
I am trying to embed a flash video into a custom setup of the tinyMCE editor. It is seperate from the main WordPress one, but it is still within the wordpress admin area.
The output code from a simple youtube embed block is as follows:
<p><img mce_src=\"../wp-content/themes/porcelain/tinymce/jscripts/tiny_mce/plugins/media...
I have inherited a database which contains strings such as:
\u5353\u8d8a\u4e9a\u9a6c\u900a: \u7f51\u4e0a\u8d2d\u7269: \u5728\u7ebf\u9500\u552e\u56fe\u4e66\uff0cDVD\uff0cCD\uff0c\u6570\u7801\uff0c\u73a9\u5177\uff0c\u5bb6\u5c45\uff0c\u5316\u5986
The question is, how do I get this to be displayed properly in an HTML page?
I'm using PHP5 ...
Hi,
I need to convert this .NET syntax into PHP using SoapHeader() call.
esb.RequestServerVersionValue = new RequestServerVersion();
esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1;
Thanks a lot! :)
...
I'm just getting started on writing functions instead of writing everything inline. Is this how a reusable function is typically written?
function test_user($user) {
$conn = get_db_conn();
$res = mysql_query("SELECT * FROM users WHERE uid = $user");
$row = mysql_fetch_assoc($res);
if (count($row) == 1) {
return true;
}
else {
return...