php-general Digest 28 Oct 2009 16:20:17 -0000 Issue 6415

2009-10-28 Thread php-general-digest-help
php-general Digest 28 Oct 2009 16:20:17 - Issue 6415 Topics (messages 299416 through 299434): Re: Converting tables into forms 299416 by: Robert Cummings 299421 by: Tony Marston 299422 by: Ashley Sheridan 299425 by: Shawn McKenzie 299427 by: Bob

[PHP] Re: What would stop header(Location...) from working?

2009-10-28 Thread Mark Cilissen
tedd schreef: Hi gang: I just had a script stop following this statement: header(Location:users.php); It *was* working, but now instead of running users.php, it defaults to the parent script. When I place exit() after it, such as: header(Location:users.php); exit(); The script

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-28 Thread David Otton
2009/10/28 Raymond Irving xwis...@yahoo.com:  I'm try to do something like what Martin Scotta did but I'm looking for a solution that did not require me to loop through get_declared classes() to find a sub class. Place all your child classes in the same namespace, and use

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-28 Thread David Otton
2009/10/28 David Otton phpm...@jawbone.freeserve.co.uk: 2009/10/28 Raymond Irving xwis...@yahoo.com:  I'm try to do something like what Martin Scotta did but I'm looking for a solution that did not require me to loop through get_declared classes() to find a sub class. Place all your child

Re: [PHP] Converting tables into forms

2009-10-28 Thread Tony Marston
Try the Radicore framework at http://www.radicore.org This will allow you to import your table definitions into its Data Dictionary, export those definitions to produce table classes, then you can generate the basic maintenance tasks using transaction patterns. This takes 5 minutes per table,

Re: [PHP] Re: Converting tables into forms

2009-10-28 Thread Ashley Sheridan
On Tue, 2009-10-27 at 21:07 -0700, ben...@gmail.com wrote: I am trying to take MySQL tables and use the table structure to create HTML/PHP forms in as few steps as possible for further development. I have a project that has hundreds of tables and requires hundreds of forms to be created and

RE: [PHP] Netbeans IDE 6.5

2009-10-28 Thread Bob McConnell
From: Skip Evans I just downloaded the Netbeans 6.5 IDE to use as a code editor, installed the PHP plugin for syntax highlighting and it didn't look so good, so I find on the forum a guy who has made a collection of files, starting in a directory called config, that will apparently

RE: [PHP] Converting MySQL into Form

2009-10-28 Thread Jay Blanchard
[snip] Anyone know of a way to can take Mysql tables/fields from phpMyAdmin or .sql file and quickly make into HTML forms? [/snip] Search the archive of this list. I posted a function that does this a long while back. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Converting tables into forms

2009-10-28 Thread Shawn McKenzie
ben...@gmail.com wrote: I am trying to take MySQL tables and use the table structure to create HTML/PHP forms in as few steps as possible for further development. I have a project that has hundreds of tables and requires hundreds of forms to be created and don't want to do so field by field by

RE: [PHP] Converting MySQL into Form

