Date and time input
How can I show a date popup box that formats the date so it will fit in the mySQL date field? Also, how can I check or format time to fit in the mySQL time field? ...
How can I show a date popup box that formats the date so it will fit in the mySQL date field? Also, how can I check or format time to fit in the mySQL time field? ...
I am developing a Digg like site and I want the title of the comments page to match the link title, here its the comments file code: class CommentsPage extends Page { function __construct($title = '') { $this->setTitle($title); } function header() { parent::header(); } function showAllComme...
Wondering how much effort I should go to forcing useful debugging information when creating exception messages, or should I just trust the user to supply the right info, or defer the information gathering to an exception handler? I see a lot of people people doing their exceptions like: throw new RuntimeException('MyObject is not an ar...
I need a regex or function that can remove the ENCODED HTML tags from a database record. I have text in a database that is being stored (from TinyMCE) as encoded HTML. The code has the 'less than'; and 'greater than'; tags encoded. I would like to remove all the encoded tags and HTML and just leave the plain text and spaces only. ...
Hi, I'm trying to parse a bunch of webpages one after the next with PHP, but I noticed that when I fopen the first page, the links to the following pages are hidden in javascript. Is there anyway I can continue on to parse the next webpages? If the url had a variable like "page=2" encrypted into it I would go through them that way, bu...
I have this class for page titles: class UI { private static $title; public static function getTitle() { return self::$title; } public static function setTitle($value) { self::$title = $value; } } So in my frontpage I simple declare this: UI::setTitle('Kiubbo.com :: Todas las Noticias, Fotos y Videos'); And works ...
So the situation is a bit complicated. There was one graduate student who was developing this web application by himself using Flex and JSP. He moved on with his career and took a job somewhere else. He still has access to the application and frequently maintains it. Along with couple other students and I took over the project the grad ...
I'm ultimately trying to install PEAR so I can easily install PHPUnit. I want to set up a Mac, Apache, MySQL, PHP, PHPUnit development environment so I can test locally. I already have Apach, MySQL and PHP working. Now all I need is PHPUnit, which means I need PEAR to install it. I have searched all over, and there are a few variations ...
I am having trouble installing PEAR, but I really only want to install PHPUnit. Does anyone have experience doing this? ...
RewriteCond %{HTTP_HOST} ^[a-z]+.orbno.com$ RewriteCond %{HTTP_HOST} !^(www.)?orbno.com$ RewriteCond %{REQUEST_URI} download/ RewriteRule (.*) /download.php\?action=$1&user=%1 [L] Two small issues, this is the output: array(2) { ["action"]=> string(23) "download/email-logo.png" ["user"]=> string(0) "" } I want the user to...
Hi all! I have a PHP page that has 1 textbox and when I press on the submit button. My SQL is going to store this product name into my database. My question is; is it possible to send/post the product name using Python script that asks for 1 value and then use my PHP page to send it to my database? Thanks! ...
I have the following code snippet to delete records from a database given a primary key. This is called via an AJAY request, through GET. Anyone who were to examine my javascript could work out the URL and delete arbitrary records. What can I do to prevent this? Not use GET? Use sessions? if($cmd=="deleterec") { $deleteQuery = "DE...
I have been using PHP for years. Lately I've come across numerous forum posts stating that PHP is outdated, that modern programming languages are easier, more secure, etc. etc. So, I decided to start learning Python. Since I'm used to using PHP, I just started building pages by uploading an .htaccess file with: addtype text/html py add...
I'm currently using a PHPBB2 forum for a section of one of my sites, and I would like to extend this site (add new pages, scripts, etc). I would like to restrict access to these pages to the users already logged in the PHPBB2 Forum. In fact, if only members of a certain MemberGroup could access these pages, that would be great. Is th...
I'm looking for a bullet proof way to extract domain (with tld) from any given link - an eqivalent of dirname($path) let's call it domainname($link). echo domainname("http://example.com/index.html?a=123%1231"); should print "example.com" ...
What are some of your can't-live-without php libraries? Any kind, collections, templates, anything that makes your life easier when working with php. ...
I am looking to move an existing WordPress installation to a custom platform comprised of a .net based blog as well as other new functionality/modules on the site running under IIS6/Win2k3. There are several thousand posts in the existing WordPress site that have been migrated to the new database structure, however, I'd like to preserve...
Hello, how should I clean up a string which contains invalid characters and would break html after printing it in textarea? PHP's ord() returns 0 for the said character, but I suspect it's not null, which I don't think it matters anyway. When string is displayed in textarea all text after the invalid character would disappear as well ...
We are developing a huge website, it will get lots of traffic, right now we are analyzing our options and Smarty looks nice but i have seen lots of flames about this, some love it some hate it. What do you think? Any real life experience with Smarty? If you hate it please write the reasons, same thing if you love it. ;) Advice about al...
Please help me to implement Factory design pattern for the task. I working on scheduled message sending web application. User can specify his own scheduled sending plan, and messages will be delivered when it have to. User can choose only one of 3 reccuring types: monthly, weekly, daily. For this 3 reccuring types algorithm is similar: ...