Jump to content

mweldan

Members
  • Posts

    36
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

mweldan's Achievements

Newbie

Newbie (1/5)

1

Reputation

  1. Hi james how do we know what inside $formproc. Post the class codes here. thanks
  2. try to check file or folder permission.
  3. I would recommend leave column id for primary key and treat column customer_number to store customer number. Add unique key so it must be unique. It would be lovely if you can show anything you have done so we can see further this issue. Thanks
  4. assuming table named tl_formdata_details is where you will pull data from.. you can put emails in an array , and firstnames in another array. then you can form another array with required formatting. <?php $fnames = array('user1', 'user2', 'user3'); $emails = array('user1@email.tld', 'user2@email.tld', 'user3@email.tld'); $result = array(); for($i=0;$i<count($fnames);$i++) { $result[] = array( 'EMAIL' => $emails[$i], 'FNAME' => $fnames[$i], 'LNAME' => 'CHIMP '.$i); } echo '<pre>'; print_r($result); echo '</pre>'; ?> there must be another way to achieve this. just some idea..
  5. First error message says it all: Warning: require_once() [function.require-once]: open_basedir restriction in effect. File(C:\/httpdocs/smarty/libs/Smarty.class.php) is not within the allowed path(s): (C:/Inetpub/vhosts/liberty.pk\;C:\Windows\Temp\) inC:\Inetpub\vhosts\liberty.pk\httpdocs\include\config.php on line 29 update your open_basedir setting in php.ini to allow these path: C:/Inetpub/vhosts/liberty.pk\;C:\Windows\Temp\
  6. i have some idea to let you start. 1. when the user logged in, you can set their status (admin?/user?/staff?) in session 2. by their status you can redirect them to their respective page. first of all, before these 2 things you would want to do, you might need to alter your database or table structure. it must at least store user status to database, so you can use it to check.
  7. I would say what you try to explain is quite detailed, but still not sufficient to let others help you. for example: 1. it would helpful if you can provide error message you get 2. it would helpful if you explain each item that does not work according to you, as far i can see there are: 1. extras /> on page #1 , which is a questionable content 2. i can see short open and close tag on page #2 <?=$item?> , check your php.ini setting , it looks like php treat it as html. since you run a non profit, is there any way to contribute in my free time? if there is anything i can do without leaving this desk i can help you. i use php and mysql for my day job.
  8. I have created one for the sake of learning. it is not completed but enough to show you how to start. https://github.com/weldan/karipap/blob/master/karipap.class.php
  9. last row order by ascending or descending? // why not try something like this? select DatePosted from blog order by id desc limit 1;
  10. there must be a documentation about it somewhere? otherwise how do you know what query to send to server?
  11. So I think what I want is actually ORM. This is what I want to do: 1. create a class to simplify usage of PDO, have some functions to make it easy to query database 2. extend that class in a class that specifically uses for objects or tables. as far i understand similar to what model in mvc structure (sorry because this is the only one i familiar with) Thank you for your answer.
  12. The root of what I am trying to do is to understand what DAO is and how to implement that in PHP. take a look at this: http://blog.chrisdlangton.com/index.php?article=50 how this different than this: https://github.com/j4mie/idiorm Thank you for your answer
  13. So interface it not required at all? Ok will remove it. Thanks I actually want to know about DAO, so I try to create one. It seems I have gotten far out from what I want to achieve. I did some google search about it and found someone else try to achieve same thing and name it as ORM (object relational mapper) . In your opinion, is it what I try to do now can be called as ORM? (or poor version of ORM?. Hehe ) And if can, I need examples for DAO in PHP if any. Thanks for your answer.
  14. I want to simplify create,retrieve,update,delete process using pdo the class later can be extend to provide methods for specific object similar to model concept on common mvc web frameworks. eg: User, Item I have no idea if I get lost on understanding this pattern. Is what I am doing is on right track?
  15. Hi, Please see this: https://github.com/weldan/karipap/blob/master/karipap.class.php I am trying to create data access object, but somehow confused between data access object and abstraction layer . can someone explain about it? thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.