php-general Digest 5 Aug 2009 10:47:47 -0000 Issue 6268

2009-08-05 Thread php-general-digest-help
php-general Digest 5 Aug 2009 10:47:47 - Issue 6268 Topics (messages 296306 through 296317): Re: Need quick got written up yesterday!! OUCH (RESOLVED) 296306 by: HallMarc Websites 296307 by: Paul M Foster 296308 by: Govinda 296309 by: Eric Butera

Re: [PHP] Warning: OutsourcingRoom.com

2009-08-05 Thread Ashley Sheridan
On Tue, 2009-08-04 at 20:49 -0700, Steve wrote: Daniel Brown wrote: Just as a heads-up, in case you guys weren't yet aware (cross-posting): Elance.com was the victim of an SQL injection attack earlier this summer (they apparently missed our billions of threads on sanity).

Re: [PHP] Compare PHP settings of two different servers

2009-08-05 Thread Robert Cummings
Dave M G wrote: Bob, Ben, David, Robert, Thank you all for responding. Just to recap, I'm trying to find out why I can write text into a PNG image on one server, but not on another. After much playing around, I have a list of the different configuration modules installed on the two servers.

[PHP] Character encoding

2009-08-05 Thread HostWare Kft.
Hi, I have a mysql database, which the users can insert comments. As the users can be from different countries, with different character encoding, the mysql table can contain various special characters. How can I be sure to display these comments properly? I've found the mb_convert_encoding,

[PHP] Re: PHP programming strategy

2009-08-05 Thread Clancy
Thank you to all of you who have commented on this query. On the subject of comments, I feel that Larry Garfield settled this query by pointing out that halving the size of a particular document gave a barely noticeable increase in speed. Paul Foster pointed out the problem of maintenance, but

Re: [PHP] Re: PHP programming strategy

2009-08-05 Thread Ashley Sheridan
On Wed, 2009-08-05 at 21:49 +1000, Clancy wrote: Thank you to all of you who have commented on this query. On the subject of comments, I feel that Larry Garfield settled this query by pointing out that halving the size of a particular document gave a barely noticeable increase in speed.

Re: [PHP] Re: PHP programming strategy

2009-08-05 Thread Bastien Koert
On Wed, Aug 5, 2009 at 8:02 AM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Wed, 2009-08-05 at 21:49 +1000, Clancy wrote: Thank you to all of you who have commented on this query. On the subject of comments, I feel that Larry Garfield settled this query by pointing out that halving

Re: [PHP] Warning: OutsourcingRoom.com

2009-08-05 Thread Eric Butera
On Wed, Aug 5, 2009 at 3:06 AM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Tue, 2009-08-04 at 20:49 -0700, Steve wrote: Daniel Brown wrote:     Just as a heads-up, in case you guys weren't yet aware (cross-posting):     Elance.com was the victim of an SQL injection attack earlier

Re: [PHP] Warning: OutsourcingRoom.com

2009-08-05 Thread Ashley Sheridan
On Wed, 2009-08-05 at 09:54 -0400, Eric Butera wrote: On Wed, Aug 5, 2009 at 3:06 AM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Tue, 2009-08-04 at 20:49 -0700, Steve wrote: Daniel Brown wrote: Just as a heads-up, in case you guys weren't yet aware (cross-posting):

Re: [PHP] Warning: OutsourcingRoom.com

2009-08-05 Thread Martin Scotta
Nobody can actually do anything. This happen all the time. Sites like facebook or myspace send invitations to all your mail's contacts, but that's not the problem. What I can't understand is why do they do pre-signup just you for the easy of you. I have _created_ an account just to edit my

Re: [PHP] Warning: OutsourcingRoom.com

2009-08-05 Thread Ashley Sheridan
On Wed, 2009-08-05 at 11:10 -0300, Martin Scotta wrote: Nobody can actually do anything. This happen all the time. Sites like facebook or myspace send invitations to all your mail's contacts, but that's not the problem. What I can't understand is why do they do pre-signup just you for the

Re: [PHP] Warning: OutsourcingRoom.com

2009-08-05 Thread Ashley Sheridan
On Wed, 2009-08-05 at 15:14 +0100, Ashley Sheridan wrote: On Wed, 2009-08-05 at 11:10 -0300, Martin Scotta wrote: Nobody can actually do anything. This happen all the time. Sites like facebook or myspace send invitations to all your mail's contacts, but that's not the problem. What I

Re: [PHP] Warning: OutsourcingRoom.com

