I'm perplexed by this. I have a login action that looks like this:
public function loginAction()
{
$form = new Application_Form_Login;
$form->setAction("/users/login");
$request = $this->getRequest();
var_dump($request->isPost());
if ($request->isPost() && $form->isValid($request->getPost())) {
// snipped c...
Hi,
Is there a way to make .htaccess tell a folder to act as the lowest level? What I mean is this, say you have a folder like so:
/about/
/contact/
/css/
/images/
.htaccess
index.php
header.php
If they are at /contact/index.php, then if I have <a href="../index.php">Home</a> to go to the home page, it works all fine, but if they a...
The title says it all but I want to be able to specify the location in both where to scan and where the converted file will go.
It's just there is a lot of conversions and I've got a script which should sort it for me.
Currently I've tried
convert -resize 300x300 > /media/usbdisk1/development/ephoto/richard/images/gallery/2007/29/norm...
I have two preexisting variables:
$side (which is either F or B)
and
$plate (which is a 3 digit number)
I am trying to build two arrays called
$sidecountF
and
$sidecountB
using the following code:
$sidecount{$side}[$plate] = 1;
assuming $side is F and $plate is 200, I'm hoping that the end result is that
$sidecountF[200] = 1;
...
Hi there,
I'm working on a file based commenting system with in-line comments (only 1 level).
Despite being a newby I've managed to create a system in which users are able to add new comments and use @[NUMBER] to add their reply below another comment.
My file and folder structure looks like this:
/threads/
1/
1.tx...
Not sure how to properly go about doing this.
I have my users table with about 500,000 already existing rows.
I'm creating a playlist feature for my music community, so I have a table called playlists. I'd like to give each of the 500,00 users a default playlist called Favorites.
What is the best way to do this?
Should I call th...
I'm trying to parse this using PHP and simplexml_load_file but its not showing anything?
http://developer.multimap.com/API/geocode/1.2/OA10081917657704697?qs=Heaton&countryCode=GB
Where am I going wrong? Thanks
$results = simplexml_load_file($url);
foreach($results->Location() as $location) {
foreach($location->Address() as $add...
Hello all,
I have a string with some codes (ex:«USER_ID#USERNAME#STATUS») for replacement like in this example:
Hello «USER_ID#USERNAME#STATUS», do you like «PROD_ID#PRODNAME#STATUS»?
I need to find a way to get all the codes for future replacement.
I can easily find one code with this regex:
/«(.*)#(.*)#(.*)»/
but can't f...
I'm writing an E-Mail parser. I noticed that I received some emails that state their charset is UTF-4.
However, when trying to convert these with iconv to UTF-8 it fails.
Now my question is: I've never ever heard of UTF-4. Is this even a valid charset? And if not - can I just treat it as UTF-8?
Here is part of the mail header:
["mime...
Well this is a simple design question i've wondered about many times and never found a satisfying solution. My example is with php-sql, but this certainly applies to other languages too.
I have a small database table containing only very few entries, and that almost never needs updating. eg this usertype table:
usertype_id (primary k...
I have an e-commerce package called Prestashop.
They allow you to sell virtual products, downloadable items, such as software, e-books, etc.
They have a problem in their software where they name the physical filename of the downloadable product as a 40-char hash with no extension. Then when a customer goes to download the file, the syst...
I am working on an intranet application that uses PHP and jQuery. When a user submits a form, the form is passed to another script via AJAX.
On one such form the user supplies a Windows UNC path to a server on the network. The handler script needs to create the directory the user specifies so that files can be moved via another process....
I am using DOMDocument to manipulate / modify HTML before it gets output to the page. This is only a html fragment, not a complete page. My initial problem was that all french character got messed up, which I was able to correct after some trial-and-error. Now, it seems only one problem remains : ' character gets transformed into ? .
Th...
I have a PHP application that uses the ODBC functions for database access. My DBA recently discovered that the application is not closings its database connections, resulting in numerous invalid connections that are in a TIME_WAIT state.
We have checked the code and I am doing an odbc_close_all call in every script, plus even if I wasn...
I am using CakePHP and want to pass the author's name (stored in a session) to an article that is being saved to the database. Is a hidden field the only way to do this or is there a better way?
...
I am looking into creating something similar to a form template system on my web site.
As an example, say I want the users to be able to create form templates (similar to Wufoo, they can define any number of inputs, etc). Then from these created templates, anybody would be able to use these templates, fill them out, and therefore creat...
I only want the first and the second last Area nodes - how would I do that here?
$url = "http://developer.multimap.com/API/geocode/1.2/OA10081917657704697?qs=Byker&countryCode=GB";
$results = simplexml_load_file($url);
foreach($results->Location as $location) {
echo "<hr />";
foreach($location->Address as ...
I might be missing something here, I'm not sure. A Google search didn't really help either.
What I'm wanting to do is call the databaseServer class and use its methods within my userControl class. Here is my lib_class.php file:
<?php
include('definitions.php');
class databaseServer {
var $con;
var $db;
var $close;
va...
Variable variables seem pretty cool, but I can't think of a scenario where one would actually use them in a production environment. Have you done so? How did you use them?
...
I have made a personality test. It is a set of multiple choice questions that when the user submits, gives a personality description as output.
The test questions are placed in a Joomla "Article", so the owners of the test can easily change them, and the output is then via the form handle passed to an external php script. Like this:
<f...