Re: [PHP] New to PHP and struggling with the basics
Kranthi Many thanks, any idea on the name of the error logs? Peter, Yes, browsing to the correct location but still getting the 403. this website requires you to log in. Abah, I've gone to the httpd-userdir.conf file and replaced it with your text (not including the directory tree), restarted apache (after each change) but am still getting the same error. However I have found that if I paste the html into my web page created by Serif WebPlus 10 I get the html line but not the php line. Any further thoughts? It has to be something simple that I'vw not done! Cheers all. kranthi kranthi...@gmail.com wrote in message news:aanlktik6=68ho+hdfpvd3x2qmrudlz_ttco2oqk1b...@mail.gmail.com... apache error logs will be helpful in this case. Their location varies depending upon your installation. But in any case they'll be insde your server directory (IIRC it is c:/Program Files/Apache Software Foundation/Apache by default) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
Hi Kranthi, No, I just literally get the HTML line shown but absolutely nothing beneath it. kranthi kranthi...@gmail.com wrote in message news:aanlktin2xnthqm-pp7qwtgo=sqtkctthtwz+08bbw...@mail.gmail.com... they should be something like error_log-[date] not sure about windows though However I have found that if I paste the html into my web page created by Serif WebPlus 10 I get the html line but not the php line. are you saying that you are getting the php code in your browser ? ?php echo pThis is a PHP line/p; phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
On 4 October 2010 11:30, Col Day colind...@aol.com wrote: Hi all, Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule (after telling me what I've done wrong)) and have installed Apache 2.2 and PHP 5.3.3 onto a laptop running Vista. (yes I know!!!). I've had Apache running fine with my basic web site created using Serif's Webplus10 but wanted to experiment with PHP as I want an uploadable area on my website for my friends and family to submit video/photos. I've checked the install of PHP using php -v and I get the output that PHP 5.3.3 (cli) (built: Jul 21 2010 20:10:20) but when I try and go to the test.php file (below) I get an http 403 webiste requires you to log in. Error message. html head titlePHP Test/title /head body pThis is an HTML line ?php echo pThis is a PHP line/p; phpinfo(); ? /body /html This is the text of the test.php file which I have plonked down in /apache/htdocs What have I missed? the Dummies book is quoting PHP 5.0.0 as the latest release so not too far away really. A) v5.0.0 is years old. B) your issue is with apache, not php - 403 is a you have no permission to see this. Check permissions for the file you're trying to test, as well as for the folder. Also, seeing as you're naming the file test.php, make sure you're browsing for that file and not just / or index.php. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
they should be something like error_log-[date] not sure about windows though However I have found that if I paste the html into my web page created by Serif WebPlus 10 I get the html line but not the php line. are you saying that you are getting the php code in your browser ? ?php echo pThis is a PHP line/p; phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
apache error logs will be helpful in this case. Their location varies depending upon your installation. But in any case they'll be insde your server directory (IIRC it is c:/Program Files/Apache Software Foundation/Apache by default) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New to PHP and struggling with the basics
Hi all, Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule (after telling me what I've done wrong)) and have installed Apache 2.2 and PHP 5.3.3 onto a laptop running Vista. (yes I know!!!). I've had Apache running fine with my basic web site created using Serif's Webplus10 but wanted to experiment with PHP as I want an uploadable area on my website for my friends and family to submit video/photos. I've checked the install of PHP using php -v and I get the output that PHP 5.3.3 (cli) (built: Jul 21 2010 20:10:20) but when I try and go to the test.php file (below) I get an http 403 webiste requires you to log in. Error message. html head titlePHP Test/title /head body pThis is an HTML line ?php echo pThis is a PHP line/p; phpinfo(); ? /body /html This is the text of the test.php file which I have plonked down in /apache/htdocs What have I missed? the Dummies book is quoting PHP 5.0.0 as the latest release so not too far away really. Thanks for your help. Cheers. Col Day -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
Col. Since you're new to php, then an easy way to install apache, is using XAMPP ( http://www.apachefriends.org/en/xampp.html ) I would suggest you remove the apache you have installed, and the php you installed, and install the XAMPP package as it comes prebuilt with mysql, ftp, apache and php, and it is simple to use/work with. And if you install to defaults there, you will put your web files into C:\xampp\htdocs\ and everythign should just work. The way i read your initial post, is that you installed just apache, and just php... if you did this, then you may not have integrated php into apache properly, so then your php pages will not work. just my $0.02 here, cuz if it doesn't work after you install XAMPP, then there is something else wrong. And the other thing, is that you're running on vista, and vista doesn't like things running on localhost (or at least it didn't used to) Steve On Mon, 2010-10-04 at 13:51 +0100, Col Day wrote: Hi Kranthi, No, I just literally get the HTML line shown but absolutely nothing beneath it. kranthi kranthi...@gmail.com wrote in message news:aanlktin2xnthqm-pp7qwtgo=sqtkctthtwz+08bbw...@mail.gmail.com... they should be something like error_log-[date] not sure about windows though However I have found that if I paste the html into my web page created by Serif WebPlus 10 I get the html line but not the php line. are you saying that you are getting the php code in your browser ? ?php echo pThis is a PHP line/p; phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RES: [PHP] New to PHP and struggling with the basics
Col Day : Go to : C:\Arquivos de programas\Apache Software Foundation\Apache2.2\conf or the folder in your machine. Search for this file = httpd.conf Search for DocumentRoot D:/webroot put your work folder in my case D:/webroot. Search for this line and apply the same changes make in DocumentRoot # # This should be changed to whatever you set DocumentRoot to # Directory D:/webroot Search for DirectoryIndex, and add index.php to the list # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # IfModule dir_module DirectoryIndex index.html index.php /IfModule Add on the end of the file this lines : My php installation folder is D:/PHP/, change D:/PHP/ to your installation folder. #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL PHPIniDir D:/PHP/ # Php as Apache module LoadModule php5_module D:/PHP/php5apache2_2.dll Restart apache. Browse to localhost Alejandro M.S. -Mensagem original- De: Col Day [mailto:colind...@aol.com] Enviada em: segunda-feira, 4 de outubro de 2010 06:31 Para: php-general@lists.php.net Assunto: [PHP] New to PHP and struggling with the basics Hi all, Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule (after telling me what I've done wrong)) and have installed Apache 2.2 and PHP 5.3.3 onto a laptop running Vista. (yes I know!!!). I've had Apache running fine with my basic web site created using Serif's Webplus10 but wanted to experiment with PHP as I want an uploadable area on my website for my friends and family to submit video/photos. I've checked the install of PHP using php -v and I get the output that PHP 5.3.3 (cli) (built: Jul 21 2010 20:10:20) but when I try and go to the test.php file (below) I get an http 403 webiste requires you to log in. Error message. html head titlePHP Test/title /head body pThis is an HTML line ?php echo pThis is a PHP line/p; phpinfo(); ? /body /html This is the text of the test.php file which I have plonked down in /apache/htdocs What have I missed? the Dummies book is quoting PHP 5.0.0 as the latest release so not too far away really. Thanks for your help. Cheers. Col Day -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
Your directory configuration should look like this Directory C:\path_to_www_root Order Deny,Allow Allow from all Options Indexes FollowSymLinks Includes ExecCGI # # AllowOverride controls what directives may be placed in .htaccess files. # It can be All, None, or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All /Directory On Mon, Oct 4, 2010 at 10:53 AM, kranthi kranthi...@gmail.com wrote: apache error logs will be helpful in this case. Their location varies depending upon your installation. But in any case they'll be insde your server directory (IIRC it is c:/Program Files/Apache Software Foundation/Apache by default) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Share with free mind! Join the world largest open forum for hackers and programmers. http://www.tuwana.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
Steve, That's superb, many thanks for the link! I shall give it a go! Yes I did install apache then php, however I tried to follow the instructions in the Dummies book (what does it make me if I can't follow the dummies book?) but to no avail. I have just printed off the first 40 pages so that i can read it whilst looking at the screen ratrher than switching about, however I will give Xammp a go first and foremost seeing as I only want to test my own web page before I start to buy hosting elsewhere. Seeing as you are so great :-) Any ideas of the best way to script an upload page that will deliver files to the server? Family photo's and video clips mainly. Thoughts? Also, many thanks to everyone who has tried to help a muppet. But I guess we all gotta start somewhere! Cheers again! Steve Staples sstap...@mnsi.net wrote in message news:1286202653.4703.48.ca...@webdev01... Col. Since you're new to php, then an easy way to install apache, is using XAMPP ( http://www.apachefriends.org/en/xampp.html ) I would suggest you remove the apache you have installed, and the php you installed, and install the XAMPP package as it comes prebuilt with mysql, ftp, apache and php, and it is simple to use/work with. And if you install to defaults there, you will put your web files into C:\xampp\htdocs\ and everythign should just work. The way i read your initial post, is that you installed just apache, and just php... if you did this, then you may not have integrated php into apache properly, so then your php pages will not work. just my $0.02 here, cuz if it doesn't work after you install XAMPP, then there is something else wrong. And the other thing, is that you're running on vista, and vista doesn't like things running on localhost (or at least it didn't used to) Steve On Mon, 2010-10-04 at 13:51 +0100, Col Day wrote: Hi Kranthi, No, I just literally get the HTML line shown but absolutely nothing beneath it. kranthi kranthi...@gmail.com wrote in message news:aanlktin2xnthqm-pp7qwtgo=sqtkctthtwz+08bbw...@mail.gmail.com... they should be something like error_log-[date] not sure about windows though However I have found that if I paste the html into my web page created by Serif WebPlus 10 I get the html line but not the php line. are you saying that you are getting the php code in your browser ? ?php echo pThis is a PHP line/p; phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
In addition, I think I may have got to the bottom of what I was doing wrong in the first place. I recently swapped out my laptop for my wifes one (she upgraded, well I upgraded hers, and I got the old one) and I forgot that this one didn't automatically boot up into the Administrator profile. Doh! Cheers again all! Col Day colind...@aol.com wrote in message news:a2.70.25536.9a5f9...@pb1.pair.com... Steve, That's superb, many thanks for the link! I shall give it a go! Yes I did install apache then php, however I tried to follow the instructions in the Dummies book (what does it make me if I can't follow the dummies book?) but to no avail. I have just printed off the first 40 pages so that i can read it whilst looking at the screen ratrher than switching about, however I will give Xammp a go first and foremost seeing as I only want to test my own web page before I start to buy hosting elsewhere. Seeing as you are so great :-) Any ideas of the best way to script an upload page that will deliver files to the server? Family photo's and video clips mainly. Thoughts? Also, many thanks to everyone who has tried to help a muppet. But I guess we all gotta start somewhere! Cheers again! Steve Staples sstap...@mnsi.net wrote in message news:1286202653.4703.48.ca...@webdev01... Col. Since you're new to php, then an easy way to install apache, is using XAMPP ( http://www.apachefriends.org/en/xampp.html ) I would suggest you remove the apache you have installed, and the php you installed, and install the XAMPP package as it comes prebuilt with mysql, ftp, apache and php, and it is simple to use/work with. And if you install to defaults there, you will put your web files into C:\xampp\htdocs\ and everythign should just work. The way i read your initial post, is that you installed just apache, and just php... if you did this, then you may not have integrated php into apache properly, so then your php pages will not work. just my $0.02 here, cuz if it doesn't work after you install XAMPP, then there is something else wrong. And the other thing, is that you're running on vista, and vista doesn't like things running on localhost (or at least it didn't used to) Steve On Mon, 2010-10-04 at 13:51 +0100, Col Day wrote: Hi Kranthi, No, I just literally get the HTML line shown but absolutely nothing beneath it. kranthi kranthi...@gmail.com wrote in message news:aanlktin2xnthqm-pp7qwtgo=sqtkctthtwz+08bbw...@mail.gmail.com... they should be something like error_log-[date] not sure about windows though However I have found that if I paste the html into my web page created by Serif WebPlus 10 I get the html line but not the php line. are you saying that you are getting the php code in your browser ? ?php echo pThis is a PHP line/p; phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and the list
Is MAX_FILE_SIZE passed to PHP as $MAX_FILE_SIZE? only if register_golbals is set to ON in php.ini. This is a very bad practice and should be avoided. Use $_POST['MAX_FILE_SIZE'] instead. But in this case dont use the post variable also. define a constant in your configuration file and use that constant. The only use of MAX_FILE_SIZE is to inform the browser that dont allow the user to upload files which are MAX_FILE_SIZE. ?php $MAX_FILE_SIZE = 3; echo _END form enctype=multipart/form-data action=__URL__ method=POST !-- MAX_FILE_SIZE must precede the file input field -- input type=hidden name=MAX_FILE_SIZE / !-- Name of input element determines name in $_FILES array -- Send this file: input name=userfile type=file / input type=submit value=Send File / /form _END Nope, you cant. You have to mention the value attribute of a hidden field I'm also concerned that in the first instance, a malicious user can modify the value and I will be hosed. Am I correct? A malicious user can ALWAYS modify the data. You will have to always validate every input field. echo _END form enctype=multipart/form-data action=__URL__ method=POST !-- MAX_FILE_SIZE must precede the file input field -- input type=hidden name=?php echo $max_file_size; ? / !-- Name of input element determines name in $_FILES array -- Send this file: input name=userfile type=file / input type=submit value=Send File / /form _END i did not understand this echo _END means that you are in php so why do you need a ?php echo $max_file_size; ? ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and the list
On Sat, Sep 11, 2010 at 06:37:41PM -0500, MikeB wrote: Hello, I'm new to PHP and also new to using newsgroups/mailing lists directly. So if I make a mistake, please forgive me this once and I'll try to do better in the future. Please help me understand, my head is absolutely spinning and I can't get my mind around this. In the php.net site there is an example on uploading a file via a form. http://www.php.net/manual/en/features.file-upload.post-method.php This is the sample code for the form: form enctype=multipart/form-data action=__URL__ method=POST !-- MAX_FILE_SIZE must precede the file input field -- input type=hidden name=MAX_FILE_SIZE value=3 / !-- Name of input element determines name in $_FILES array -- Send this file: input name=userfile type=file / input type=submit value=Send File / /form Is MAX_FILE_SIZE passed to PHP as $MAX_FILE_SIZE? No. It's passed as: $_POST['MAX_FILE_SIZE'], as are all variables in a form which uses post as its method attribute. Assuming I want to make it a variable in my PHP code, can I do this: ?php $MAX_FILE_SIZE = 3; echo _END form enctype=multipart/form-data action=__URL__ method=POST !-- MAX_FILE_SIZE must precede the file input field -- input type=hidden name=MAX_FILE_SIZE / !-- Name of input element determines name in $_FILES array -- Send this file: input name=userfile type=file / input type=submit value=Send File / /form _END ? In other words, simply omitting the value clause in the form field? No. Better is this: ?php $max_file_size = 3; echo _END form enctype=multipart/form-data action=__URL__ method=POST !-- MAX_FILE_SIZE must precede the file input field -- input type=hidden name=?php echo $max_file_size; ? / !-- Name of input element determines name in $_FILES array -- Send this file: input name=userfile type=file / input type=submit value=Send File / /form _END Remember that the data HTML/values you're sending are being sent back when the form returns to the server for processing. So the information must be contained in POST/GET variables, just the way I did it above. (There are other ways to do the syntax, but the meaning is the same.) And can I make that value a global constant somehow so that I can later also test the actual size of the uploaded file in another function? Or do I have to do this: ?php $MAX_UPLOAD_SIZE = 3; echo _END form enctype=multipart/form-data action=__URL__ method=POST !-- MAX_FILE_SIZE must precede the file input field -- input type=hidden name=MAX_FILE_SIZE value=$MAX_UPLOAD_SIZE/ !-- Name of input element determines name in $_FILES array -- Send this file: input name=userfile type=file / input type=submit value=Send File / /form _END ? You can make it a global constant if you want, but remember that, because of the HTTP protocol, the server doesn't know anything about what you've declared global until it processes the form on its return. And then the only thing it knows is what you've put in the values of your HTML fields. The exception is $_SESSION variables, which can store values *across* calls to a page. I'm also concerned that in the first instance, a malicious user can modify the value and I will be hosed. Am I correct? Yes, a malicious user can do this. They can stand off somewhere and submit a copy of your form with different values. Then they can upload a file of larger size. However, if you keep that 3 value somewhere, you can refuse to process files which exceed that size. When I say process, I mean store the file in a more permanent place and actually *do* something with it. Uploading files puts them in a temporary location controlled by the server and inaccessible to you using normal methods. You probably know you have to go through a couple of extra steps to get to that file someone uploaded. You can't just say, Give me the file at /tmp/phpuploads/uploadedfile.txt. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and the list
--- On Sun, 12/9/10, MikeB mpbr...@gmail.com wrote: From: MikeB mpbr...@gmail.com Subject: [PHP] New to PHP and the list To: php-general@lists.php.net Received: Sunday, 12 September, 2010, 9:37 AM Hello, I'm new to PHP and also new to using newsgroups/mailing lists directly. So if I make a mistake, please forgive me this once and I'll try to do better in the future. Please help me understand, my head is absolutely spinning and I can't get my mind around this. In the php.net site there is an example on uploading a file via a form. http://www.php.net/manual/en/features.file-upload.post-method.php start off simpler with this version http://www.w3schools.com/php/php_file_upload.asp tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and the list
On 9/11/2010 6:51 PM, Tom Sparks wrote: --- On Sun, 12/9/10, MikeBmpbr...@gmail.com wrote: From: MikeBmpbr...@gmail.com Subject: [PHP] New to PHP and the list To: php-general@lists.php.net Received: Sunday, 12 September, 2010, 9:37 AM Hello, I'm new to PHP and also new to using newsgroups/mailing lists directly. So if I make a mistake, please forgive me this once and I'll try to do better in the future. Please help me understand, my head is absolutely spinning and I can't get my mind around this. In the php.net site there is an example on uploading a file via a form. http://www.php.net/manual/en/features.file-upload.post-method.php start off simpler with this version http://www.w3schools.com/php/php_file_upload.asp I think I have that much under my belt, I'm more or less trying to dig a little deeper. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and the list
On Sun, Sep 12, 2010 at 5:07 AM, MikeB mpbr...@gmail.com wrote: Hello, I'm new to PHP and also new to using newsgroups/mailing lists directly. So if I make a mistake, please forgive me this once and I'll try to do better in the future. Please help me understand, my head is absolutely spinning and I can't get my mind around this. In the php.net site there is an example on uploading a file via a form. http://www.php.net/manual/en/features.file-upload.post-method.php This is the sample code for the form: form enctype=multipart/form-data action=__URL__ method=POST !-- MAX_FILE_SIZE must precede the file input field -- input type=hidden name=MAX_FILE_SIZE value=3 / !-- Name of input element determines name in $_FILES array -- Send this file: input name=userfile type=file / input type=submit value=Send File / /form Is MAX_FILE_SIZE passed to PHP as $MAX_FILE_SIZE? err! print_r and var_dump is your friend! Assuming I want to make it a variable in my PHP code, can I do this: ?php $MAX_FILE_SIZE = 3; echo _END form enctype=multipart/form-data action=__URL__ method=POST !-- MAX_FILE_SIZE must precede the file input field -- input type=hidden name=MAX_FILE_SIZE / !-- Name of input element determines name in $_FILES array -- Send this file: input name=userfile type=file / input type=submit value=Send File / /form _END ? In other words, simply omitting the value clause in the form field? And can I make that value a global constant somehow so that I can later also test the actual size of the uploaded file in another function? if this is about getting the size of the uploaded file, you better try print_r($_FILES) after the form submit. there you have size in bytes. MAX_FILE_SIZE in html form will be used to early notify the up-loader, in case of a bigger file which exceeds the server side limit imposed through php.ini. (see http://www.php.net/manual/en/ini.core.php file uploads section) Or do I have to do this: ?php $MAX_UPLOAD_SIZE = 3; _END ? I'm also concerned that in the first instance, a malicious user can modify the value and I will be hosed. Am I correct? and yes, never trust client side. ~viraj Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP question
On Wed, 2009-01-28 at 23:42 +, Ashley Sheridan wrote: I hate div'itis as well. Some people seem to think it's a big faux pas to use table tags now, when that couldn't be more wrong. Use tables for tabular data, CSS for the rest (with as few exceptions - and there are always some eh - as you can manage.) I've seen people try to rebuild a table of data, that you might represent in a spreadsheet, as a collection of div's. Bad form, as the data has now lost all meaning. This is the same as replacing all your h1 tags with div class=header1 or strong with span class=bold. Silly idea, slap on the wrist, don't do it again. Personally, CSS is my preferred way of working now. I can define a whole bunch of elements, semantically as possible, and then can redefine the look as often as I wish afterwards with CSS. Look at the CSS Zen Garden if you don't believe how useful this is. Rather than going through a bunch of page to replaces tables, or PHP code to change the output layout, you can redefine your CSS to alter the look. It's not a black art, it just needs a little practise. Remember how bad we all were when we first started using HTML? It's exactly the same thing here! I thought I'd dredge up this old, old topic to add some comments about some recent stuff I did since this thread (or many similar to it) were in the back of mind. Specifically I was creating a new look and feel for my MUD hobby website and I wanted to make use of lots of PNG images with alpha transparency. Additionally I wanted variable width. I felt tables were the best approach for this because div based sliding door techniques and multi-level div containers don't work when the alpha transparency will reveal the underlying sliding or container background. I just don't think I could accomplish the same results using divs and floats. http://www.wocmud.org/welcome.php Comments? Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New to PHP question
I am just learning PHP from the O'Reilly Learning PHP 5 book and I have a question regarding the formatting of text. Actually it is a couple of questions. First, when I use the \n and run the script from the command line it works great. When I run the same code in a browser it does not put the newline in and the text runs together. I know that I can use br/ to do the same thing, but why is it this way? The second question is closely related to the first. When formatting text using printf the padding works great when running from the command line but not at all when in a browser. Here is the code that I am working with: ?php $hamburger = 4.95; $chocmilk = 1.95; $cola = .85; $subtotal = (2 * $hamburger) + $chocmilk + $cola; $tax = $subtotal * .075; $tip = $subtotal * .16; $total = $subtotal + $tip + $tax; print Welcome to Chez Don.\n; print Here is your receipt:\n; print \n; printf(%1d %9s \$%.2f\n, 2, 'Hamburger', ($hamburger * 2)); printf(%1d %9s \$%.2f\n, 1, 'Milkshake', 1.95); printf(%1d %9s \$%.2f\n, 1, 'Soda', .85); printf(%25s: \$%.2f\n,'Subtotal', $subtotal); printf(%25s: \$%.2f\n, 'Tax', $tax); printf(%25s: \$%.2f\n, 'Tip', $tip); printf(%25s: \$%.2f\n, 'Total', $total); ? Thanks for the help everyone. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Don Collier wrote: First, when I use the \n and run the script from the command line it works great. When I run the same code in a browser it does not put the newline in and the text runs together. I know that I can use br/ to do the same thing, but why is it this way? That's how HTML works. The second question is closely related to the first. When formatting text using printf the padding works great when running from the command line but not at all when in a browser. Same answer. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Don Collier wrote: I am just learning PHP from the O'Reilly Learning PHP 5 book and I have a question regarding the formatting of text. Actually it is a couple of questions. First, when I use the \n and run the script from the command line it works great. When I run the same code in a browser it does not put the newline in and the text runs together. I know that I can use br/ to do the same thing, but why is it this way? The second question is closely related to the first. When formatting text using printf the padding works great when running from the command line but not at all when in a browser. Here is the code that I am working with: Browsers **only** support HTML. They do not understand things like \n to be anything special, so they just print as it is sent to the browser. Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, Jan 28, 2009 at 12:05:34PM -0700, Don Collier wrote: I am just learning PHP from the O'Reilly Learning PHP 5 book and I have a question regarding the formatting of text. Actually it is a couple of questions. First, when I use the \n and run the script from the command line it works great. When I run the same code in a browser it does not put the newline in and the text runs together. I know that I can use br/ to do the same thing, but why is it this way? Browser don't break lines on the \n character. They only break on br or p tags. That's just the way it is. You can use the PHP function nl2br() to insert br tags where the \n characters are. The second question is closely related to the first. When formatting text using printf the padding works great when running from the command line but not at all when in a browser. Browsers don't respect multiple spaces, etc., except in between certain tags, like pre/pre. Instead, they combine multiple spaces into a single space and break lines where they like, based on layout. You can use the HTML nbsp; character if you don't want lines or phrases to break at the whim of the browser. If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Paul M Foster wrote: If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. The horror. Do not use tables for layout. Use CSS. Especially now that Microsoft, just this week, is sending out IE 8 which seems to be fully CCS standards compliant. Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, 2009-01-28 at 14:40 -0500, Stephen wrote: Especially now that Microsoft, just this week, is sending out IE 8 which seems to be fully CCS standards compliant. *snigger* I'll believe that when I see it, rather I give it to you oh web developers everywhere, that this is just a new M$ standard of CSS! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Paul M Foster wrote: On Wed, Jan 28, 2009 at 12:05:34PM -0700, Don Collier wrote: I am just learning PHP from the O'Reilly Learning PHP 5 book and I have a question regarding the formatting of text. Actually it is a couple of questions. First, when I use the \n and run the script from the command line it works great. When I run the same code in a browser it does not put the newline in and the text runs together. I know that I can use br/ to do the same thing, but why is it this way? Browser don't break lines on the \n character. They only break on br or p tags. That's just the way it is. You can use the PHP function nl2br() to insert br tags where the \n characters are. The second question is closely related to the first. When formatting text using printf the padding works great when running from the command line but not at all when in a browser. Browsers don't respect multiple spaces, etc., except in between certain tags, like pre/pre. Instead, they combine multiple spaces into a single space and break lines where they like, based on layout. You can use the HTML nbsp; character if you don't want lines or phrases to break at the whim of the browser. If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. Paul Thanks to everyone that responded. From what I am seeing in the responses if I plan on using php for command line scripts things get written one way. If, on the other hand, the php is written for a web page it gets written a slightly different way inserting html where necessary for formatting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, Jan 28, 2009 at 2:58 PM, Don Collier dcoll...@collierclan.comwrote: Paul M Foster wrote: On Wed, Jan 28, 2009 at 12:05:34PM -0700, Don Collier wrote: I am just learning PHP from the O'Reilly Learning PHP 5 book and I have a question regarding the formatting of text. Actually it is a couple of questions. First, when I use the \n and run the script from the command line it works great. When I run the same code in a browser it does not put the newline in and the text runs together. I know that I can use br/ to do the same thing, but why is it this way? Browser don't break lines on the \n character. They only break on br or p tags. That's just the way it is. You can use the PHP function nl2br() to insert br tags where the \n characters are. The second question is closely related to the first. When formatting text using printf the padding works great when running from the command line but not at all when in a browser. Browsers don't respect multiple spaces, etc., except in between certain tags, like pre/pre. Instead, they combine multiple spaces into a single space and break lines where they like, based on layout. You can use the HTML nbsp; character if you don't want lines or phrases to break at the whim of the browser. If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. Paul Thanks to everyone that responded. From what I am seeing in the responses if I plan on using php for command line scripts things get written one way. If, on the other hand, the php is written for a web page it gets written a slightly different way inserting html where necessary for formatting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Not quite true in a properly layered application. Separating the data from the display (whatever that is) is prime idea behind the MVC (Model View Controller) design pattern. This way your code that runs via the CLI (command line) can produce the same data as the code that gets the data for the HTML. The only difference is what you plan to do with that data. You could feed it to a controller and let the controller feed it to a View to render in a browser, or send it to a FileOutput class to create a file of the data for comsumption by another resource. -- Bastien Cat, the other other white meat
Re: [PHP] New to PHP question
2009/1/28 Stephen stephe...@rogers.com: Don Collier wrote: I am just learning PHP from the O'Reilly Learning PHP 5 book and I have a question regarding the formatting of text. Actually it is a couple of questions. First, when I use the \n and run the script from the command line it works great. When I run the same code in a browser it does not put the newline in and the text runs together. I know that I can use br/ to do the same thing, but why is it this way? The second question is closely related to the first. When formatting text using printf the padding works great when running from the command line but not at all when in a browser. Here is the code that I am working with: Browsers **only** support HTML. They do not understand things like \n to be anything special, so they just print as it is sent to the browser. ?php header('Content-Type: text/plain'); echo That's\n; echo Not\n; echo Entirely\n; echo Accurate.; ? -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Don Collier wrote: From what I am seeing in the responses if I plan on using php for command line scripts things get written one way. If, on the other hand, the php is written for a web page it gets written a slightly different way inserting html where necessary for formatting. No, the scripts are written the same way, but you are using two different output media, so your output must be different. Like Stuart said - if you want your browser to output in text-mode, just set the right header-type. (text/plain). /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, Jan 28, 2009 at 02:40:55PM -0500, Stephen wrote: Paul M Foster wrote: If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. The horror. Do not use tables for layout. Use CSS. Especially now that Microsoft, just this week, is sending out IE 8 which seems to be fully CCS standards compliant. I'm happy to be a Luddite in this area. We've been doing websites for about ten years, and have yet to find it either simple or easy to get exact, gracefully-degrading layouts with CSS. (We use CSS for all kinds of nifty things, but not to line things up properly.) Hey, I've got an idea. If someone knows of one of these uber-web-design authorities who writes books touting the superiority of CSS over tables, have them write a book showing us all how it's done [easily]. I'll be first in line to buy it, because I agree that page layout is not the original proper use of tables. Paul PS: I have to snicker as well anytime Microsoft says they're compliant with *any* standard. Their history speaks for itself; why should we believe them now? -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, Jan 28, 2009 at 03:06:36PM -0500, Bastien Koert wrote: On Wed, Jan 28, 2009 at 2:58 PM, Don Collier dcoll...@collierclan.comwrote: On Wed, Jan 28, 2009 at 12:05:34PM -0700, Don Collier wrote: I am just learning PHP from the O'Reilly Learning PHP 5 book and I have a question regarding the formatting of text. Actually it is a couple of questions. First, when I use the \n and run the script from the command line it works great. When I run the same code in a browser it does not put the newline in and the text runs together. I know that I can use br/ to do the same thing, but why is it this way? snip Thanks to everyone that responded. From what I am seeing in the responses if I plan on using php for command line scripts things get written one way. If, on the other hand, the php is written for a web page it gets written a slightly different way inserting html where necessary for formatting. snip Not quite true in a properly layered application. Separating the data from the display (whatever that is) is prime idea behind the MVC (Model View Controller) design pattern. This way your code that runs via the CLI (command line) can produce the same data as the code that gets the data for the HTML. The only difference is what you plan to do with that data. You could feed it to a controller and let the controller feed it to a View to render in a browser, or send it to a FileOutput class to create a file of the data for comsumption by another resource. See? This is what I'm talking about. *I* understand what you're saying, Don, and I agree. But this guy is just learning PHP from what is arguably not one of the best books on PHP (IMO). And you're throwing MVC at him. Let him master the subtleties of the language first, then we'll give him the MVC speech. Yes, I know, they should learn proper programming practices from the beginning, blah blah blah. But think back to the first programming language you ever learned, when you were first learning it. If someone had thrown stuff like this at you, would you have had a clue? I had enough trouble just learning the proper syntax and library routines for Dartmouth BASIC and Pascal, without having to deal with a lot of metaprogramming stuff. This is the problem when you get newbies asking questions on a list whose membership includes hardcore gurus. The gurus look at things in such a lofty way that answering simple questions at the level of a beginner sounds like a dissertation on the subtleties of Spanish art in the 1500s. Just my opinion. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Is there any advantage to using CSS over table and would it be idea to go to past website and change them. /Ernie - Original Message - From: Stephen stephe...@rogers.com Newsgroups: php.general To: Paul M Foster pa...@quillandmouse.com Cc: php-general@lists.php.net Sent: Wednesday, January 28, 2009 2:40 PM Subject: Re: [PHP] New to PHP question Paul M Foster wrote: If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. The horror. Do not use tables for layout. Use CSS. Especially now that Microsoft, just this week, is sending out IE 8 which seems to be fully CCS standards compliant. Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, Jan 28, 2009 at 3:28 PM, Paul M Foster pa...@quillandmouse.comwrote: On Wed, Jan 28, 2009 at 03:06:36PM -0500, Bastien Koert wrote: On Wed, Jan 28, 2009 at 2:58 PM, Don Collier dcoll...@collierclan.com wrote: On Wed, Jan 28, 2009 at 12:05:34PM -0700, Don Collier wrote: I am just learning PHP from the O'Reilly Learning PHP 5 book and I have a question regarding the formatting of text. Actually it is a couple of questions. First, when I use the \n and run the script from the command line it works great. When I run the same code in a browser it does not put the newline in and the text runs together. I know that I can use br/ to do the same thing, but why is it this way? snip Thanks to everyone that responded. From what I am seeing in the responses if I plan on using php for command line scripts things get written one way. If, on the other hand, the php is written for a web page it gets written a slightly different way inserting html where necessary for formatting. snip Not quite true in a properly layered application. Separating the data from the display (whatever that is) is prime idea behind the MVC (Model View Controller) design pattern. This way your code that runs via the CLI (command line) can produce the same data as the code that gets the data for the HTML. The only difference is what you plan to do with that data. You could feed it to a controller and let the controller feed it to a View to render in a browser, or send it to a FileOutput class to create a file of the data for comsumption by another resource. See? This is what I'm talking about. *I* understand what you're saying, Don, and I agree. But this guy is just learning PHP from what is arguably not one of the best books on PHP (IMO). And you're throwing MVC at him. Let him master the subtleties of the language first, then we'll give him the MVC speech. Yes, I know, they should learn proper programming practices from the beginning, blah blah blah. But think back to the first programming language you ever learned, when you were first learning it. If someone had thrown stuff like this at you, would you have had a clue? I had enough trouble just learning the proper syntax and library routines for Dartmouth BASIC and Pascal, without having to deal with a lot of metaprogramming stuff. This is the problem when you get newbies asking questions on a list whose membership includes hardcore gurus. The gurus look at things in such a lofty way that answering simple questions at the level of a beginner sounds like a dissertation on the subtleties of Spanish art in the 1500s. Just my opinion. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Paul, You make a valid point, but I suggest that once you get beyonds the basics of programming (loops, if then else, do while etc) and granted that I do not know where the OP sits in this area, it would have saved me many hours of frustration, having to unlearn what I know and force feed myself a new paradigm. To me its kind of 6 of one and half a dozen of the other...but the requirement is having that basic programming knowledge that gives a solid foundation to any language. My 2 cents... -- Bastien Cat, the other other white meat
Re: [PHP] New to PHP question
Paul M Foster wrote: See? This is what I'm talking about. *I* understand what you're saying, Don, and I agree. But this guy is just learning PHP from what is arguably not one of the best books on PHP (IMO). And you're throwing MVC at him. Let him master the subtleties of the language first, then we'll give him the MVC speech. Yes, I know, they should learn proper programming practices from the beginning, blah blah blah. But think back to the first programming language you ever learned, when you were first learning it. If someone had thrown stuff like this at you, would you have had a clue? I had enough trouble just learning the proper syntax and library routines for Dartmouth BASIC and Pascal, without having to deal with a lot of metaprogramming stuff. This is the problem when you get newbies asking questions on a list whose membership includes hardcore gurus. The gurus look at things in such a lofty way that answering simple questions at the level of a beginner sounds like a dissertation on the subtleties of Spanish art in the 1500s. Just my opinion. Paul On that note, what would be a better book to learn from? I have always been a fan of the O'Reilly books, but I am open to differing flavors of kool-aid. One can never have too many resources. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Don Collier dcoll...@collierclan.com wrote in message news:4980c3d3.8040...@collierclan.com... Paul M Foster wrote: See? This is what I'm talking about. *I* understand what you're saying, Don, and I agree. But this guy is just learning PHP from what is arguably not one of the best books on PHP (IMO). And you're throwing MVC at him. Let him master the subtleties of the language first, then we'll give him the MVC speech. Yes, I know, they should learn proper programming practices from the beginning, blah blah blah. But think back to the first programming language you ever learned, when you were first learning it. If someone had thrown stuff like this at you, would you have had a clue? I had enough trouble just learning the proper syntax and library routines for Dartmouth BASIC and Pascal, without having to deal with a lot of metaprogramming stuff. This is the problem when you get newbies asking questions on a list whose membership includes hardcore gurus. The gurus look at things in such a lofty way that answering simple questions at the level of a beginner sounds like a dissertation on the subtleties of Spanish art in the 1500s. Just my opinion. Paul On that note, what would be a better book to learn from? I have always been a fan of the O'Reilly books, but I am open to differing flavors of kool-aid. One can never have too many resources. First of all...for **insert deities name here** sake don't drink the kool-aid! I started with the visual series of books just to get the hang of the rudimentry language, and then went right to the online php manual. www. devguru. com isn't bad, but tends to be a bit sparse on explinations. If you are familliar with any programming language google is your friend. php is pretty close to c for ease of refference so googling for like 'switch php' brings up loads of examples and refs. I still don't know anything about this pear, or other frameworks they speak of on here, but I'm sure I will learn it in time. :) Personally I think French art from the 1500's was better any way. Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, 2009-01-28 at 13:45 -0700, Don Collier wrote: Paul M Foster wrote: See? This is what I'm talking about. *I* understand what you're saying, Don, and I agree. But this guy is just learning PHP from what is arguably not one of the best books on PHP (IMO). And you're throwing MVC at him. Let him master the subtleties of the language first, then we'll give him the MVC speech. Yes, I know, they should learn proper programming practices from the beginning, blah blah blah. But think back to the first programming language you ever learned, when you were first learning it. If someone had thrown stuff like this at you, would you have had a clue? I had enough trouble just learning the proper syntax and library routines for Dartmouth BASIC and Pascal, without having to deal with a lot of metaprogramming stuff. This is the problem when you get newbies asking questions on a list whose membership includes hardcore gurus. The gurus look at things in such a lofty way that answering simple questions at the level of a beginner sounds like a dissertation on the subtleties of Spanish art in the 1500s. Just my opinion. Paul On that note, what would be a better book to learn from? I have always been a fan of the O'Reilly books, but I am open to differing flavors of kool-aid. One can never have too many resources. I agree with your choice; never seen a bad O'Reilly book yet. Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, 2009-01-28 at 15:17 -0500, Paul M Foster wrote: On Wed, Jan 28, 2009 at 02:40:55PM -0500, Stephen wrote: Paul M Foster wrote: If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. The horror. Do not use tables for layout. Use CSS. Especially now that Microsoft, just this week, is sending out IE 8 which seems to be fully CCS standards compliant. I'm happy to be a Luddite in this area. We've been doing websites for about ten years, and have yet to find it either simple or easy to get exact, gracefully-degrading layouts with CSS. (We use CSS for all kinds of nifty things, but not to line things up properly.) Hey, I've got an idea. If someone knows of one of these uber-web-design authorities who writes books touting the superiority of CSS over tables, have them write a book showing us all how it's done [easily]. I'll be first in line to buy it, because I agree that page layout is not the original proper use of tables. Paul PS: I have to snicker as well anytime Microsoft says they're compliant with *any* standard. Their history speaks for itself; why should we believe them now? -- Paul M. Foster I use CSS as much as possible, and it's second nature to me now to design with CSS rather than tables, but the only area I find it quicker to use tables is when I design forms. I know I'm going to browser hell, but meh, I can deal with it! :p Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, 2009-01-28 at 15:33 -0500, Ernie Kemp wrote: Is there any advantage to using CSS over table and would it be idea to go to past website and change them. /Ernie - Original Message - From: Stephen stephe...@rogers.com Newsgroups: php.general To: Paul M Foster pa...@quillandmouse.com Cc: php-general@lists.php.net Sent: Wednesday, January 28, 2009 2:40 PM Subject: Re: [PHP] New to PHP question Paul M Foster wrote: If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. The horror. Do not use tables for layout. Use CSS. Especially now that Microsoft, just this week, is sending out IE 8 which seems to be fully CCS standards compliant. Stephen Some browsers (IE) need the entire table to load before it can begin to display it. Note this is only the whole table, not it's contents, so it may appear to jump around as images, etc load in. Also, pages with lots and lots of nested tables do render slightly more slowly, but these at worst is going to be a second or two. Tables are great for tabular layout, but divs when used properly an be a lot more flexible and forgiving. Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, Jan 28, 2009 at 1:26 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: I use CSS as much as possible, and it's second nature to me now to design with CSS rather than tables, but the only area I find it quicker to use tables is when I design forms. I know I'm going to browser hell, but meh, I can deal with it! :p I've had the same pain. If I want to get something up quick, I wind up doing it in tables. I have some basic CSS templates I can get up, but for forms and some other things I wind up tweaking things over and over; with tables it's just done and I can move on. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP question
-Original Message- From: Stephen [mailto:stephe...@rogers.com] Sent: Wednesday, January 28, 2009 1:41 PM To: Paul M Foster Cc: php-general@lists.php.net Subject: Re: [PHP] New to PHP question Paul M Foster wrote: If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. The horror. Do not use tables for layout. Use CSS. Especially now that Microsoft, just this week, is sending out IE 8 which seems to be fully CCS standards compliant. Your high horse--get off of it. Are you not familiar with div-itis? If I need to represent data in a grid-style layout, I am going to use a table every time instead of making tons of div elements and tying them into the appropriate CSS. http://www.giveupandusetables.com Also... as far as I know, XHTML 1.0 Strict and XHTML 1.1 still include the table tags. I can understand wanting to separate style from structure, but I think that tables are more structural than stylish. You have to draw the line somewhere. If you're displaying tabular data, use a table. If you just want stuff to be in a grid and the structure has no bearing on the content, then it's time to weigh in. Finally, just because IE8 is (supposed to be) fully CSS standards compliant doesn't mean anything for IE7, IE6, IE5, etc. // Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Boyd, Todd M. wrote: -Original Message- From: Stephen [mailto:stephe...@rogers.com] Sent: Wednesday, January 28, 2009 1:41 PM To: Paul M Foster Cc: php-general@lists.php.net Subject: Re: [PHP] New to PHP question Paul M Foster wrote: If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. The horror. Do not use tables for layout. Use CSS. Especially now that Microsoft, just this week, is sending out IE 8 which seems to be fully CCS standards compliant. Your high horse--get off of it. Are you not familiar with div-itis? If I need to represent data in a grid-style layout, I am going to use a table every time instead of making tons of div elements and tying them into the appropriate CSS. http://www.giveupandusetables.com Also... as far as I know, XHTML 1.0 Strict and XHTML 1.1 still include the table tags. I can understand wanting to separate style from structure, but I think that tables are more structural than stylish. You have to draw the line somewhere. If you're displaying tabular data, use a table. If you just want stuff to be in a grid and the structure has no bearing on the content, then it's time to weigh in. Finally, just because IE8 is (supposed to be) fully CSS standards compliant doesn't mean anything for IE7, IE6, IE5, etc. // Todd Or firefox for that matter. I tried to do a completely css site and when I got it looking great in ff/linux, it looked horrible in IE. Then when it looked better in IE and better in ff/linux, it had some issues iin ff/windows. I love tables and will use them for most layouts until they are removed from (x)html :-) -Shawn -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Boyd, Todd M. wrote: The horror. Do not use tables for layout. Use CSS. Especially now that Microsoft, just this week, is sending out IE 8 which seems to be fully CCS standards compliant. Your high horse--get off of it. Dude! Did you read what I wrote? I wrote do not use tables for layout! Are you not familiar with div-itis? If I need to represent data in a grid-style layout, I am going to use a table every time instead of making tons of div elements and tying them into the appropriate CSS. It you have tabular data to present, use HTML tables! That is what they are for. But use CSS to format the table. Finally, just because IE8 is (supposed to be) fully CSS standards compliant doesn't mean anything for IE7, IE6, IE5, etc. Microsoft is pushing IE 8 with their bug fix process. Not a bad idea to include a little JS to warm users with IE8 to upgrade. Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP question
-Original Message- From: Stephen [mailto:stephe...@rogers.com] Sent: Wednesday, January 28, 2009 4:40 PM Cc: php-general@lists.php.net Subject: Re: [PHP] New to PHP question Boyd, Todd M. wrote: Finally, just because IE8 is (supposed to be) fully CSS standards compliant doesn't mean anything for IE7, IE6, IE5, etc. Microsoft is pushing IE 8 with their bug fix process. Not a bad idea to include a little JS to warm users with IE8 to upgrade. If you're going to go that far, just ask them to install a worthwhile browser. :P It's sad, but the burden falls on us web developers to remain backwards-compatible (at least until EOL of the particular browser(s) in question). Personally, I look at that in the same light as I do pages that have a disclaimer at the bottom that says, Best viewed in SomeResolution with SomeBrowser. I understand that the programmer didn't want to go through the nightmare of getting it to work across-the-board, but your typical site visitor is going to look at that and frown. Also, with that in mind, remember that Microsoft does not design their web browser line with efficiency or speed of execution in mind. With each iterative release, there is more feature bloat, more memory required, and more processor cycles used up. Older PCs may very well be stuck with IE6. This may not be your target market, but it's something to consider. This is just my opinion... but I know I'm not alone. // Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, Jan 28, 2009 at 01:45:07PM -0700, Don Collier wrote: On that note, what would be a better book to learn from? I have always been a fan of the O'Reilly books, but I am open to differing flavors of kool-aid. One can never have too many resources. The book that sits on my desk and is incredibly dog-eared is _Programming PHP_, also from O'Reilly. The whole back section is a reference on all the PHP functions and some extensions. The front part of the book explains nearly everything about the language. There are some errata in the book, which I've pointed out to O'Reilly, and when in doubt I check the function documentation on the php.net site. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, Jan 28, 2009 at 03:33:19PM -0500, Ernie Kemp wrote: Is there any advantage to using CSS over table and would it be idea to go to past website and change them. If it works, don't fix it. If you want to take the time to figure out how to get those same layouts in CSS, have a blast. But as you can see here from other replies, tables are the simplest choice for a lot of people who work with web pages all the time. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, Jan 28, 2009 at 09:26:10PM +, Ashley Sheridan wrote: snip I use CSS as much as possible, and it's second nature to me now to design with CSS rather than tables, but the only area I find it quicker to use tables is when I design forms. I know I'm going to browser hell, but meh, I can deal with it! :p That's my problem. Almost all the stuff I do is actual tabular data, or forms. Of course, the header and side bars are built with CSS. But the interior data are usually in tables. I've got forms with 50-odd fields in them, and I completely dispair of trying to make it look as good in CSS as it does in tables. Even with tables, I had more experimenting and colspans than you can imagine. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP question
On Wed, 2009-01-28 at 16:05 -0600, Boyd, Todd M. wrote: -Original Message- From: Stephen [mailto:stephe...@rogers.com] Sent: Wednesday, January 28, 2009 1:41 PM To: Paul M Foster Cc: php-general@lists.php.net Subject: Re: [PHP] New to PHP question Paul M Foster wrote: If you want exact layout (columns lined up, etc.), the simplest solution is to use HTML tables. The horror. Do not use tables for layout. Use CSS. Especially now that Microsoft, just this week, is sending out IE 8 which seems to be fully CCS standards compliant. Your high horse--get off of it. Are you not familiar with div-itis? If I need to represent data in a grid-style layout, I am going to use a table every time instead of making tons of div elements and tying them into the appropriate CSS. http://www.giveupandusetables.com Also... as far as I know, XHTML 1.0 Strict and XHTML 1.1 still include the table tags. I can understand wanting to separate style from structure, but I think that tables are more structural than stylish. You have to draw the line somewhere. If you're displaying tabular data, use a table. If you just want stuff to be in a grid and the structure has no bearing on the content, then it's time to weigh in. Finally, just because IE8 is (supposed to be) fully CSS standards compliant doesn't mean anything for IE7, IE6, IE5, etc. // Todd I hate div'itis as well. Some people seem to think it's a big faux pas to use table tags now, when that couldn't be more wrong. Use tables for tabular data, CSS for the rest (with as few exceptions - and there are always some eh - as you can manage.) I've seen people try to rebuild a table of data, that you might represent in a spreadsheet, as a collection of div's. Bad form, as the data has now lost all meaning. This is the same as replacing all your h1 tags with div class=header1 or strong with span class=bold. Silly idea, slap on the wrist, don't do it again. Personally, CSS is my preferred way of working now. I can define a whole bunch of elements, semantically as possible, and then can redefine the look as often as I wish afterwards with CSS. Look at the CSS Zen Garden if you don't believe how useful this is. Rather than going through a bunch of page to replaces tables, or PHP code to change the output layout, you can redefine your CSS to alter the look. It's not a black art, it just needs a little practise. Remember how bad we all were when we first started using HTML? It's exactly the same thing here! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Paul M Foster wrote: On Wed, Jan 28, 2009 at 09:26:10PM +, Ashley Sheridan wrote: snip I use CSS as much as possible, and it's second nature to me now to design with CSS rather than tables, but the only area I find it quicker to use tables is when I design forms. I know I'm going to browser hell, but meh, I can deal with it! :p That's my problem. Almost all the stuff I do is actual tabular data, or forms. Of course, the header and side bars are built with CSS. But the interior data are usually in tables. I've got forms with 50-odd fields in them, and I completely dispair of trying to make it look as good in CSS as it does in tables. Even with tables, I had more experimenting and colspans than you can imagine. Paul see this is why i chant flex flex flex flex flex flex flex flex flex flex flex flex flex drumroll flx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
On Wed, Jan 28, 2009 at 11:41:31PM +, Nathan Rixham wrote: Paul M Foster wrote: On Wed, Jan 28, 2009 at 09:26:10PM +, Ashley Sheridan wrote: snip I use CSS as much as possible, and it's second nature to me now to design with CSS rather than tables, but the only area I find it quicker to use tables is when I design forms. I know I'm going to browser hell, but meh, I can deal with it! :p That's my problem. Almost all the stuff I do is actual tabular data, or forms. Of course, the header and side bars are built with CSS. But the interior data are usually in tables. I've got forms with 50-odd fields in them, and I completely dispair of trying to make it look as good in CSS as it does in tables. Even with tables, I had more experimenting and colspans than you can imagine. Paul see this is why i chant flex flex flex flex flex flex flex flex flex flex flex flex flex drumroll flx Oh, a proprietary protocol and set of tools meant to run on a proprietary platform, built by a company as rapacious as Microsoft, and whose applications can't be mined by search engines? Oh yeah, I'm there. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP question
Paul M Foster wrote: On Wed, Jan 28, 2009 at 01:45:07PM -0700, Don Collier wrote: On that note, what would be a better book to learn from? I have always been a fan of the O'Reilly books, but I am open to differing flavors of kool-aid. One can never have too many resources. The book that sits on my desk and is incredibly dog-eared is _Programming PHP_, also from O'Reilly. The whole back section is a reference on all the PHP functions and some extensions. The front part of the book explains nearly everything about the language. There are some errata in the book, which I've pointed out to O'Reilly, and when in doubt I check the function documentation on the php.net site. Paul I have this Learning PHP 5 and at the same time bought PHP and MySQL also from O'Reilly. Ever since my first Sed and Awk book from them about 10 or so years ago I have been hooked. I do have others in my library but I usually give them a shot first to see if I get what I need. I will have to pick up a copy of the Programming PHP and give it a look. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
There are many places to get help when you need it, but a good place is the unofficial PHP IRC channel. Search on Google for XChat, download it, and connect to ##PHP in irc.freenode.net. Great place and it seriously has helped me once or twice. If you don't know about how to use IRC, search on Google :). The best bet to grasping PHP logic itself is finding small scripts to learn and tamper with. Go to www.hotscripts.com and find some unhelpful scripts from there that you can learn from and modify. Best way of learning PHP really :). If you are only just starting, tizag.com is a good place to learn the basics. Good luck! 2008/10/13 Gary [EMAIL PROTECTED] I am just starting to learn php, and typically I use newsgroups to suppliment the learning process. Does anyone have any sources that you would reccommend to me and is this the best NG for me to monitor?...or is there another you might suggest? Thanks Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
Juan Jose Rosales Rodriguez wrote: He i not speak very good englis, pliss can you tel me abaout list in spanich? News version at news://news.php.net/php.general.es or via http at http://news.php.net/group.php?group=php.general.es Cheers -- David Robley Useless Invention: Self stick frying pan. Today is Boomtime, the 68th day of Bureaucracy in the YOLD 3174. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New to PHP
I am just starting to learn php, and typically I use newsgroups to suppliment the learning process. Does anyone have any sources that you would reccommend to me and is this the best NG for me to monitor?...or is there another you might suggest? Thanks Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New to PHP
Sorry if this is a dup, but I posted and it seemed to get lost I am just learning php, and I like to use newsgroups to suppliment the learning process. Can anyone reccomend a good source for information to a newbie and is this a good forum for my level? or is there another one you might suggest? Thanks Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
On Oct 13, 2008, at 10:01 AM, Gary wrote: Sorry if this is a dup, but I posted and it seemed to get lost I am just learning php, and I like to use newsgroups to suppliment the learning process. Can anyone reccomend a good source for information to a newbie and is this a good forum for my level? or is there another one you might suggest? hi Gary, This is a great place to cut your teeth on php... I was in your boat about a year ago, and came to this list and have learned a ton from people here... And hopefully I've helped a few people as well. One thing that I could suggest if you don't have a project you are working on currently, every time someone posts a question to the list, try and create a solution for it. It not only gets you into the code in significant ways that you are more likely to remember, it gives you one heck of a code library pretty quickly. If you have questions, please feel free to post them, but please make sure to include the code, php version, and the actual error you are seeing. That way we can help you step through it. Thanks Gary! -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 11287 James St Holland, MI 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
Welcome to the list, Gary. On Mon, Oct 13, 2008 at 10:01 AM, Gary [EMAIL PROTECTED] wrote: Sorry if this is a dup, but I posted and it seemed to get lost Both came through. Sometimes it just takes a minute or two, and you shouldn't get a copy of your own message. I am just learning php, and I like to use newsgroups to suppliment the learning process. Can anyone reccomend a good source for information to a newbie and is this a good forum for my level? or is there another one you might suggest? Here and http://www.phpbuilder.com/ are the two resources I recommend most frequently. -- /Daniel P. Brown More full-root dedicated server packages: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
He i not speak very good englis, pliss can you tel me abaout list in spanich? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
Well...thank you all for the warm and friendly welcome, I will probably try to steer one of my projects to php (or at least a portion of) in a short while. One of the things a client wants is a landing page, so I am assuming that php might come in handy for that... Thank you all and once I get in deeper I'm sure I will have a lot of quesitons. Thanks again Gary Daniel Brown [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Welcome to the list, Gary. On Mon, Oct 13, 2008 at 10:01 AM, Gary [EMAIL PROTECTED] wrote: Sorry if this is a dup, but I posted and it seemed to get lost Both came through. Sometimes it just takes a minute or two, and you shouldn't get a copy of your own message. I am just learning php, and I like to use newsgroups to suppliment the learning process. Can anyone reccomend a good source for information to a newbie and is this a good forum for my level? or is there another one you might suggest? Here and http://www.phpbuilder.com/ are the two resources I recommend most frequently. -- /Daniel P. Brown More full-root dedicated server packages: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
Gary [EMAIL PROTECTED] wrote: Well...thank you all for the warm and friendly welcome, I will probably try to steer one of my projects to php (or at least a portion of) in a short while. !-- SNIP -- Gary, one thing to keep in mind is to BOTTOM POST and TRIM your posts. By Bottom Posting (common when on a mailing list or NG) it gives greater context as you read through the previous posts and by the time of getting to where the new response is, it is in sync. No skipping back and forth to read to get the context. Trimming is appropriate when addressing a specific entry or when cutting off Dan's 12 line signature block to reply to a message. ;) And yeah, you'll find a number of us aren't as serious as others may like. :) Welcome to the list. I also keep www.php.net handy and a general rule of thumb when using Firefox if you have the google search plug-in running is to use php: question where question is what you are looking to do. By prefacing the search with php: google tends to give greater responses since it looks for PHP first and then the question. HTH. Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
I don't want to get into a bottom vs top posting debate. Just know that some of us prefer top posting. There's no right/wrong answer to this. Trimming is always good, though. I second the recommendations for this mailing list as a good source (as well as reading what's posted and seeing if you know or can find out the answer) as well as php.net. The online documentation has tons of great code examples. The best way to learn is really by doing. Think of a project or exercise you'd like to try and see if you can do it in PHP. One of the best things you can learn as you go, is when it's appropriate to use PHP and when it isn't. Sometimes you can solve your problems with simple HTML. PHP can be useful in many situations, though. Simple situations to some very complex ones. Also, if you come from a programming background, chances are PHP will accomodate whatever programming style you're used to but also remember that there are so many pre-made functions in PHP to do so many things, you may end up discovering that a function you thought you had to write could be done with a simple PHP command. I worked with a guy once who came from a C programming background. He wrote many functions that he didn't need to because he assumed PHP was as sparse as a real programming language. At any rate, you'll learn tons as you go along and probably look back at your early efforts and say What was I thinking?. Don't worry about it, comes with the territory. -TG - Original Message - From: Wolf [EMAIL PROTECTED] To: Gary [EMAIL PROTECTED] Cc: php-general@lists.php.net Date: Mon, 13 Oct 2008 11:18:08 -0400 Subject: Re: [PHP] New to PHP Gary [EMAIL PROTECTED] wrote: Well...thank you all for the warm and friendly welcome, I will probably try to steer one of my projects to php (or at least a portion of) in a short while. !-- SNIP -- Gary, one thing to keep in mind is to BOTTOM POST and TRIM your posts. By Bottom Posting (common when on a mailing list or NG) it gives greater context as you read through the previous posts and by the time of getting to where the new response is, it is in sync. No skipping back and forth to read to get the context. Trimming is appropriate when addressing a specific entry or when cutting off Dan's 12 line signature block to reply to a message. ;) And yeah, you'll find a number of us aren't as serious as others may like. :) Welcome to the list. I also keep www.php.net handy and a general rule of thumb when using Firefox if you have the google search plug-in running is to use php: question where question is what you are looking to do. By prefacing the search with php: google tends to give greater responses since it looks for PHP first and then the question. HTH. Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
The problem with bottom posting is that if you follow the conversation, you have to scroll to find the new content. I guess if you trim and bottom post it's not so bad. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Wolf wrote: By Bottom Posting (common when on a mailing list or NG) it gives greater context as you read through the previous posts and by the time of getting to where the new response is, it is in sync. No skipping back and forth to read to get the context. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
Micah Gersten [EMAIL PROTECTED] wrote: The problem with bottom posting is that if you follow the conversation, you have to scroll to find the new content. I guess if you trim and bottom post it's not so bad. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Wolf wrote: By Bottom Posting (common when on a mailing list or NG) it gives greater context as you read through the previous posts and by the time of getting to where the new response is, it is in sync. No skipping back and forth to read to get the context. Until very recently, everyone was up to speed and trimmed/bottom posted. It does make for better contextual understanding. Otherwise you have to scroll to the bottom and read UP to make sense of the whole of a Post. Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
Hola. No son los años los que te enseñan sobre la vida, sino como vives en la vida los años Universidad de las Ciencias Informáticas Juan José Rosales Rodriguez Tel: 02366792 (Gr) - 078358458 (UCI) De: Micah Gersten [mailto:[EMAIL PROTECTED] Enviado el: lun 13.10.2008 11:48 Para: PHP General Asunto: Re: [PHP] New to PHP The problem with bottom posting is that if you follow the conversation, you have to scroll to find the new content. I guess if you trim and bottom post it's not so bad. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com http://www.onshore.com/ Wolf wrote: By Bottom Posting (common when on a mailing list or NG) it gives greater context as you read through the previous posts and by the time of getting to where the new response is, it is in sync. No skipping back and forth to read to get the context. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
[snip] I don't want to get into a bottom vs top posting debate. Just know that some of us prefer top posting. There's no right/wrong answer to this. [/snip] Consider how this would read if I posted above your entry. But I have trimmed quite nicely thank you! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
On 13 Oct 2008, at 16:48, Micah Gersten wrote: Wolf wrote: By Bottom Posting (common when on a mailing list or NG) it gives greater context as you read through the previous posts and by the time of getting to where the new response is, it is in sync. No skipping back and forth to read to get the context. The problem with bottom posting is that if you follow the conversation, you have to scroll to find the new content. I guess if you trim and bottom post it's not so bad. The major benefit of bottom posting is providing easy-to-read context to each message. This is important for those of us on many lists, for times when you missed an earlier part of a conversation or when people are reading your messages in archives. At the end of the day it's beneficial to the community at large if each individual message can stand on its own. Judicious trimming and bottom-posting ensures this and makes list archives more valuable as a reference for Googlers. Of course that's just my opinion and I know many people disagree but on this issue discussion is generally pointless since it's a religious bike shed. Praise FSM! -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
On Mon, Oct 13, 2008 at 11:45 AM, TG [EMAIL PROTECTED] wrote: I don't want to get into a bottom vs top posting debate. Just know that some of us prefer top posting. There's no right/wrong answer to this. There is no debate. There is a right and wrong answer. Sometimes people just need a refresher. http://www.php.net/reST/php-src/README.MAILINGLIST_RULES QUOTE: 3. Do not top post. Place your answer underneath anyone you wish to quote and remove any previous comment that is not relevant to your post. This is also addressed in the Netiquette RFC (1855). -- /Daniel P. Brown More full-root dedicated server packages: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Intel 2.4GHz/320/GB/1GB/3TB $74.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
Daniel Brown [EMAIL PROTECTED] wrote: On Mon, Oct 13, 2008 at 11:45 AM, TG [EMAIL PROTECTED] wrote: I don't want to get into a bottom vs top posting debate. Just know that some of us prefer top posting. There's no right/wrong answer to this. There is no debate. There is a right and wrong answer. Sometimes people just need a refresher. http://www.php.net/reST/php-src/README.MAILINGLIST_RULES QUOTE: 3. Do not top post. Place your answer underneath anyone you wish to quote and remove any previous comment that is not relevant to your post. This is also addressed in the Netiquette RFC (1855). See, and when you reply, make sure to cut the 10 lines of dan's sig file off. Well said Dan! :) Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
-Original Message- From: Micah Gersten [mailto:[EMAIL PROTECTED] Sent: Monday, October 13, 2008 10:49 AM To: PHP General Subject: Re: [PHP] New to PHP The problem with bottom posting is that if you follow the conversation, you have to scroll to find the new content. I guess if you trim and bottom post it's not so bad. Wolf wrote: By Bottom Posting (common when on a mailing list or NG) it gives greater context as you read through the previous posts and by the time of getting to where the new response is, it is in sync. No skipping back and forth to read to get the context. The list, however, disagrees with you: 3. Do not top post. Place your answer underneath anyone you wish to quote and remove any previous comment that is not relevant to your post. That is taken from http://us3.php.net/reST/php-src/README.MAILINGLIST_RULES . Sure, it's labeled as more of a guideline... but it is irrefutable proof that yes, the mailing list rules DO discuss top posting--and they frown on it. As for having to scroll to read the new content--first of all, you sound very lazy. Second of all, it shouldn't be that big of a deal if people are properly trimming their messages. I might also note: 7. Please configure your email client to use a real name and keep message signatures to a maximum of 2 lines if at all necessary. *cough* ;) Todd Boyd Web Programmer
RE: [PHP] New to PHP
Ok thank you, i try learn yor post, and make meny aport, for the list, apologize me for my english, i am new in this theme but in php i have experience. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
The problem with pointing out the pros and cons is that it will lead to another holy war. :) - Original Message - From: Micah Gersten [EMAIL PROTECTED] To: PHP General php-general@lists.php.net Date: Mon, 13 Oct 2008 10:48:34 -0500 Subject: Re: [PHP] New to PHP The problem with bottom posting is that if you follow the conversation, you have to scroll to find the new content. I guess if you trim and bottom post it's not so bad. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Wolf wrote: By Bottom Posting (common when on a mailing list or NG) it gives greater context as you read through the previous posts and by the time of getting to where the new response is, it is in sync. No skipping back and forth to read to get the context. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New To PHP
On Tue, February 20, 2007 7:11 pm, Larry Chu wrote: I am new to php and was trying to view the code below. I do see in my browser the question that is being asked, but for some reason the answer is not displayed. I am copying this from a book and am sure I have typed everything as it should be typed. Can you please tell mw what might be wrong? Thank you. html headbasefont face=Arial/head body h2Q: This Creature can change color to blend in with its surroundings. What is its name?/h2 ?php // print output echo 'h2iA: Chameleon/i/h2'; ? /body /html If you do View Source in your browser, do you see the ?php bit? If so, then you have not installed PHP correctly. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New To PHP
I am new to php and was trying to view the code below. I do see in my browser the question that is being asked, but for some reason the answer is not displayed. I am copying this from a book and am sure I have typed everything as it should be typed. Can you please tell mw what might be wrong? Thank you. html headbasefont face=Arial/head body h2Q: This Creature can change color to blend in with its surroundings. What is its name?/h2 ?php // print output echo 'h2iA: Chameleon/i/h2'; ? /body /html
Re: [PHP] New To PHP
Does your server support php? Also, some hosting services require that any file with php in it must end with .php ... At least, those are my two guesses... Larry Chu wrote: html headbasefont face=Arial/head body h2Q: This Creature can change color to blend in with its surroundings. What is its name?/h2 ?php // print output echo 'h2iA: Chameleon/i/h2'; ? /body /html -- Mike Shanley ~you are almost there~ A new eye opens on March 5. -Omniversalism.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New To PHP
Are you opening the .php file directly with your browser or via a web server? Does the web server have PHP support, and is it enabled? (PHP is server side, not browser side). Try creating the simple file on the webserver phpinfo.php containing just - ?php phpinfo(); ? - This should look something like http://66.225.219.162/~rvadmin/phpinfo.php when opened via your web server. David -- Original Message -- Date: Tue, 20 Feb 2007 17:11:22 -0800 (PST) From: Larry Chu [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] New To PHP I am new to php and was trying to view the code below. I do see in my browser the question that is being asked, but for some reason the answer is not displayed. I am copying this from a book and am sure I have typed everything as it should be typed. Can you please tell mw what might be wrong? Thank you. html headbasefont face=Arial/head body h2Q: This Creature can change color to blend in with its surroundings. What is its name?/h2 ?php // print output echo 'h2iA: Chameleon/i/h2'; ? /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
[snip] I use Xampp because I'm new to all of this also, and it makes setup a breeze. http://www.apachefriends.org/en/ This installs Apache, mysql, php, pearl, ftpzilla, all kinds of stuff, already configured and ready to rock. It doesn't get any easier. [/snip] Here is another one that works well http://www.devside.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New to PHP
I mentioned earlier that I recently switched my site over to PHP. I had a couple of reasons for this: 1: I was using Server Side Includes, and had been told that PHP includes were better and definitely more popular. 2: I began sending out a newsletter which was written by someone else in PHP. I am beginning to wonder if this was a good idea. I can no longer preview my pages without uploading the files to the server. This can really become a problem when I am making slight formatting changes to my CSS file where I need to refresh the page every few seconds until I get the look just right. Is it really worth changing all the files to PHP files and using includes? Is there any way around this, or am I stuck uploading?? Thanks, Jedidiah
Re: [PHP] New to PHP
You can always install Apache+PHP on your box to try it whenever you want... -- Esú - http://esu.proyectoanonimo.com http://www.proyectoanonimo.com
Re: [PHP] New to PHP
I have a local web server running on my development PC, with an exact copy of all my sites stored locally, so I can develop and test as I go, only uploading when I know everything is 100%. For Windows machines, you can choose IIS or Apache, although I'd recommend you go with whatever your web server is running. Geoff. On 19 Jan 2006 at 16:02, Jedidiah wrote: I mentioned earlier that I recently switched my site over to PHP. I had a couple of reasons for this: 1: I was using Server Side Includes, and had been told that PHP includes were better and definitely more popular. 2: I began sending out a newsletter which was written by someone else in PHP. I am beginning to wonder if this was a good idea. I can no longer preview my pages without uploading the files to the server. This can really become a problem when I am making slight formatting changes to my CSS file where I need to refresh the page every few seconds until I get the look just right. Is it really worth changing all the files to PHP files and using includes? Is there any way around this, or am I stuck uploading?? Thanks, Jedidiah !DSPAM:43d01a9147492034818120! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
I use Xampp because I'm new to all of this also, and it makes setup a breeze. http://www.apachefriends.org/en/ This installs Apache, mysql, php, pearl, ftpzilla, all kinds of stuff, already configured and ready to rock. It doesn't get any easier. Mike - Original Message - From: Jesús Fernández Cc: php-general@lists.php.net Sent: Thursday, January 19, 2006 2:05 PM Subject: Re: [PHP] New to PHP You can always install Apache+PHP on your box to try it whenever you want... -- Esú - http://esu.proyectoanonimo.com http://www.proyectoanonimo.com
Re: [PHP] New to PHP
On Thu, January 19, 2006 4:02 pm, Jedidiah wrote: I mentioned earlier that I recently switched my site over to PHP. I had a couple of reasons for this: 1: I was using Server Side Includes, and had been told that PHP includes were better and definitely more popular. 2: I began sending out a newsletter which was written by someone else in PHP. I am beginning to wonder if this was a good idea. I can no longer preview my pages without uploading the files to the server. This can really become a problem when I am making slight formatting changes to my CSS file where I need to refresh the page every few seconds until I get the look just right. Is it really worth changing all the files to PHP files and using includes? Is there any way around this, or am I stuck uploading?? Several options spring to mind. #1. Install Apache (free) and PHP (free) and MySQL (free) on your desktop where you build your pages. You'll have your own little Intranet with one (1) server (your computer) and one client (your comupter) and one user (you). You can then test to your heart's content all kinds of fun stuff in your page and have no worry that anybody but you will be affected. This is a pretty standard development model. Most PHP developers do this because it's quite easy, and you can then work with any new technology you want without worrying about it crashing the real server. If you have a laptop, you can also then work anywhere at all. #2. Consider using a template library such as Smarty so that your Template files can be viewed/edited independently of the program logic, so that CSS changes aren't affected as much by PHP, and you MIGHT be able to skip #1... But you probably shouldn't. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
I hope you like it. Inside your xampp folder, wherever you installed it to, you will find a folder named htdocs, which is where apache holds your site as far as I can tell. So if you were to to create a new php page named newpage.php inside your htdocs folder, you can view it in a browser by typing http://localhost/newpage.php or else http://127.0.0.1/newpage.php then refresh that as you change little details to your css or php code or whatever. Localhost or 127.0.0.1 is your server on your computer. Good luck! Mike - Original Message - From: Jedidiah To: 'Mike Rondeau' Sent: Thursday, January 19, 2006 3:46 PM Subject: RE: [PHP] New to PHP Thanks, I just downloaded this. It looks pretty great. How does it work? Do I have to specify a path on my computer to be the server and move files to that server? Thanks. Jedidiah -Original Message- From: Mike Rondeau [mailto:[EMAIL PROTECTED] Sent: Thursday, January 19, 2006 4:37 PM To: php-general@lists.php.net Subject: Re: [PHP] New to PHP I use Xampp because I'm new to all of this also, and it makes setup a breeze. http://www.apachefriends.org/en/ This installs Apache, mysql, php, pearl, ftpzilla, all kinds of stuff, already configured and ready to rock. It doesn't get any easier. Mike
[PHP] New Free PHP Framework: Lampshade
Hi everyone, We've been charging for our PHP framework, Lampshade, for a long time, but we just decided to make it free for personal and academic use: http://www.thinkcomputer.com/corporate/news/pressreleases.html?id=22 If you have any questions or would like a copy for yourself, let me know. Thanks, Aaron Aaron Greenspan President CEO Think Computer Corporation http://www.thinkcomputer.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] new to php question
I'm new to php but want to use it for a music club's website I'm working on. Specifically, I want to create an online form that the booking agent can fill out with information like Date, Time, Cover Charge, Band Name, Description, etc and have this data populate the calendar page in chronological order. For an example of what I'm trying to do check out: http://www.schubas.com/calendar.asp Any suggestions? Thanks for your help, Luke http://www.brindleybrothers.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] new to php question
Luke Brindley mailto:[EMAIL PROTECTED] on Wednesday, March 10, 2004 10:37 AM said: Specifically, I want to create an online form that the booking agent can fill out with information like Date, Time, Cover Charge, Band Name, Description, etc and have this data populate the calendar page in chronological order. [snip] Any suggestions? are you looking for a premade app or did you have a specific question? here are some things to think about. 1. do you know how to create a database? 2. do you know how to write SQL queries? 3. do you know how to retrieve data from a database with php? if you answered no to any of those questions you are probably not ready to create such a thing. otherwise, ask a more specific question and we will try to help you out. hth, chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New Orleans PHP Users Group
With all the talk about local php user groups, I figured that, When in Rome. So if there are any interested South Louisiana / Mississippi people, let's set something up...off list of course. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New Orleans PHP Users Group
[snip] With all the talk about local php user groups, I figured that, When in Rome. So if there are any interested South Louisiana / Mississippi people, let's set something up...off list of course. [/snip] This makes me homesick! :( When I move back to New Orleans I am there! GEAUX SAINTS! GEAUX LSU! I'll see your Rome and raise you a Central Texas (San Antonio area) PHP Users Group Off-list... TIA! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] new install php not working. Please help.
Folks, I did the fillowing install ./configure --prefix=/www --with-mysql --withmssql=/usr/share/freetds --with -apxs=/www/bin/apxs --enable-track-vars --with-config-file-path=/www/conf When I try access the index..php via the web the file it tries to download. I checked all of the config files and all looks good I can't find out why php will not work. When I search for the php.ini it only brings up a file from the /usr/src/php/php-4.3.3/pear/tests/php.ini Shouldn't this file be in the /etc/ dir? RH 9 Apache 2.0.48 httpd.conf # LoadModule foo_module modules/mod_foo.so LoadModule php4_modulemodules/libphp4.so I can't get php to work.. Thanks for your help. Patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] new install php not working. Please help.
--- Patrick Fowler [EMAIL PROTECTED] wrote: When I try access the index.php via the web the file it tries to download. Try adding this to your httpd.conf: AddType application/x-httpd-php .php Hope that helps. Chris = My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New to PHP form attributes
Hi, I am new to PHP and am more used to JSP. My question is - if I submit a form to a php3 page using action==? PHP_SELF ? for some processing all is well I can see that form data. After the processing the page is redisplayed - but the data originally sent persits (in the request) this can be a pain if the user was to hit the refresh button then the data is submitted to the server again and if for example the php page does an insert into a database then a new row would be created etc... Is this normal behaviour of php and jsp ? I am not sure but I am noticing it now with php ? Should I be clearing the data from the request somehow after I have done my processing? Thanks Matt _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP form attributes
You should use post method for forms that change state on the server, that way the user gets a warning. And you should redirect after processing the form to another page. if($_GET['action']=='submit') { INSERT INTO table VALUES (NULL, '$_GET[input]' header('Location: ...'); } else { form action=? PHP_SELF ??action=submit method=POST input type=text name=input /form } Matthew Oatham wrote: Hi, I am new to PHP and am more used to JSP. My question is - if I submit a form to a php3 page using action==? PHP_SELF ? for some processing all is well I can see that form data. After the processing the page is redisplayed - but the data originally sent persits (in the request) this can be a pain if the user was to hit the refresh button then the data is submitted to the server again and if for example the php page does an insert into a database then a new row would be created etc... Is this normal behaviour of php and jsp ? I am not sure but I am noticing it now with php ? Should I be clearing the data from the request somehow after I have done my processing? Thanks Matt _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP form attributes
--- Matthew Oatham [EMAIL PROTECTED] wrote: I am new to PHP and am more used to JSP. My question is - if I submit a form to a php3 page using action==? PHP_SELF ? for some processing all is well I can see that form data. After the processing the page is redisplayed - but the data originally sent persits (in the request) You need to be more specific here. After the processing, the page is redisplayed? Does this mean you simply generate the appropriate output (using include() perhaps), redirect the user somewhere, the user clicks reload, or what? I would assume the first, but your problem sounds like you are doing something else. if the user was to hit the refresh button then the data is submitted to the server again and if for example the php page does an insert into a database then a new row would be created etc... Now this question comes up a lot. There are many ways around it, and you will probably find more than I can mention by searching the archives. In fact, I'll only give you one suggestion now. If you form, form.php, submits to process.php, you can process the form with process.php and then include a Location header that redirects the user back to form.php: header('Location: http://yoursite.org/form.php'); This type of redirection is transparent to history mechanisms, so even clicking back in the browser won't cause the intermediate page to be displayed. A user who clicks reload will be reloading the form.php page which only generates the HTML form. I recommend searching the archives for other alternatives and choose whichever one seems best to you. Is this normal behaviour of php and jsp? Yes. I am not sure but I am noticing it now with php? Yes, it seems you are noticing it now, thus your question. Hope that helps. Chris = My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
Yes, and also the same Rasmus founder of PHP. From time to time he may even respond to one of you questions. :-) And you're right one of the best ways to learn is to look at other open source code. I've learned how to write efficient code and also learned programming tricks by studying other code. Welcome to the team, -Original Message- From: Ow Mun Heng [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 7:52 PM To: PHP Subject: RE: [PHP] New to PHP Wow.. There's a guy named Rasmus here. Is here(or u) the same person who wrote that book? this is way cool.. Oh.. BTW, PHP Mysql Web Development is GOOD. Also, since a lot of codes are open sourced, Read through them as well. I'm learning through that too. ( this list) Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Ralph [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 9:01 AM To: 'Hiren Mehta'; 'PHP' Subject: RE: [PHP] New to PHP Here are some sites for you to get started: http://www.zend.com/developers.php http://www.phpcomplete.com/tutorials.php http://www.evilwalrus.com/articles.php And for books, here are some excellent books I've come across: Programming PHP By Rasmus Lerdorf Web Application Development with PHP 4.0 by Tobias Ratschiller Professional PHP4 Programming By Deepak Thomas -Original Message- From: Hiren Mehta [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:28 PM To: PHP Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
This is Way Kewl... I'm a part of a team! Long Live Open Source.. I believe that if it were closed sourced, I would need a least 2x the amount of time to learn how to code for someone not from an IT/Programming background. Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Ralph Guzman [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 3:23 AM To: Ow Mun Heng; 'PHP' Subject: RE: [PHP] New to PHP Yes, and also the same Rasmus founder of PHP. From time to time he may even respond to one of you questions. :-) And you're right one of the best ways to learn is to look at other open source code. I've learned how to write efficient code and also learned programming tricks by studying other code. Welcome to the team, -Original Message- From: Ow Mun Heng [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 7:52 PM To: PHP Subject: RE: [PHP] New to PHP Wow.. There's a guy named Rasmus here. Is here(or u) the same person who wrote that book? this is way cool.. Oh.. BTW, PHP Mysql Web Development is GOOD. Also, since a lot of codes are open sourced, Read through them as well. I'm learning through that too. ( this list) Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Ralph [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 9:01 AM To: 'Hiren Mehta'; 'PHP' Subject: RE: [PHP] New to PHP Here are some sites for you to get started: http://www.zend.com/developers.php http://www.phpcomplete.com/tutorials.php http://www.evilwalrus.com/articles.php And for books, here are some excellent books I've come across: Programming PHP By Rasmus Lerdorf Web Application Development with PHP 4.0 by Tobias Ratschiller Professional PHP4 Programming By Deepak Thomas -Original Message- From: Hiren Mehta [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:28 PM To: PHP Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
-Original Message- From: Jeff Harris [mailto:[EMAIL PROTECTED] Sent: 07 July 2003 23:27 After coding for a while, I would suggest that while you're reading through coding excercises, you find a coding style that works for you and keep it consistant. One of the least fun parts of creating your php pages is reading some code that you coded months (years) ago, and it's totally out of style with everything else that you're doing. H'mm, yes -- reminds me of the following, which someone taught me in the dim-and-distant past and I'm constantly quoting to people who don't adequately comment code: Someone else's code: code written by someone else, or code written by you more than 6 months ago. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
Mike Ford wrote: -Original Message- From: Jeff Harris [mailto:[EMAIL PROTECTED] Sent: 07 July 2003 23:27 After coding for a while, I would suggest that while you're reading through coding excercises, you find a coding style that works for you and keep it consistant. One of the least fun parts of creating your php pages is reading some code that you coded months (years) ago, and it's totally out of style with everything else that you're doing. H'mm, yes -- reminds me of the following, which someone taught me in the dim-and-distant past and I'm constantly quoting to people who don't adequately comment code: Someone else's code: code written by someone else, or code written by you more than 6 months ago. And the corollary to is: Most of what constitutes value in commented code is the code itself, which exhibits well-named variables, methods, etc. and well-structured, well-encapsulated algorithms. When code is structured appropriately, then the only actual comments needed are to explain unusual logic or business rules that cannot be easily deciphered from reading the code. Steve -- Steve Magruder Consulting - http://consulting.stevemagruder.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] NEW SPAMMER - [PHP] New Krysalis version released
Didnt we just have a thread about spamming like this on the list? - Original Message - From: Alexandru COSTIN [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 9:22 PM Subject: [PHP] New Krysalis version released Hello, For the ones interested in XML/XSL publishing with PHP, we've just released the Krysalis 2.4.1 version. Includes a lot of features, fixes and performance improvements. Check http://www.interakt.ro/index_news_162.html for more details. Our XML-schema support is being worked right now for inclusion in PEAR - contact us if you want to contribute - we still need some PEARyfication help. Alexandru -- Alexandru COSTIN Chief Operating Officer http://www.interakt.ro/ +4021 312 5312 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
Wow.. There's a guy named Rasmus here. Is here(or u) the same person who wrote that book? this is way cool.. Oh.. BTW, PHP Mysql Web Development is GOOD. Also, since a lot of codes are open sourced, Read through them as well. I'm learning through that too. ( this list) Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Ralph [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 9:01 AM To: 'Hiren Mehta'; 'PHP' Subject: RE: [PHP] New to PHP Here are some sites for you to get started: http://www.zend.com/developers.php http://www.phpcomplete.com/tutorials.php http://www.evilwalrus.com/articles.php And for books, here are some excellent books I've come across: Programming PHP By Rasmus Lerdorf Web Application Development with PHP 4.0 by Tobias Ratschiller Professional PHP4 Programming By Deepak Thomas -Original Message- From: Hiren Mehta [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:28 PM To: PHP Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New to PHP
Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren
RE: [PHP] New to PHP
Hi Hiren, PHP is a great choice, there are a wealth of tutorials on the Internet!!! I would recommend a great book for people like yourself... PHP Fast and Easy by Julie Meloni... You can visit her website at http://www.thickbook.com I have both of her PHP books, and out of the 8 books on PHP hers are the ones I still use the most... Good luck Joe -Original Message- From: Hiren Mehta [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 5:28 PM To: PHP Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
here is what you can do: 1. buy a php book and go throw the basics. 2. read the php manual because it has tons of information. 3. write any type of program that you can to get familiar w/ language. 4. get a fundamental understanding of programming, object oriented programming Just my $0.02 for ya -- BigDog On Mon, 2003-07-07 at 15:27, Hiren Mehta wrote: Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
There are many great books to help get you started. Infact.. believe it or not.. for the complete newbie PHP for Dummies is a great chioce. It's very well written and starts with no assumptions about your skill level. But if you do happen to have some programming experience try PHP and MySQL Web Development (do a search on Amazon). That's the book that helped me out the most. It has some great real-world examples with complete walk-through tutorials. Don't bother purchasing a function reference becuase the php.net reference is the best there is. And it's free. :) HTH, Kevin - Original Message - From: Hiren Mehta [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Monday, July 07, 2003 3:27 PM Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
Do you suggests any pre-requisites before starting off with the books? Someone told me it would be much better if I learn Linux first Hiren - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: Hiren Mehta [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 3:18 AM Subject: Re: [PHP] New to PHP There are many great books to help get you started. Infact.. believe it or not.. for the complete newbie PHP for Dummies is a great chioce. It's very well written and starts with no assumptions about your skill level. But if you do happen to have some programming experience try PHP and MySQL Web Development (do a search on Amazon). That's the book that helped me out the most. It has some great real-world examples with complete walk-through tutorials. Don't bother purchasing a function reference becuase the php.net reference is the best there is. And it's free. :) HTH, Kevin - Original Message - From: Hiren Mehta [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Monday, July 07, 2003 3:27 PM Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php