2009-08-05 Thread Martin Scotta
What we can do is make a Report Web Forgery for this site. If you use Firefox there is an option in the help menu. Also you can report to search engines like Google or Yahoo (that's what I did) well... in this thread we are doing something On Wed, Aug 5, 2009 at 11:14 AM, Ashley

[PHP] OUCH (RESOLVED)

2009-08-05 Thread Miller, Terion
Thank you all for being so brutally honest, I am doing my best, and yes I do get hung up on syntax errors, I mean who doesn't stare at code looking for a misplaced or missing ; or . For what seems like hours with a boss asking repeatedly is it done, is it done before freaking out and asking

Re: [PHP] OUCH (RESOLVED)

2009-08-05 Thread Govinda
... Peace and Happy Wednesday Terion :-) nice! In the end, I imagine that if it was all taken away suddenly and for good, that we'd all miss the real people here more than any of the rules, logics, and practicalities of getting paid work done.. -- PHP General Mailing List

Re: [PHP] OUCH (RESOLVED)

2009-08-05 Thread Floyd Resler
Terion, I've been sitting in the background watching all this unfold and thought I would chime in. I passed along your all caps email to a co-worker of mine (she programs in FoxPro) and she said she could definitely relate to what you were going through! As for people being honest

Re: [PHP] Script to Compare Database Structures

2009-08-05 Thread Matt Neimeyer
I finally got a chance to play with this and it looks like it is exactly what I need. Thanks! On Fri, Jul 31, 2009 at 11:50 PM, German Geekgeek...@gmail.com wrote: have you tried mysqldiff? I want to be able to compare the structure of two different clients databases that might be on

Re: [PHP] Character encoding

2009-08-05 Thread b
On 08/05/2009 07:05 AM, Sándor Tamás (HostWare Kft.) wrote: Hi, I have a mysql database, which the users can insert comments. As the users can be from different countries, with different character encoding, the mysql table can contain various special characters. How can I be sure to display

Re: [PHP] Character encoding

2009-08-05 Thread Igor Escobar
Build some script to convert to these comments. Check this out: ?php // Fixes the encoding to uf8 function fixEncoding($in_str) { $cur_encoding = mb_detect_encoding($in_str) ; if($cur_encoding == UTF-8 mb_check_encoding($in_str,UTF-8)) return $in_str; else return

[PHP] Re: Character encoding

2009-08-05 Thread Ralph Deffke
I assume that the comments are collected by a browser form provided by you ! do u use the form attribute accept-charset ? I always do and I always use UTF-8 homogeniously throughout my application I never had that problem. Sándor Tamás (HostWare Kft . ) sandorta...@hostware.hu wrote in

[PHP] Re: Character encoding

2009-08-05 Thread Nisse Engström
On Wed, 5 Aug 2009 18:11:44 +0200, Ralph Deffke wrote: I assume that the comments are collected by a browser form provided by you ! do u use the form attribute accept-charset ? I always do and I always use UTF-8 homogeniously throughout my application I never had that problem. Don't forget to

[PHP] navigation include not functioning