2009-10-28 Thread Jay Blanchard
[snip] Anyone know of a way to can take Mysql tables/fields from phpMyAdmin or .sql file and quickly make into HTML forms? [/snip] Here is that function...(there are many mods that can be made to this, but it works) /* * SQL Extactor * Author: jblanchard * * Business Rule: if

RE: [PHP] Re: Converting tables into forms

2009-10-28 Thread Bob McConnell
From: Ashley Sheridan On Tue, 2009-10-27 at 21:07 -0700, ben...@gmail.com wrote: I am trying to take MySQL tables and use the table structure to create HTML/PHP forms in as few steps as possible for further development. I have a project that has hundreds of tables and requires hundreds of

Re: [PHP] Re: Converting tables into forms

2009-10-28 Thread Bastien Koert
On Wed, Oct 28, 2009 at 8:53 AM, Bob McConnell r...@cbord.com wrote: From: Ashley Sheridan On Tue, 2009-10-27 at 21:07 -0700, ben...@gmail.com wrote: I am trying to take MySQL tables and use the table structure to create HTML/PHP forms in as few steps as possible for further development. I

[PHP] Help with my first recursion menu

2009-10-28 Thread MEM
Hello all, Please have a look here: http://www.nuvemk.com/c_categoria/seccao/1 When we click on Fitofármacos, I can display the correspondent children! This is great! And I'm really happy! :) When we click on Fitofármacos children - Herbicidas, I was expecting to have returned Herbicidas

[PHP] RE: Netbeans IDE 6.5

2009-10-28 Thread Tom Calpin
If you go ToolsOptions Keymap tab, you can click the 'Import' button at the bottom. It just imports the zip file. I'm new to Netbeans myself and decided to install this colour scheme, however I can't get it to display correctly. I'm also missing word wrap and a more simple one-click FTP upload

[PHP] PHP String convention

2009-10-28 Thread Nick Cooper
Hi, I was just wondering what the difference/advantage of these two methods of writing a string are: 1) $string = foo{$bar}; 2) $string = 'foo'.$bar; I always use method 2 but have been noticing method 1 more and more in source code. Is this just user preference? I would use a generic search

RE: [PHP] Re: Converting tables into forms

2009-10-28 Thread Jay Blanchard
[snip]If your solution requires you to create hundreds of forms, which could take months to code, you need to take another look at the problem. I don't believe you have thought it through very well.[/snip] Actually you could use the function I provided to do this on the fly or have the function

RE: [PHP] PHP String convention

2009-10-28 Thread Jay Blanchard
[snip]I was just wondering what the difference/advantage of these two methods of writing a string are:[/snip] Method 2 is faster, YMMV. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP String convention

2009-10-28 Thread Jim Lucas
Nick Cooper wrote: Hi, I was just wondering what the difference/advantage of these two methods of writing a string are: 1) $string = foo{$bar}; 2) $string = 'foo'.$bar; I always use method 2 but have been noticing method 1 more and more in source code. Is this just user preference?

[PHP] Re: Netbeans IDE 6.5

2009-10-28 Thread Skip Evans
Hey, No import button in NetBeans 6.5 on Ubuntu. Skip Tom Calpin wrote: If you go ToolsOptions Keymap tab, you can click the 'Import' button at the bottom. It just imports the zip file. I'm new to Netbeans myself and decided to install this colour scheme, however I can't get it to display

[PHP] Apache file order

2009-10-28 Thread Skip Evans
Hey all, I modified an Apache config file to list the HTML file first, after the PHP file, it still pulls up the PHP file first. Is there another setting in Apache I should be looking for? I need it to check for the HTML file first. Thanks, Skip IfModule dir_module DirectoryIndex

Re: [PHP] PHP String convention

2009-10-28 Thread Nick Cooper
2009/10/28 Jim Lucas: Nick Cooper wrote: Hi, I was just wondering what the difference/advantage of these two methods of writing a string are: 1) $string = foo{$bar}; 2) $string = 'foo'.$bar; I always use method 2 but have been noticing method 1 more and more in source code. Is this

Re: [PHP] Netbeans IDE 6.5

2009-10-28 Thread Skip Evans
Bob McConnell wrote: Three questions. 1. Why did you install an obsolete version? 6.7.1 is current and 6.8 is now in beta. Because that what Ubuntu installs with apt-get install netbeans and I like to stick with Ubuntu tested stuff. 2. You just asked this question on the NetBeans

Re: [PHP] PHP String convention

2009-10-28 Thread Ashley Sheridan
On Wed, 2009-10-28 at 16:29 +, Nick Cooper wrote: 2009/10/28 Jim Lucas: Nick Cooper wrote: Hi, I was just wondering what the difference/advantage of these two methods of writing a string are: 1) $string = foo{$bar}; 2) $string = 'foo'.$bar; I always use method 2 but

Re: [PHP] PHP String convention

2009-10-28 Thread Jim Lucas
Nick Cooper wrote: 2009/10/28 Jim Lucas: Nick Cooper wrote: Hi, I was just wondering what the difference/advantage of these two methods of writing a string are: 1) $string = foo{$bar}; 2) $string = 'foo'.$bar; I always use method 2 but have been noticing method 1 more and more in

Re: [PHP] Netbeans IDE 6.5

2009-10-28 Thread Brady Mitchell
On Tue, Oct 27, 2009 at 5:50 PM, Skip Evans s...@bigskypenguin.com wrote: Any Netbeaners out there know how to install syntax highlighting stuff? 1 - Exit NetBeans 2 - Unzip the file in your ~/.netbeans/ folder. 3 - Start NetBeans 4 - Select the new color profile from Tools - Options - Fonts and

Re: [PHP] Netbeans IDE 6.5

2009-10-28 Thread Greg Maruszeczka
On Wed, 28 Oct 2009 11:29:49 -0500 Skip Evans s...@bigskypenguin.com wrote: Bob McConnell wrote: Three questions. 1. Why did you install an obsolete version? 6.7.1 is current and 6.8 is now in beta. Because that what Ubuntu installs with apt-get install netbeans and I like to

Re: [PHP] PHP String convention

2009-10-28 Thread Kim Madsen
Hi Nick Nick Cooper wrote on 2009-10-28 17:29: Thank you for the quick replies. I thought method 2 must be faster because it doesn't have to search for variables in the string. So what is the advantages then of method 1 over 3, do the curly braces mean anything? 1) $string = foo{$bar}; 2)

[PHP] How is this possible?

2009-10-28 Thread tedd
Hi gang: I am reviewing some old code (circa 2003) where the programmer had one script call another and placed variable values in the URL, like so: a href=user_edit.php?user_id=5223action=edit That seems innocent enough. However, in the called script (i.e., user_edit.php) there are no:

Re: [PHP] How is this possible?

2009-10-28 Thread David Otton
2009/10/28 tedd t...@sperling.com: Hi gang: http://php.net/manual/en/security.globals.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Netbeans IDE 6.5

2009-10-28 Thread Skip Evans
Greg Maruszeczka wrote: Download NB 6.7.1 (or even better, 6.8 Beta which looks pretty good to me), run the install script and you're done. It's built-in updater will handle the rest. Then if you're still feeling antsy about the choice of syntax colors you can choose any of five different theme

RE: [PHP] PHP String convention

2009-10-28 Thread Warren Vail
The curly braces look like something from the smarty template engine. Warren Vail -Original Message- From: Kim Madsen [mailto:php@emax.dk] Sent: Wednesday, October 28, 2009 10:18 AM To: Nick Cooper Cc: Jim Lucas; php-general@lists.php.net Subject: Re: [PHP] PHP String convention Hi

Re: [PHP] Re: Converting tables into forms

2009-10-28 Thread ben...@gmail.com
Jay, What function do you have? Thanks to everyone for their feedback. Best, Ben On Wed, Oct 28, 2009 at 9:17 AM, Jay Blanchard jblanch...@pocket.comwrote: [snip]If your solution requires you to create hundreds of forms, which could take months to code, you need to take another look at

Re: [PHP] PHP String convention

2009-10-28 Thread Ashley Sheridan
On Wed, 2009-10-28 at 18:18 +0100, Kim Madsen wrote: Hi Nick Nick Cooper wrote on 2009-10-28 17:29: Thank you for the quick replies. I thought method 2 must be faster because it doesn't have to search for variables in the string. So what is the advantages then of method 1 over 3, do

Re: [PHP] How is this possible?

2009-10-28 Thread Adam Randall
I don't do this personally, but you can probably get your script working by doing something like this: foreach( $_GET as $k = $v ) $$k = $v; You would put that at the top of your page, but be aware that it allows other people to set variables on your page (just like register globals does). If

Re: [PHP] How is this possible?

2009-10-28 Thread Andrew Ballard
On Wed, Oct 28, 2009 at 1:27 PM, tedd t...@sperling.com wrote: Hi gang: I am reviewing some old code (circa 2003) where the programmer had one script call another and placed variable values in the URL, like so:    a href=user_edit.php?user_id=5223action=edit That seems innocent enough.

Re: [PHP] How is this possible?

2009-10-28 Thread Ashley Sheridan
On Wed, 2009-10-28 at 13:47 -0400, Andrew Ballard wrote: On Wed, Oct 28, 2009 at 1:27 PM, tedd t...@sperling.com wrote: Hi gang: I am reviewing some old code (circa 2003) where the programmer had one script call another and placed variable values in the URL, like so: a

Re: [PHP] PHP String convention

2009-10-28 Thread Robert Cummings
Kim Madsen wrote: Hi Nick Nick Cooper wrote on 2009-10-28 17:29: Thank you for the quick replies. I thought method 2 must be faster because it doesn't have to search for variables in the string. So what is the advantages then of method 1 over 3, do the curly braces mean anything? 1) $string

Re: [PHP] How is this possible? [Solved]

2009-10-28 Thread tedd
To all: I found the problem, which basically was that I had declared a variable in a preceding script with the same name, namely $user_id. When I changed my script to $u_id, everything worked as before. Clearly, Globals are evil. It's a bitch to have to work with code you can't change

RE: [PHP] How is this possible? [Solved]

2009-10-28 Thread Bob McConnell
From: tedd I found the problem, which basically was that I had declared a variable in a preceding script with the same name, namely $user_id. When I changed my script to $u_id, everything worked as before. Clearly, Globals are evil. It's a bitch to have to work with code you can't

[PHP] Textarea to road a text file

2009-10-28 Thread Jean Lee
I want to use Textarea as the text-file viewer and editor of my homepage. But Textarea doesn't work exactly as i intended. In sometimes, TextArea doesn't show up and moreover the some parts of the file are displayed(rendered) in browser without TextArea! -- PHP General Mailing List

Re: [PHP] How is this possible? [Solved]

2009-10-28 Thread Robert Cummings
Bob McConnell wrote: From: tedd I found the problem, which basically was that I had declared a variable in a preceding script with the same name, namely $user_id. When I changed my script to $u_id, everything worked as before. Clearly, Globals are evil. It's a bitch to have to work with

RE: [PHP] Textarea to road a text file

2009-10-28 Thread Jay Blanchard
[snip]I want to use Textarea as the text-file viewer and editor of my homepage. But Textarea doesn't work exactly as i intended. In sometimes, TextArea doesn't show up and moreover the some parts of the file are displayed(rendered) in browser without TextArea![/snip] Not enough information to

Re: [PHP] Textarea to road a text file

2009-10-28 Thread Andrew Ballard
On Wed, Oct 28, 2009 at 10:39 AM, Jean Lee versus...@ymail.com wrote: I want to use Textarea as the text-file viewer and editor of my homepage. But Textarea doesn't work exactly as i intended. In sometimes, TextArea doesn't show up and moreover the some parts of the file are

Re: [PHP] How is this possible? [Solved]

2009-10-28 Thread tedd
At 2:48 PM -0400 10/28/09, Robert Cummings wrote: Bob McConnell wrote: From: tedd I found the problem, which basically was that I had declared a variable in a preceding script with the same name, namely $user_id. When I changed my script to $u_id, everything worked as before. Clearly,

[PHP] Re: Create a screenshot of a website

2009-10-28 Thread Manuel Lemos
Hello, on 10/22/2009 11:28 AM resea soul said the following: Hi, I want to be able to get a screenshot of a given website on the fly. Can you give me any suggestions. If you are still looking at solutions for this problem, here you can find a solution that works on Windows:

[PHP] [php] INSERT and immediately UPDATE

2009-10-28 Thread Allen McCabe
Hey everyone, I have an issue. I need my (employee) users to be able to insert shows into the our MySQL database and simultaneously upload an image file (and store the path in the table). I have accomplished this with a product-based system (adding products and uploading images of the product),

Re: [PHP] Re: Create a screenshot of a website

2009-10-28 Thread Robert Cummings
Manuel Lemos wrote: Hello, on 10/22/2009 11:28 AM resea soul said the following: Hi, I want to be able to get a screenshot of a given website on the fly. Can you give me any suggestions. If you are still looking at solutions for this problem, here you can find a solution that works on

Re: [PHP] [php] INSERT and immediately UPDATE

2009-10-28 Thread Mari Masuda
Maybe you could use http://us.php.net/manual/en/function.mysql-insert-id.php to get the inserted id. On Oct 28, 2009, at 12:21 PM, Allen McCabe wrote: Hey everyone, I have an issue. I need my (employee) users to be able to insert shows into the our MySQL database and simultaneously upload

Re: [PHP] [php] INSERT and immediately UPDATE

2009-10-28 Thread Ashley Sheridan
On Wed, 2009-10-28 at 12:21 -0700, Allen McCabe wrote: Hey everyone, I have an issue. I need my (employee) users to be able to insert shows into the our MySQL database and simultaneously upload an image file (and store the path in the table). I have accomplished this with a product-based

Re: [PHP] [php] INSERT and immediately UPDATE

2009-10-28 Thread Floyd Resler
Allen, Use mysql_insert_id(). This will return the id of the last record inserted. Take care, Floyd On Oct 28, 2009, at 3:21 PM, Allen McCabe wrote: Hey everyone, I have an issue. I need my (employee) users to be able to insert shows into the our MySQL database and simultaneously

Re: [PHP] [php] INSERT and immediately UPDATE

2009-10-28 Thread Martin Scotta
On Wed, Oct 28, 2009 at 4:21 PM, Allen McCabe allenmcc...@gmail.com wrote: Hey everyone, I have an issue. I need my (employee) users to be able to insert shows into the our MySQL database and simultaneously upload an image file (and store the path in the table). I have accomplished this

[PHP] Re: [php] INSERT and immediately UPDATE

2009-10-28 Thread Jo�o C�ndido de Souza Neto
Use mysql_insert_id() instead of the select you´re using now. Allen McCabe allenmcc...@gmail.com escreveu na mensagem news:657acef20910281221y5ab6ab7t4882f4f00da2c...@mail.gmail.com... Hey everyone, I have an issue. I need my (employee) users to be able to insert shows into the our MySQL

Re: [PHP] Re: Create a screenshot of a website

2009-10-28 Thread Ashley Sheridan
On Wed, 2009-10-28 at 15:24 -0400, Robert Cummings wrote: Manuel Lemos wrote: Hello, on 10/22/2009 11:28 AM resea soul said the following: Hi, I want to be able to get a screenshot of a given website on the fly. Can you give me any suggestions. If you are still looking at

Re: [PHP] Re: Create a screenshot of a website

2009-10-28 Thread Manuel Lemos
Hello, on 10/28/2009 05:24 PM Robert Cummings said the following: I want to be able to get a screenshot of a given website on the fly. Can you give me any suggestions. If you are still looking at solutions for this problem, here you can find a solution that works on Windows:

Re: [PHP] [php] INSERT and immediately UPDATE

2009-10-28 Thread Allen McCabe
You all are great! Thank you so much. On Wed, Oct 28, 2009 at 12:27 PM, Martin Scotta martinsco...@gmail.comwrote: On Wed, Oct 28, 2009 at 4:21 PM, Allen McCabe allenmcc...@gmail.comwrote: Hey everyone, I have an issue. I need my (employee) users to be able to insert shows into the our

Re: [PHP] Re: Create a screenshot of a website

2009-10-28 Thread Robert Cummings
Manuel Lemos wrote: Hello, on 10/28/2009 05:24 PM Robert Cummings said the following: I want to be able to get a screenshot of a given website on the fly. Can you give me any suggestions. If you are still looking at solutions for this problem, here you can find a solution that works on

[PHP] A better php document?

2009-10-28 Thread Peng Yu
I am reading the following PHP document. But I feel very inconvenient as the materials are spread on many short webpages. I would prefer long webpages. I'm wondering if some body can point me some better PHP document? http://www.php.net/manual/en/ -- PHP General Mailing List

Re: [PHP] A better php document?

2009-10-28 Thread Jan Marques
http://en.wikibooks.org/wiki/PHP_Programming might help you :) On Wed, Oct 28, 2009 at 2:12 AM, Peng Yu pengyu...@gmail.com wrote: I am reading the following PHP document. But I feel very inconvenient as the materials are spread on many short webpages. I would prefer long webpages. I'm

Re: [PHP] Re: Create a screenshot of a website

2009-10-28 Thread Paul M Foster
On Wed, Oct 28, 2009 at 05:49:43PM -0200, Manuel Lemos wrote: Hello, on 10/28/2009 05:24 PM Robert Cummings said the following: I want to be able to get a screenshot of a given website on the fly. Can you give me any suggestions. If you are still looking at solutions for this problem,

Re: [PHP] Re: Create a screenshot of a website

2009-10-28 Thread Shawn McKenzie
Manuel Lemos wrote: http://www.phpclasses.org/gtkmozembed-shot It hurts my eyes to go on the phpclasses website. It's like someone vomited tabs and links :| I have no clue why you felt the need to be so aggressive. Anyway, if you are that sensitive to design issues, why don't you

[PHP] Are there free prebuild websites?

2009-10-28 Thread Peng Yu
I want to build a website using PHP. But to make a website from scratch will take a long time. I observed many websites look similar. Therefore, I think that there are a lot of commonalities between them. I'm wondering if there are some depository of free prebuild websites (based on PHP or some

Re: [PHP] Are there free prebuild websites?

2009-10-28 Thread Haig Dedeyan
Hi Peng, here's a site that has free css templates for you to use: http://www.templatemo.com/page/1 Peng Yu wrote: I want to build a website using PHP. But to make a website from scratch will take a long time. I observed many websites look similar. Therefore, I think that there are a lot of

[PHP] UrlRewrite htaccess confusion

2009-10-28 Thread Rob Gould
I feel like I'm really close to a solution for the clean-url method in htaccess. I've successfully got it now so that: http://benchwarmersports.com/packages/basketball/2010/nba-all-star-game maps to:

Re: [PHP] Are there free prebuild websites?

2009-10-28 Thread Ashley Sheridan
On Wed, 2009-10-28 at 16:54 -0400, Haig Dedeyan wrote: Hi Peng, here's a site that has free css templates for you to use: http://www.templatemo.com/page/1 Peng Yu wrote: I want to build a website using PHP. But to make a website from scratch will take a long time. I observed many

[PHP] RE: Help with my first recursion menu

2009-10-28 Thread MEM
-Original Message- From: MEM [mailto:tal...@gmail.com] Sent: quarta-feira, 28 de Outubro de 2009 15:55 To: 'php-general@lists.php.net' Subject: Help with my first recursion menu Hello all, Please have a look here: http://www.nuvemk.com/c_categoria/seccao/1 When we click on

Re: [PHP] How is this possible? [Solved]

2009-10-28 Thread Jim Lucas
tedd wrote: At 2:48 PM -0400 10/28/09, Robert Cummings wrote: Bob McConnell wrote: From: tedd I found the problem, which basically was that I had declared a variable in a preceding script with the same name, namely $user_id. When I changed my script to $u_id, everything worked as before.

Re: [PHP] Textarea to road a text file

2009-10-28 Thread Jean Lee
Thank you, Jay Blanchard and Andrew Ballard!!! Could you explain what was my fault concerned about this case? Thanks in advance! My codes were htmlheadtitle. body.. ?php $handle = fopen(./menu.php, r); $contents = ; if ($handle) { while (!feof($handle)) { $buffer

Re: [PHP] Re: Create a screenshot of a website

2009-10-28 Thread Manuel Lemos
Hello, on 10/28/2009 06:37 PM Paul M Foster said the following: Anyway, if you are that sensitive to design issues, why don't you participate in the contest to propose a better design instead of just complaining against the work that others do to help the PHP community? You can earn prizes

Re: [PHP] Netbeans IDE 6.5

2009-10-28 Thread James McLean
On Thu, Oct 29, 2009 at 4:05 AM, Skip Evans s...@bigskypenguin.com wrote: Now, if I can just get rid of that red line at the 80 column mark. I haven't bothered with 80 columns since I wrote assembly on a terminal connected to a PDP-11 in college. I myself and I'm sure many others will agree