Search found 20 matches

by hmvrulz
Fri Oct 24, 2008 7:24 am
Forum: PHP - Code
Topic: Fatal error: Cannot use object of type reg_validate as array
Replies: 1
Views: 131

Fatal error: Cannot use object of type reg_validate as array

my Class   class reg_validate extends validate {     public $errors = array();       function __construct($input)     {         $this->errors['username'] = $this->username($input['username']);         $this->errors['password'] = $this->password($input['password1'], $input['password2']);         $th...
by hmvrulz
Thu Oct 23, 2008 1:42 pm
Forum: PHP - Code
Topic: Redirecting
Replies: 1
Views: 135

Redirecting

Is there any way to SHOW A MESSAGE by ECHO and then use HEADER function to redirect the user to a diff page
by hmvrulz
Thu Oct 23, 2008 7:24 am
Forum: PHP - Code
Topic: PHP forum value
Replies: 0
Views: 194

PHP forum value

Values in the text filed <br /> <b>Notice</b>:  Undefined index:  fname in <b>C:\Program Files\wamp\www\fw\views\users\registration.html</b> on line <b>4</b><br /> heres the form registration.html   <form action="./register/" method="post" name="registration">   <div>Fi...
by hmvrulz
Tue Oct 21, 2008 2:38 am
Forum: PHP - Code
Topic: Validate
Replies: 0
Views: 112

Validate

class validate {       // Function to Sanatize the User Input     function sanitize($input)     {         // Checks if the Input is an Array         if (is_array($input)) {             // Each layer of an array is Sanatized independently             foreach ($input as $var => $val) {               ...
by hmvrulz
Sun Oct 19, 2008 4:10 am
Forum: PHP - Code
Topic: Class Variable Scope
Replies: 1
Views: 147

Class Variable Scope

  <?php   /**  *  * @project Framework  *  * @author Harsha M V  * @copyright 2008  *  */   //print_r($scriptName);     class url_interpreter {         public $id;         public $module;         public $action;         public $mobile;         public $path;           function __constructor()       ...
by hmvrulz
Sun Oct 19, 2008 3:25 am
Forum: PHP - Code
Topic: MySQL database
Replies: 1
Views: 146

MySQL database

I have created a class to handle my mysql stuff... Can some one Tell me how i can include methods for INSERTING , UPDATE, SELET, DELETE in to this If am taking keys..values as an array...   <?php       class dbHandler {                   // Defining CONNECTION Parameters                 const HOST =...
by hmvrulz
Fri Oct 17, 2008 4:53 am
Forum: PHP - Code
Topic: Clean URLS for web n wap interfaces
Replies: 6
Views: 282

Re: Clean URLS for web n wap interfaces

But am using my own MVC framework... basically if its mobile site i wil only have a different view.... to make it compatible with the mobile devices
by hmvrulz
Fri Oct 17, 2008 4:10 am
Forum: PHP - Code
Topic: Clean URLS for web n wap interfaces
Replies: 6
Views: 282

Re: Clean URLS for web n wap interfaces

no... am asking how to frame my urls... logical help not php


problem is incase there is no ID

it wil become

site.com/modules/action/mobile
for wap


then its waste of resources to check each time if its a id or mobile
by hmvrulz
Fri Oct 17, 2008 3:59 am
Forum: PHP - Code
Topic: Clean URLS for web n wap interfaces
Replies: 6
Views: 282

Clean URLS for web n wap interfaces

Can some one help me in deciding the best way to code clean urls for web as well as wap


WEB

site.com/modules/action/id (if needed)

WAP

site.com/modules/action/id/mobile
by hmvrulz
Thu Oct 16, 2008 5:46 am
Forum: PHP - Code
Topic: MVC Routing Explaination needed
Replies: 0
Views: 165

MVC Routing Explaination needed

Below is an example of MVC - routing from PHPIT.com   The Router class   Our Router class will have to analyze the request, and then load the correct command. First step is to create a basic skeleton for the router class: <?php   Class Router {         private $registry; private $path;         priva...
by hmvrulz
Thu Oct 16, 2008 2:44 am
Forum: PHP - Code
Topic: Need a sinple Database handler class
Replies: 1
Views: 116

Need a sinple Database handler class

Can some one provide a database handler class that can
Connect to db
query
select table
result in an array
give number of rows
disconnect
by hmvrulz
Wed Oct 08, 2008 8:31 am
Forum: PHP - Code
Topic: Date YYYY-MM-DD
Replies: 6
Views: 645

Re: Date YYYY-MM-DD

Code: Select all

 
<?php
 
  $isodate = sprintf("%04d-%02d-%02d", $year, $month, $day);
 
?>
 
 
tht works
by hmvrulz
Wed Oct 08, 2008 7:51 am
Forum: PHP - Code
Topic: Date YYYY-MM-DD
Replies: 6
Views: 645

Re: Date YYYY-MM-DD

for selecting date i use drop down menus.. for creating that i use php... so the value of March wil be 3 and not 03...
so how do i convert it to 03 n then deliver it to the DB
by hmvrulz
Wed Oct 08, 2008 7:32 am
Forum: PHP - Code
Topic: Date YYYY-MM-DD
Replies: 6
Views: 645

Date YYYY-MM-DD

I created a forum for entering birthday using php. So i get day n month as

1,2,3,4,.... and not with the leading 'ZERO'

Am storing the DATE as YYYY-MM-DD
by hmvrulz
Wed Oct 08, 2008 5:36 am
Forum: PHP - Code
Topic: Age from Birthday
Replies: 6
Views: 401

Re: Age from Birthday

jmut wrote:Remove date_default_timezone_set() call and try. It's just there cause it's strict warning.
Well, is India special when it comes to dates/calendar?
No its usually +5.5 difference