Hi, I was wondering how you find it most easy to setup your controllers. Do you use one controller pr. sub-section of your site (ie. “Friends”, “Inbox”, “My account” etc.), or do you just use one controller that keeps all of the sub-sections?
...
Hello, I am still trying to update my sql query more dynamically but finding it difficult since im new to both PHP and jquery.
I have one main page (pagination.php) that looks like this:
<?php
function generate_pagination($sql) {
include_once('config.php');
$per_page = 3;
//Calculating no of pages
$result = mysql_query($sql)...
I heard that in PHP there are some alternatives for the functions substr() and strlen() which handles safer bits. Is this true and if it is then what are those functions? I heard that it is based on the function strcmp() but I don't see directly how can I use it.
...
How to only get items that are not on auction, but can be bought now?
...
I'm creating Excel files in a PHP project. Those files aren't just CSV data... They are multiple tabs spreadsheets with functions and formatting.
So far I'm using the Spreadsheet_Excel_Writer class that is provided with Pear.
Everything is fine but our users don't like 2 things:
When they open those files generated by PHP, modify the...
Hi,
I'm going to develop a facebook game similar to chess board but not a chess game.
2 users will play against each other.
User movements are not necessary to store.
I'll use ajax/jquery for front end (NO flash)
PHP for backend and MySQL for storage.
I know it's a good practice to use framework but I'm afraid it'll become bottle neck...
As you know, Zend Framework (v1.10) uses routing based on slash separated params, ex.
[server]/controllerName/actionName/param1/value1/param2/value2/
Queston is: How to force Zend Framework, to retrive action and controller name using standard PHP query string, in this case:
[server]?controller=controllerName&action=actionName¶m...
Hi, I'm looking for a decent regex to match a URL (a full URL with scheme, domain, path etc.)
I would normally use filter_var but I can't in this case as I have to support PHP<5.2!
I've searched the web but can't find anything that I'm confident will be fool-proof, and all I can find on SO is people saying to use filter_var.
Does anybo...
Hey guys, I am trying to figure out which is most appropriate. From the articles I have read, it seems best to end url's with a trailing slash.
So instead of:
http://www.site.com/article
It would read:
http://www.site.com/article/
First I adjusted my htaccess to force a trailing slash.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCo...
Some pages are showing the phpinfo() output (in HTML so not php -i) even though there is no call to phpinfo() in that page.
The pages include a number of files, but i have grep'd the whole directory from base but cannot find any instance of phpinfo() or "phpinfo" etc.
I've also looked at all "shell", "exec" and "eval" that could gener...
I am a PHP developer however I'm looking widen my skill set. Can anyone recommend some good resources? (Online would be awesome but not necessary :) )
What are the biggest differences?
Any help is appreciated.
...
Every time in PHP when I make a variable such as this one:
$date = strtotime($row['date']);
$date = date("M d Y \a\\t g:i A", $date); // Mmm dd YYYY at h:mm PM/AM
and somehow row['date'] happens to be 0, the date Dec 31 1969 at 7:00 PM is displayed on the screen? Google does not tell me much, I was wondering if this date had any signi...
I have a mysqli_query statement like so:
$result = mysqli_query($connection,$query)
I am wondering: If I call mysqli_query multiple times during the execution of a script, does it use the same connection to the db? Or is a new connection established each time?
Thanks,
...
hey guys
i wonder, how i can remove all certain cookies after (e.g. : 10 minutes) inactivity .
im working on securing a php project and one of the steps are this
i should remove administration cookies and session saved in mysql after certain amount inactivity time in php/mysql project
is there any suggestion !?
...
I am connecting through Windows Authentication. I have two webservers on local system.
IIS 6.0 on port 80, Apache 80:80; I have created a DSN and connected. I have written simple ASP/VBS Script and connected with this DSN.
I've tried to use this DSN using odbc_connect in PHP and it failed. I then tried the connection as outlined he...
I am trying to write a PHP script that uses the pdftk app to merge an XFDF with a PDF form and output the merged PDF to the user. According to the pdftk documentation, I can pass the form data in via stdin and have the PDF output to the stdout stream. The normal, file-not-stream way to use pdftk from the command line is:
pdftk blankform...
This is a longshot but I have a file with something like this:
document structure:
/some/path/start.php
<?php
require_once '../../another/path/test.php';
?>
and
/another/path/test.php
/another/path/images/
<?php
test.php
hello<img src='images/1.jpg'>
?>
I'm looking for a way for the required file (test.php) to correctly load th...
How would you best get all the input fields (text, radiobutton, checkbox, select etc) semi-automatically out of dodgy formatted html documents?
Trying to get the TYPE,NAME,VALUE and OPTION for SELECT.
I am currently using Xpath (in PHP) because everyone here says 'use that instead' but I'm getting nowhere with it. So I am open to sugge...
In my tennis application, my 'match' table has two players (obviously). I've used player1_id and player2_id as a way to track the user ids. I haven't included a user_id foreign key though.
There is also a 'user' table where I want to pull player's names from.
Because 'match' has more than one user and users have more than one model, ...
Hey folks,
CodeIgniter is brilliant but I'm using it to develop a site where users need to be able to share their code for websites. Unfortunately, CodeIgniter has been doing the "right" thing by removing <script> tags from my user's inputs into the database, so when it's returned data looks like this:
[removed] User's data [removed]
...