2009-08-05 Thread Allen McCabe
I am trying to generate pages by importing content in includes, and using my navigation include to tell PHP to replace a $thisPage variable which all the includes use ?php include('phpincludes/' . $thisPage . '.php') ? The idea behind it (I know tons of people do it, but I'm new to this concept),

Re: [PHP] navigation include not functioning

2009-08-05 Thread Jerry Wilborn
I'm having trouble understanding your description of the problem. Can you tell us what you're seeing and what you expect to see? Jerry Wilborn jerrywilb...@gmail.com On Wed, Aug 5, 2009 at 12:00 PM, Allen McCabe allenmcc...@gmail.com wrote: I am trying to generate pages by importing content

Re: [PHP] navigation include not functioning

2009-08-05 Thread Allen McCabe
Sure. When I load my site, default.php loads ( displaying: http://uplinkdesign.hostzi.com/ in the browser as expected). $thisPage is set to about via: ?php if (!isset($thisPage)) { $thisPage=about; } else { $thisPage = addslashes($_GET['page']); } ? in the head tags. I am seeing this:

Re: [PHP] navigation include not functioning

2009-08-05 Thread Martin Scotta
I think you are looking for something like this: $page = array_key_exists( 'page', $_GET ) ? GET['page'] : 'index'; Then you MUST sanitize the $page variable. I often use the querystring to wrapp the module you are requesting: www.example.org/?path/to/molude (note that .htaccess is required)

Re: [PHP] navigation include not functioning

2009-08-05 Thread ollisso
On Wed, 05 Aug 2009 20:19:00 +0300, Allen McCabe allenmcc...@gmail.com wrote: Sure. When I load my site, default.php loads ( displaying: http://uplinkdesign.hostzi.com/ in the browser as expected). $thisPage is set to about via: ?php if (!isset($thisPage)) { $thisPage=about; } else {

[PHP] Time keeping in DB

2009-08-05 Thread Shawn McKenzie
So, obviously not PHP related, but I'm looking for thoughts on the best way to record time sheets in a DB. A time sheet for hours worked per day, not like a time clock where you start and stop. The two possibilities that I have thought of are (these are simplistic, of course I'll be storing

Re: [PHP] Time keeping in DB

2009-08-05 Thread Ashley Sheridan
On Wed, 2009-08-05 at 14:18 -0500, Shawn McKenzie wrote: So, obviously not PHP related, but I'm looking for thoughts on the best way to record time sheets in a DB. A time sheet for hours worked per day, not like a time clock where you start and stop. The two possibilities that I have

Re: [PHP] Time keeping in DB

2009-08-05 Thread Jerry Wilborn
You don't mention what DB you're using, but mySQL can be quite a pain when dealing with multiple time zones. Not impossible, but a hassle none the less. Be sure to set aside a place to store this (and another spot for user preferences to keep track of their TZ). Jerry Wilborn

Re: [PHP] Time keeping in DB

2009-08-05 Thread Wolf
Shawn McKenzie nos...@mckenzies.net wrote: So, obviously not PHP related, but I'm looking for thoughts on the best way to record time sheets in a DB. A time sheet for hours worked per day, not like a time clock where you start and stop. The two possibilities that I have thought of

[PHP] Re: Time keeping in DB

2009-08-05 Thread Ollisso
On Wed, 05 Aug 2009 22:18:31 +0300, Shawn McKenzie nos...@mckenzies.net wrote: So, obviously not PHP related, but I'm looking for thoughts on the best way to record time sheets in a DB. A time sheet for hours worked per day, not like a time clock where you start and stop. The two

[PHP] Re: Time keeping in DB

2009-08-05 Thread Ralph Deffke
sorry man, but a good data design keeps only data in a table u can not calculate. in ur case that would be only date start and end time. refernces to user and project/tasks in other tables. ur time sheet is definately a job for a report. that type of design limits u to nothing. a user can start

Re: [PHP] navigation include not functioning

2009-08-05 Thread Allen McCabe
Okay, I see how href=?page=contact would work, and I do indeed have only one file (which loads includes), but it still is not working. Clicking a link, be href=?page=contact, href=?page=services, whatever, it still loads the page with the ?page=whatever attached to the URL, but it is not

Re: [PHP] navigation include not functioning

2009-08-05 Thread Martin Scotta
You are using a value-filled array as a key-filled. Try this snippet and look the results... $pages = array('about' , 'services', 'portfolio', 'contact'); $page = array_key_exists( 'page', $_GET ) ? $_GET[ 'page' ] : 'about'; /*if*/ false === array_search( $page, $pages, true ) ( $page =

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Allen McCabe
I just wanted to let know I figured out my last issue (last as in, for now). In my navigation.php include file, I had if ($page = about) echo href I changed it to if ($page == about) echo and it suddenly worked! Imagine that... Thanks all for you help, you are celebrities in my book now.

[PHP] Re: Time keeping in DB

2009-08-05 Thread Ben Dunlap
sorry man, but a good data design keeps only data in a table u can not calculate. in ur case that would be only date start and end time. refernces to user and project/tasks in other tables. ur time sheet is definately a job for a report. that type of design limits u to nothing. a user can

Re: [PHP] dynamically naming PHP vars on the fly?

2009-08-05 Thread Martin Scotta
You can use variable variables ?php $nombre = 'Martin'; $name = 'nombre'; echo $$name; # === Martin You can make more complicated statements with this technique. $var1 = 'apple'; ${ 'Fruit_' . $var1 } = 'organic'; echo $Fruit_apple; // here you are When your statements are complex use the ${

Re: [PHP] dynamically naming PHP vars on the fly?

2009-08-05 Thread Jerry Wilborn
http://us2.php.net/manual/en/language.variables.variable.php Jerry Wilborn jerrywilb...@gmail.com On Wed, Aug 5, 2009 at 5:17 PM, Govinda govinda.webdnat...@gmail.comwrote: HI all One thing I have been working around but now would love to just do it finally (and save workaround/longer code

[PHP] Re: dynamically naming PHP vars on the fly?

2009-08-05 Thread Ralph Deffke
u can dynamical chosse a variable name with a variable using a douple $ charachter eg. $a = this is a: $b = a; echo $$b; outputs this is a this is an all open feature to u have fun ralph Govinda govinda.webdnat...@gmail.com wrote in message

[PHP] Re: Time keeping in DB

2009-08-05 Thread Shawn McKenzie
Ben Dunlap wrote: sorry man, but a good data design keeps only data in a table u can not calculate. in ur case that would be only date start and end time. refernces to user and project/tasks in other tables. ur time sheet is definately a job for a report. that type of design limits u to

[PHP] Re: Time keeping in DB

2009-08-05 Thread Ben Dunlap
OK, I think I understand most points except the start and stop time. Every time sheet I have used, SAP and several other smaller ones, I enter a weeks worth of time data like: Project Sun Mon TuesWed ThurFri Sat

[PHP] Re: Time keeping in DB

2009-08-05 Thread Ralph Deffke
as I said, the job is to store a time sheet. u came up with: 1. One record for each 7 day week (year, week_num, d1, d2, d3, d4, d5, d6, d7) where the dX field holds the hours worked 2. One record for each day (date, hours) it seems that just the first record is fine. in a data design u dont hold

Re: [PHP] Re: PHP programming strategy

2009-08-05 Thread Clancy
On Wed, 5 Aug 2009 09:25:20 -0400, phps...@gmail.com (Bastien Koert) wrote: On Wed, Aug 5, 2009 at 8:02 AM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Wed, 2009-08-05 at 21:49 +1000, Clancy wrote: Thank you to all of you who have commented on this query. On the subject of comments, I

Re: [PHP] dynamically naming PHP vars on the fly?

2009-08-05 Thread Govinda
You can use variable variables ... You can make more complicated statements with this technique. $var1 = 'apple'; ${ 'Fruit_' . $var1 } = 'organic'; echo $Fruit_apple; // here you are thank you all 3, for your help! That was just what I wanted! -Govinda -- PHP General Mailing List

[PHP] Re: Time keeping in DB

2009-08-05 Thread Shawn McKenzie
Ralph Deffke wrote: as I said, the job is to store a time sheet. u came up with: 1. One record for each 7 day week (year, week_num, d1, d2, d3, d4, d5, d6, d7) where the dX field holds the hours worked 2. One record for each day (date, hours) it seems that just the first record is fine.

[PHP] Re: Time keeping in DB

2009-08-05 Thread Shawn McKenzie
Ben Dunlap wrote: OK, I think I understand most points except the start and stop time. Every time sheet I have used, SAP and several other smaller ones, I enter a weeks worth of time data like: Project Sun Mon TuesWed ThurFri Sat

[PHP] PHP 6 and MySQL 5 for Dynamic Web Sites Book

2009-08-05 Thread sono-io
Has anyone read this book by Larry Ullman yet? If so, what do you think about it? I'm looking for a well-rounded book that covers PHP for e-commerce websites and from what little I've been able to find online, it looks pretty good. Or would you recommend another book? I know that no

[PHP] Re: PHP 6 and MySQL 5 for Dynamic Web Sites Book

2009-08-05 Thread Ralph Deffke
why do u stick to php 6? i would recommend www.scribd.com and have a search on PHP. there are books on beginners for php5 and articles of the difference to php 6. a very usefull site by the way, made me stopping buying books. loads of material on IT stuff. ralph ralph_def...@yahoo.de

[PHP] Displaying user data and picture

2009-08-05 Thread nashrul
I am new to php... I try to make a php page that displays form submitted data and image. There are 3 php files, tampil_tamu_admin.php, edit_tamu.php and display_img.php. The user lists are displayed in the tampil_tamu_admin.php, and when the user clicks one record, it shows edit page

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Paul M Foster
On Wed, Aug 05, 2009 at 02:55:07PM -0700, Ben Dunlap wrote: In my navigation.php include file, I had if ($page = about) echo href I changed it to if ($page == about) echo and it suddenly worked! Imagine that... Another good case for putting the variable on the right side of ==:

Re: [PHP] Need quick got written up yesterday!! OUCH (RESOLVED)

2009-08-05 Thread Michael A. Peters
Miller, Terion wrote: Shawn you know repeatedly have been nothing but an asshole to me on this list, I have said before I'm not a php programmer, I was a front end designer, need graphics , need a css layout...see meneed backend programming..I'm trying... Stop being such a egomaniacal