Hi
I'm building an app in CodeIgniter. I have an invoice form which uses jQuery to create new line items. The line items are formated as follows:
<input type="text" name="invoice[new_item_attributes][][description]" class="ui-corner-all text invDesc" title="Description" />
<input type="text" name="invoice[new_item_attributes][][qty]" c...
I am a beginner in php and am trying some very simple tests to get started.
I seem to be unable to get any values from $_GET.
This test.php
#!/usr/bin/php
<html>
<body><h1>GET test</h1><p>
<?php
print_r($_GET);
?>
</p></body></html>
produces the following when called with http://my.url/test.php?aValue=A&bValue=B
<html>
<bo...
I was wondering how can I display a members article they created and show it to visitors all while displaying the members info that is associated with that article to the visitors.
I hope I explained it right?
Here is my mysql articles table.
CREATE TABLE authors_articles (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
author_id INT UNSIGN...
So I'm trying to go through the Version 3 Guide of Kohana and keep getting an error on the hello world create view part.
ErrorException [ Warning ]: Attempt to assign property of non-object
Line 8: $this->template->message = 'hello world';
I placed the site.php in the application/views folder... is this the wrong place...?
The code.....
Is it actually possible to get data in both $_GET and $_POST? And how does this relate to what is in $_REQUEST?
...
Hi,
The invoice input values which hold the totals of invoice line items that get updated via JS return a NULL value when they are submitted.
<span class="sublabel">Subtotal</span><input type="text" class="total-box" id="product-subtotal" readonly="true" />
<span class="sublabel">Tax</span><input type="text" class="total-box" id="produ...
I need to find a stable PHP IDE/text editor that have theses features:
Class/function list (like the Outline in Eclipse)
Code completion
FTP Support
Fast
Stable
I've tried Eclipse with RSE and PDT, crashes and hang way too many time when using FTP.
NetBeans is quite good but the GUI is horrible and slow.
Aptana, my favorite IDE, but ...
Okay I kind of know how to display the time with PHP and MySQL but I need a little help.
I want to display the time something like this in the example below.
August 5, 2010 @ 8:47:28 PM
Here is the code I have so far that is listed below.
date('F j, Y', strtotime($date_created))
...
I have two Wordpress blogs. I want to pull the "5 most recent posts" from the first blog with post title, date, and link to post and display this data on the other. I don't know if there is a plugin that does this sort of thing already, but just wondering how I can achieve this.
...
I want to check posted content against a pattern. I am having trouble setting up this preg_match (or array?). The pattern being...
TEXTHERE:TEXTHERE
TEST:TEST
FILE:FILE
AND
TEXTHERE:TEXTHERE TEST:TEST FILE:FILE
I want to check for either pattern, the one with the whitespace and the one with the line break. If the posted content is...
So I have this black box authentication method, handed down to me from the accounts people, which basically amounts to ldap_bind($connection, $username, $password). But of course, I want my users to be able to log in for, say, 30 days at a time.
The naive but insecure way to handle this is to store the username and password in plaintext...
I don't want to make a holy war. I just want to know if there is such benchmark? Or maybe you can say something about this thread from your experience?
...
what would be the efficient way of saving the following array using php (cakephp)?
each value needs to go into a new row in the table?
Array
(
[0] => 6786754654
[1] => 5643564545
[2] => 344544545
[3] => 233245654654
[4] => 453454654654
[5] => 6546542323
[6] => 654654654
[7] => 645654654
etc....
)
t...
To get "," instead of "." as a decimal point, I set the locale via setlocale("de_DE");.
When I now transform an XSLT stylesheet that contains a calculation like:
<xsl:variable name="a">
<xsl:choose>
<xsl:when test="$someboolean">
<xsl:value-of select="0.5"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-...
how would you turn this array:
Array
(
[0] => 234234234
[1] => 657567567
[2] => 234234234
[3] => 5674332
)
into this:
Array
(
[contacts] => Array(
[0] => Array
(
[number] => 234234234
[contact_status] => 2
...
Quick question about general MVC design principle in PHP, using CodeIgniter or Kohana (I'm actually using Kohana).
I'm new to MVC and don't want to get this wrong... so I'm wondering if i have tables:
categories, pages, notes
I create a separate controller and view for each one...? So people can go to
/category/#
/page/#
/note/#
...
Hi,
I've run into a problem whilst converting some C code to PHP, specifically in the use of the right-shift operator.
edit: in the following examples, bit = 0;
Original C code:
p->param->outBits[bytePtr++] |= codeword >> (9 + bit);
PHP code:
$outBits[$bytePtr++] |= $codeword >> (9 + $bit);
If I start with codeword being 130728,...
Hey,
I'm trying to get the current Joomla username. I was able to get it by using
$user =& JFactory::getUser();
echo $user->username;
But now I've installed Joomla on my local server and it doesn't work anymore. The usernames are correctly stored in the database, but the code just doesn't work anymore. Any ideas?
Thanks
...
I'm new to PHP. I am familiar with ASP.NET which support asynchronous programming. That is, if one request needs to do some I/O job. It is suggested to program the web page with BeginProcess/EndProcess way. The asynchronous programming is key to improve scalability.
I'm wondering whether there is counterpart of asynchronous programming(...
Hello,
currently i have :
$page = basename($_SERVER['REQUEST_URI']);
<li<?php if($page == 'index.php?page=product') print ' id="current"'; ?>><a href="index.php?page=product">Products</a></li>
but however when url is something like index.php?page=product&item=100
the class 'id=current' doesn't apply.
any workaround?
thank you fo...