Search found 33 matches
- Wed Mar 09, 2011 6:28 pm
- Forum: PHP - Code
- Topic: How to create a simple address search?
- Replies: 3
- Views: 220
Re: How to create a simple address search?
Hint: mysql_connect("localhost", "mysql_user", "mysql_password") or die("Could not connect: " . mysql_error()); mysql_select_db("mydb"); if (isset($_POST['zipcode']){ $sql = "SELECT name,zip,address FROM table WHERE zip='".mysql_real_escape...
- Tue Mar 08, 2011 4:44 pm
- Forum: PHP - Code
- Topic: keep user input in form after a submit
- Replies: 4
- Views: 597
Re: keep user input in form after a submit
use
in each filed.
Code: Select all
<input ... value="<?php isset($_POST['thepostname']) ? $_POST['thepostname'] : 'yes/no/whatever default value'?>" ... />- Tue Mar 08, 2011 4:41 pm
- Forum: PHP - Code
- Topic: Quick and Easy question.
- Replies: 2
- Views: 196
Re: Quick and Easy question.
(line 7) @file_put_contents(''c' .$filename', $hit_count); // adds 1 count to "cfilename.txt"
You have double single quotes in the start and wrong quote in end of filename.
Should be:
You have double single quotes in the start and wrong quote in end of filename.
Should be:
Code: Select all
@file_put_contents('c'.$filename, $hit_count); // adds 1 count to "cfilename.txt"- Mon Mar 07, 2011 2:19 am
- Forum: PHP - Code
- Topic: why does one work, but the other doesn't?
- Replies: 2
- Views: 195
Re: why does one work, but the other doesn't?
You must escape the string. Eg. 'Test post var: '.$_POST['var'].' , yup thats the value.': In ur case "select .... where blah ='".$_POST['test']."' OR ..."; Single quotes is faster because php will not look for variables and does not need to parse the string before assigning it t...
- Sun Feb 20, 2011 4:18 pm
- Forum: PHP - Code
- Topic: XML Help
- Replies: 1
- Views: 139
Re: XML Help
should be:
$xml->data[0]->METAR->temp_c
do print_r($xml);
$xml->data[0]->METAR->temp_c
do print_r($xml);
- Fri Feb 04, 2011 1:02 am
- Forum: PHP - Code
- Topic: General PHP Variables Across Mutiple Pages
- Replies: 6
- Views: 2540
Re: General PHP Variables Across Mutiple Pages
Writing directly to a file decreases performance because it writes to the hard drive, and hard drives is slow because the mechanic arm and mechanical rotating discs inside the HDD. Using MySQL you can read/write directly to the memory . i.e. it's faster. Facebook makes use of cache and tons of optim...
- Thu Feb 03, 2011 9:09 pm
- Forum: PHP - Frameworks
- Topic: Framework Suggestion
- Replies: 9
- Views: 6806
Re: Framework Suggestion
At that specter I would not use Codeigniter, but rather use Zend Framework.
- Thu Feb 03, 2011 8:12 pm
- Forum: Coding Critique
- Topic: Form generation in PeecFW - critique
- Replies: 5
- Views: 7429
Re: Form generation in PeecFW - critique
I see what you mean. You are right, so I sat this whole day and implemented the new changes, it made me rewrite the whole API :roll: What I have done is that i have created a class for each field. fields implements a field interface and extends an abstract. Now it's totally customizable (in my eyes)...
- Thu Feb 03, 2011 9:50 am
- Forum: PHP - Code
- Topic: Access MySQL database problem!
- Replies: 10
- Views: 461
Re: Access MySQL database problem!
Have you forgotten to select database ?
Code: Select all
mysql_select_db("database", $link);
- Thu Feb 03, 2011 7:45 am
- Forum: Coding Critique
- Topic: Form generation in PeecFW - critique
- Replies: 5
- Views: 7429
Re: Form generation in PeecFW - critique
Thanks for feedback. The form API got created in 2 days, so there are still room for changes and addons. How do you deal with form layout customization? Right now it's possible to override the css file in the themes (like any other core frontened files). Css file looks like this. http://peecfw.org/A...
- Tue Feb 01, 2011 9:08 pm
- Forum: Coding Critique
- Topic: Form generation in PeecFW - critique
- Replies: 5
- Views: 7429
Form generation in PeecFW - critique
Can I get some feedback for PeecFW's new form generation API? 
Wiki page with example of use and output:
http://code.google.com/p/peecfw/wiki/Forms
Any suggestions, related to the API?
Wiki page with example of use and output:
http://code.google.com/p/peecfw/wiki/Forms
Any suggestions, related to the API?
- Fri Jan 28, 2011 6:58 pm
- Forum: PHP - Theory and Design
- Topic: PHP suggestion/rant
- Replies: 58
- Views: 22986
Re: PHP suggestion/rant
It will be far better web applications around the globe, no software that has buggy features. Usually my bugs are logic errors. I can't remember the last time I actually had a bug because I thought something was the wrong data type? lol.. You can pass the wrong data type in either type of language ...
- Fri Jan 28, 2011 7:02 am
- Forum: PHP - Code
- Topic: Allowing quotes in preg_replace, please help
- Replies: 2
- Views: 173
Re: Allowing quotes in preg_replace, please help
escape them.
like so
\" \'
like so
\" \'
- Thu Jan 27, 2011 2:14 pm
- Forum: PHP - Theory and Design
- Topic: PHP suggestion/rant
- Replies: 58
- Views: 22986
Re: PHP suggestion/rant
I support making PeecFW more like Java, but keep the simplicity of installing it. Also make PHP go away from dynamically typed language.
It will be far better web applications around the globe, no software that has buggy features.
It will be far better web applications around the globe, no software that has buggy features.
- Thu Jan 27, 2011 12:01 pm
- Forum: Volunteer Work
- Topic: PeecFW - PHP 5.3+ CMS / Framework - need devs. Opensource.
- Replies: 3
- Views: 4821
Re: PeecFW - PHP 5.3+ CMS / Framework - need devs. Opensourc
Good day, late response, did totally forget about this thread. You are correct. Controller logic is found both in the framework and in the Module. See more information about the MAT Concept here: http://code.google.com/p/peecfw/wiki/MAT Some benefits: - Easier structure of files / folders - Controll...