[PHP] Re: Newbie form question

2013-06-21 Thread Jim Giner
On 6/21/2013 10:09 AM, Karl-Arne Gjersøyen wrote: Hello. I have an application that generete HTML5 form in PHP. The form is written in a while loop and therefore the form field has exact same name for every row in the loop. And that is the problem. Because when my PHP document shall handle

[PHP] Re: Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)

2013-02-15 Thread dealTek
Thanks for all the help folks, PHP-light-PDO-Class ok well I found this... https://github.com/poplax/PHP-light-PDO-Class But it does not seem to recognize the port - I put the port as 8889 but keeps saying can't connect port 3306 Warning: PDO::__construct() [pdo.--construct]: [2002]

[PHP] Re: Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)

2013-02-15 Thread David Robley
dealTek wrote: Thanks for all the help folks, PHP-light-PDO-Class ok well I found this... https://github.com/poplax/PHP-light-PDO-Class But it does not seem to recognize the port - I put the port as 8889 but keeps saying can't connect port 3306 Warning: PDO::__construct()

[PHP] Re: Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)

2013-02-14 Thread dealTek
On Feb 14, 2013, at 9:49 AM, dealTek deal...@gmail.com wrote: Hi everybody, Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD) Simple story: creating this class database by myself is way over my head. So it be best for me to find something on the

Re: [PHP] Re: Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)

2013-02-14 Thread Haluk Karamete
Also worth checking http://justinvincent.com/ezsql Which is the class behind the WordPress' wpdb class. This is a great read too - http://www.devarticles.com/c/a/MySQL/PHP-and-Databases-for-the-Lazy-Sod/ On Thu, Feb 14, 2013 at 10:30 AM, dealTek deal...@gmail.com wrote: On Feb 14, 2013, at

[PHP] Re: newbie date time question

2011-06-22 Thread Shawn McKenzie
On 06/22/2011 09:05 AM, David Nicholls wrote: I'm trying to convert a date and time string using strtotime() The date and time strings are the first entry in each line in a csv file in the form: 22/06/2011 9:47:20 PM, data1, data2,... I've been trying to use the following approach,

[PHP] Re: newbie date time question

2011-06-22 Thread David Nicholls
On 23/06/11 1:35 AM, Shawn McKenzie wrote: On 06/22/2011 09:05 AM, David Nicholls wrote: I'm trying to convert a date and time string using strtotime() The date and time strings are the first entry in each line in a csv file in the form: 22/06/2011 9:47:20 PM, data1, data2,... I've been

[PHP] Re: newbie date time question

2011-06-22 Thread Shawn McKenzie
On 06/22/2011 06:54 PM, David Nicholls wrote: I'm late to the party, but strtotime works great, though you need to give it what it expects: $ts = strtotime(str_replace('/', '-', $date)); Thanks, Shawn, that's a bit more elegant! I'll give it a go. I didn't know how to do the str_relace

[PHP] Re: newbie date time question

2011-06-22 Thread David Nicholls
On 23/06/11 10:04 AM, Shawn McKenzie wrote: On 06/22/2011 06:54 PM, David Nicholls wrote: I'm late to the party, but strtotime works great, though you need to give it what it expects: $ts = strtotime(str_replace('/', '-', $date)); Thanks, Shawn, that's a bit more elegant! I'll give it a

[PHP] Re: Newbie Question about Conditionals

2010-03-31 Thread Shawn McKenzie
Matty Sarro wrote: Hey all! This is probably my second post on the list, so please be gentle. Right now I am running through the Heads First PHP and MySQL book from O'Reilly. It's been quite enjoyable so far, but I have some questions about some of the code they're using in one of the

[PHP] RE: Newbie: can't access a return value.

2009-08-01 Thread MEM
Solved. Forget to assigning the return value of the method to anything. :S Sorry. Márcio -Original Message- From: MEM [mailto:tal...@gmail.com] Sent: sábado, 1 de Agosto de 2009 17:13 To: 'php-general@lists.php.net' Subject: Newbie: can't access a return value. Hi all, When I

[PHP] Re: newbie question - php parsing

2009-07-23 Thread Peter Ford
João Cândido de Souza Neto wrote: You made a mistake in your code: ?php the_title(); ? must be: ?php echo the_title(); ? Not necessarily: what if you have function the_title() { echo Title; } for example... In response to Sebastiano: There would be not much point in using

Re: [PHP] Re: newbie question - php parsing

2009-07-23 Thread Sebastiano Pomata
Thanks, it's now much more clear. I thought that html parts outside php tags were just dumped to output, no matter of if-else statements and other conditions. I was *definitely* wrong 2009/7/23 Peter Ford p...@justcroft.com: In response to Sebastiano: There would be not much point in using

RE: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-22 Thread MEM
As for (1) even in my pre-OO days I was used to using a single generic DAO for all database access. The only time that more than one DAO existed was for a different DBMS engine. This is why I have one DAO class for MySQL, one for PostgreSQL and another for Oracle. If you are

Re: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-22 Thread Tony Marston
MEM tal...@gmail.com wrote in message news:000201ca0a9f$ca3fb110$5ebf13...@com... As for (1) even in my pre-OO days I was used to using a single generic DAO for all database access. The only time that more than one DAO existed was for a different DBMS engine. This is why I have one

RE: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-22 Thread MEM
Thanks a lot Tony. Unfortunately for me, I'm seeing myself in no conditions for properly learning a framework. I want to learn PHP and a framework bring so many concepts at once, that I found extremely complex and time consuming do dig in, at once, right now. Since I have no more than a few months

[PHP] Re: newbie question - php parsing

2009-07-22 Thread Jo�o C�ndido de Souza Neto
You made a mistake in your code: ?php the_title(); ? must be: ?php echo the_title(); ? -- João Cândido de Souza Neto SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS Fone: (0XX41) 3033-3636 - JS www.siens.com.br Sebastiano Pomata lafayett...@gmail.com escreveu na mensagem

Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Shane Hill
2009/7/22 João Cândido de Souza Neto j...@consultorweb.cnt.br You made a mistake in your code: ?php the_title(); ? must be: ?php echo the_title(); ? ?= the_title(); ? also works. -Shane -- João Cândido de Souza Neto SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS Fone: (0XX41) 3033-3636

Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Lenin
Ted Turner http://www.brainyquote.com/quotes/authors/t/ted_turner.html - Sports is like a war without the killing. 2009/7/23 Shane Hill shanehil...@gmail.com 2009/7/22 João Cândido de Souza Neto j...@consultorweb.cnt.br You made a mistake in your code: ?php the_title(); ? must be:

Re: [PHP] Re: newbie question - php parsing

2009-07-22 Thread Martin Scotta
This is how I'd write this snippet ?php if ( 'Home' !== ( $title = the_title('','',FALSE))) { echo 'h2 class=entry-header', $title, '/h2'; } ? On Wed, Jul 22, 2009 at 6:31 PM, Lenin le...@phpxperts.net wrote: Ted Turner

[PHP] Re: newbie question - php parsing

2009-07-22 Thread Shawn McKenzie
João Cândido de Souza Neto wrote: You made a mistake in your code: ?php the_title(); ? must be: ?php echo the_title(); ? I haven't used worpress in a long time, but the the_title() function might echo the title unless you pass the FALSE parameter, in which case it just returns it. --

RE: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread MEM
As for (1) even in my pre-OO days I was used to using a single generic DAO for all database access. The only time that more than one DAO existed was for a different DBMS engine. This is why I have one DAO class for MySQL, one for PostgreSQL and another for Oracle. If you are incapable of

RE: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread MEM
As for (1) even in my pre-OO days I was used to using a single generic DAO for all database access. The only time that more than one DAO existed was for a different DBMS engine. This is why I have one DAO class for MySQL, one for PostgreSQL and another for Oracle. If you are

Re: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread Tony Marston
MEM tal...@gmail.com wrote in message news:002001ca0898$5d183840$1748a8...@com... As for (1) even in my pre-OO days I was used to using a single generic DAO for all database access. The only time that more than one DAO existed was for a different DBMS engine. This is why I have one DAO

RE: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread MEM
Why not? Why can't you replace a call to a mysqli function with a call to a PDO function? It's not just a simple replacement - I need to add bindparam, prepare, execute, placeholders and fetchObject. But I will give it a try... Also, I also intend to use fetchObject method instead of

Re: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread Paul M Foster
On Sun, Jul 19, 2009 at 03:56:43PM +0100, Tony Marston wrote: Two things strike me as wrong with your thinking: (1) The idea that you have a separate DAO for each entity instead of a single generic DAO which can act for any entity in the system. (2) The idea that pagination requires its own

Re: [PHP] Re: Newbie: Composition by Association - PaginationClass general question.

2009-07-19 Thread Tony Marston
Paul M Foster pa...@quillandmouse.com wrote in message news:20090719220923.gv14...@quillandmouse.com... On Sun, Jul 19, 2009 at 03:56:43PM +0100, Tony Marston wrote: Two things strike me as wrong with your thinking: (1) The idea that you have a separate DAO for each entity instead of a

[PHP] Re: Newbie - Setting Up Some Basic Sendmail Scripts

2009-05-05 Thread Maarten Schalekamp
i think you will need to make use of a pear package to be able to do this. pear package: http://pear.php.net/package/Mail examples: http://blog.thekimsfamily.com/archives/3 docs: http://pear.php.net/manual/en/package.mail.mail.factory.php

[PHP] Re: Newbie - Setting Up Some Basic Sendmail Scripts

2009-05-05 Thread Manuel Lemos
Hello, on 05/05/2009 02:20 PM revDAVE said the following: I'm trying to set up some basic php send mail scripts - and I'm curious of the best way to go... I checked these basics out: http://us.php.net/manual/en/function.mail.php And got this code below going, but I'll bet I need a

[PHP] Re: newbie - how to receive/iterate posted arrays

2008-09-01 Thread David Robley
Govinda wrote: Hello early birds, I am going round and round the docs and list posts I saved on this topic... but I am still stumped. Kindly show me what I am missing. I want to simply send an array of vars via a post form to my receiving script. I've got simple inputs like this:

[PHP] Re: newbie - how to receive/iterate posted arrays

2008-09-01 Thread Carlos Medina
Govinda schrieb: Hello early birds, I am going round and round the docs and list posts I saved on this topic... but I am still stumped. Kindly show me what I am missing. I want to simply send an array of vars via a post form to my receiving script. I've got simple inputs like this: input

[PHP] Re: newbie Q: How to say, if the fileNAME is equal to..., or better yet, if the fileNAME ends with '.jpg'?

2008-08-25 Thread Colin Guthrie
Govinda wrote: if (true == ($file=.jpg)) { Watch out for this! You're doing a test that is an assignment.. You are assigning the value .jpg to the variable $file. You are then comparing this to the value true and (due to the loose variable types) this succeeds. Although

[PHP] Re: Newbie - is there a function similar to the sql 'like' comparison operator?

2008-05-09 Thread Colin Guthrie
revDAVE wrote: Newbie - is there a function similar to the sql 'like' comparison operator? I would like to be able to compare 2 strings: If $this ---*like or similar to*--- $that That type of thing... I strongly suggest you read up on regular expressions:

[PHP] Re: Newbie - is there a function similar to the sql 'like' comparisonoperator?

2008-05-08 Thread Shawn McKenzie
revDAVE wrote: Newbie - is there a function similar to the sql 'like' comparison operator? I would like to be able to compare 2 strings: If $this ---*like or similar to*--- $that That type of thing... I know of this page: http://us3.php.net/manual/sl/language.operators.comparison.php But

[PHP] Re: newbie with another HTML/navigation question

2008-04-29 Thread Peter Ford
Rod Clay wrote: I have a php script that is invoked on 2 different occasions: 1) the first to create a page with a form the user will use to input information for a new table row - this form has method=POST 2) the script is run a second time to accept the input from the completed form, add

[PHP] Re: Newbie ' If Statement' Question

2008-03-19 Thread Dan
heredoc is probably the best way to go. There's no way you can mess up your quotes, and you don't have to worry about escaping. Altough I wonder what would happen if you put ? in a heredoc, would it stop processing the php, thinking that it was the end of the php file, or would it just treat

[PHP] Re: Newbie ' If Statement' Question

2008-03-16 Thread Al
Here's how I'd do it. ?php $row= $emp_row-getRecordId();//Or, you can put this inside the heredoc with {} //heredoc $str= txt form name=edit method=post action=emp_edit_result2.php input type=hidden name=Status value=Active / input type=hidden name=The_Date value= / input type=hidden

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread tedd
At 12:56 AM +0100 11/28/07, Jochem Maas wrote: Colin Guthrie wrote: tedd wrote: ... Sorry Tedd, but I'm not sure where the browser sniffing stuff came in. IE and FF both offer a UI to input the user's preferred language, it's an HTTP standard thing and nothign to do with user agents

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jochem Maas
tedd wrote: At 12:56 AM +0100 11/28/07, Jochem Maas wrote: Colin Guthrie wrote: tedd wrote: ... Sorry Tedd, but I'm not sure where the browser sniffing stuff came in. IE and FF both offer a UI to input the user's preferred language, it's an HTTP standard thing and nothign to do

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jeff Benetti
Wow! I love this group, ask and you shall receive. Thanks everyone for the comments and suggestions. The following snippet from Andrés Robinet would actually suit my current project.. define('DEFAULT_LANG_ID', 'en'); function getLanguageId() { // Allow for language id override in

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Colin Guthrie
tedd wrote: At 12:56 AM +0100 11/28/07, Jochem Maas wrote: Colin Guthrie wrote: tedd wrote: ... Sorry Tedd, but I'm not sure where the browser sniffing stuff came in. IE and FF both offer a UI to input the user's preferred language, it's an HTTP standard thing and nothign to do

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jochem Maas
Jeff Benetti wrote: ... Am I correct that if two people are logged on using two different languages that the session var will keep track of the different users (by IP I assume) and the server won’t mess up? yes, the contents of $_SESSION are stored per user. this is tracked by way of a

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Colin Guthrie
Jeff Benetti wrote: Am I correct that if two people are logged on using two different languages that the session var will keep track of the different users (by IP I assume) and the server won’t mess up? Sessions are per-user and are not global (you'd need to use something like memcache or

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread tedd
At 3:01 PM +0100 11/28/07, Jochem Maas wrote: tedd wrote: So, sniffing the browser to determine language isn't the same as browser sniffing -- OK. there is no sniffing of the browser - merely a case of parsing the contents of the Accept-Language header if the browser sent it along with the

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jean-Michel Philippon-Nadeau
Dear Tedd, Dear List, tedd wrote: As for being hung-up -- again, I'm clueless. I mistakenly thought that anything obtained from the browser was subject to suspicion as is any outside data. But apparently you can trust (I realize within certain limits) some things provided by the browser --

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jochem Maas
tedd wrote: At 3:01 PM +0100 11/28/07, Jochem Maas wrote: ... Jochem: This just hasn't been my week -- everyone (long story) thinks I'm being sarcastic when I'm not. ouch! The Sorry, my bad means I apologize, my mistake. How can that be taken as sarcasm? guess it's down to my input

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-28 Thread Jochem Maas
Jean-Michel Philippon-Nadeau wrote: Dear Tedd, Dear List, tedd wrote: As for being hung-up -- again, I'm clueless. I mistakenly thought that anything obtained from the browser was subject to suspicion as is any outside data. But apparently you can trust (I realize within certain limits)

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
Jeff Benetti wrote: I'm a noob so keep the comments to a noob's level please. I am doing a website and my client wants the bulk of the text to be bilingual (French and English). The last site I did used php and mysql so I am getting comfortable with that technology. Typically I am using a

RE: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Bastien Koert
of templating the forms for each language. I would use a folder for each language. hth bastien To: php-general@lists.php.net From: [EMAIL PROTECTED] Date: Tue, 27 Nov 2007 15:18:45 + Subject: [PHP] Re: Newbie asks about multi-lingual website strategies Jeff Benetti wrote: I'm a noob so

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
Jochem Maas wrote: tedd wrote: At 9:37 AM -0400 11/27/07, Jeff Benetti wrote: Any any and all comments are welcome, it will be a learning curve no matter which route I take so a little advice on the best direction pros cons would be great. Thanks, Jeff Jeff: If it were me, I wouldn't

[PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Colin Guthrie
tedd wrote: At 11:05 PM +0100 11/27/07, Jochem Maas wrote: tedd wrote: If it were me, I wouldn't use any problematic browser detects schemes (they don't work) or any of that high-thought stuff -- it's beyond me. whether it's beyond you or not only you can judge, but I disagree that it's

Re: [PHP] Re: Newbie asks about multi-lingual website strategies

2007-11-27 Thread Jochem Maas
Colin Guthrie wrote: tedd wrote: ... Sorry Tedd, but I'm not sure where the browser sniffing stuff came in. IE and FF both offer a UI to input the user's preferred language, it's an HTTP standard thing and nothign to do with user agents string parsing. It uses the Accept-Language header

[PHP] Re: newbie questions

2007-10-21 Thread M. Sokolewicz
Ravi wrote: Guys, I am fairly new to PHP. Here are a few questions, if anybody can answer it will help me get started. Thanks I am trying to build a website and I would like to do the following in my scripts 1. I want to return response to the browser and AFTERWARDS make a log entry in

[PHP] Re: newbie questions

2007-10-21 Thread Ravi
That was very very helpful. Thanks a ton! One more question. For every request, I am sending a redirect back to the user and the browser takes the user to another url. The problem is that the browser is not redirecting until the script finishes. Even if I do flush(), the browser waits til

Re: [PHP] Re: newbie questions

2007-10-21 Thread Richard Heyes
Ravi wrote: That was very very helpful. Thanks a ton! One more question. For every request, I am sending a redirect back to the user and the browser takes the user to another url. The problem is that the browser is not redirecting until the script finishes. Even if I do flush(), the browser

Re: [PHP] Re: newbie questions

2007-10-21 Thread Ravi
Richard, unfortunately I cannot end the script. I need something like this: ?php header('Location: http://www.yahoo.com'); // somehow let the browser move to yahoo.com // now update the database to store some information about user exit; ? Richard Heyes wrote: Ravi wrote:

Re: [PHP] Re: newbie questions

2007-10-21 Thread Richard Heyes
Ravi wrote: Richard, unfortunately I cannot end the script. I need something like this: ?php header('Location: http://www.yahoo.com'); // somehow let the browser move to yahoo.com // now update the database to store some information about user exit; ? In that case you might

Re: [PHP] Re: newbie questions

2007-10-21 Thread Larry Garfield
On Sunday 21 October 2007, Richard Heyes wrote: Ravi wrote: Richard, unfortunately I cannot end the script. I need something like this: ?php header('Location: http://www.yahoo.com'); // somehow let the browser move to yahoo.com // now update the database to store some

[PHP] Re: newbie questions

2007-10-21 Thread Ravi
Maybe you have a point. I will do performance testing and then decide if I should try to optimize to that point. Yes the logging is just one simple insert into the database. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: newbie questions

2007-10-21 Thread Greg Donald
On 10/21/07, Ravi [EMAIL PROTECTED] wrote: Maybe you have a point. I will do performance testing and then decide if I should try to optimize to that point. Yes the logging is just one simple insert into the database. Does your database support some form of INSERT DELAYED ? Like MySQL does:

Re: [PHP] Re: newbie questions

2007-10-21 Thread Larry Garfield
I will bet you money that there are far better places to optimize your application than moving a single SQL insert to after the final output. On Sunday 21 October 2007, Ravi wrote: Maybe you have a point. I will do performance testing and then decide if I should try to optimize to that point.

[PHP] Re: Newbie: special characters in regex?

2007-09-25 Thread Al
Suggest using the hex or oct codes for the special characters. It will save you much heart ache. Here is a great utility http://www.dextronet.com/charprobe.php Zembower, Kevin wrote: I'm trying to modify a string so that it can be used as a Distinguished Name in an LDAP operation.

[PHP] Re: Newbie Question - Form To Email Needed

2007-05-05 Thread itoctopus
1st page: form textarea name='thebody'/texarea /form 2nd page: $str_body = $_POST['thebody']; mail('[EMAIL PROTECTED]', 'This is the subject', $str_body); Of course you can have the email and the subject fields come also from the 1st page. Hope that helps! -- itoctopus -

Re: [PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-25 Thread Stut
Man-wai Chang wrote: create table temp ( big5 char(2) ) character set big5 collate big5_bin; insert into temp ( big5 ) values ( 0x9f54 ); insert into temp ( big5 ) values ( 0x9f53 ); The 2nd query will report duplicated key. How should I fix the problem? What does this has to do with PHP?

[PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-25 Thread Man-wai Chang
queries in the command-line MySQL client. If it works there but not through mysqli_query() then you might have a case for asking here. For the 13081 chinese alphabets I tried, only 1 one failed, and it's 0x9f54. mysqli_query() should have escaped the string for me. So ... I suppose most PHP

Re: [PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-25 Thread Jochem Maas
Man-wai Chang wrote: queries in the command-line MySQL client. If it works there but not through mysqli_query() then you might have a case for asking here. For the 13081 chinese alphabets I tried, only 1 one failed, and it's 0x9f54. mysqli_query() should have escaped the string for me.

[PHP] Re: newbie question about storing big5 codes into mysql-5.0.24a

2007-03-24 Thread Man-wai Chang
create table temp ( big5 char(2) ) character set big5 collate big5_bin; insert into temp ( big5 ) values ( 0x9f54 ); insert into temp ( big5 ) values ( 0x9f53 ); The 2nd query will report duplicated key. How should I fix the problem? What does this has to do with PHP? First of all I don't

[PHP] Re: newbie question

2007-03-21 Thread itoctopus
Means you're passing the variable as reference. This means that any change in the variable inside your function will affect the variable outside your function, in other terms: if you have function myfunc($var){ $var = 5; } $a = 6; myfunc($a); will result in having $a=5 after the function

[PHP] Re: newbie php tutorial question

2006-10-02 Thread zerof
srdaniel escreveu: I setup Apache 2.2.3.0 and PHP 5.1.6.6. When I run this PHP file: html head titlePHP Test/title /head body ?php echo 'pHello World/p'; ? /body /html - Start here: http://www.educar.pro.br/ - zerof -- PHP General

Re: [PHP] Re: Newbie question about ?= ?

2006-09-11 Thread Jon Anderson
Satyam wrote: for ($x=0;$x1000;$x++) { echo ' trtdX is ' , $x , '/td/tr'; } This seems to be a hair faster. I extended the test to 1 requests (still concurrency 10) to make the test a little more reproducible: echo str,var,str did 604.65 requests a second where trtd?= $x ?/td/tr did

Re: [PHP] Re: Newbie question about ?= ?

2006-09-11 Thread Stut
How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Newbie question about ?= ?

2006-09-11 Thread tedd
At 4:56 PM +0100 9/11/06, Stut wrote: How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. -Stut Which begs the question, does it make much of a difference? (not you being bored, but the rather

Re: [PHP] Re: Newbie question about ?= ?

2006-09-11 Thread Satyam
), they are the second best option. Satyam - Original Message - From: Stut [EMAIL PROTECTED] To: Jon Anderson [EMAIL PROTECTED] Cc: Satyam [EMAIL PROTECTED]; php-general@lists.php.net Sent: Monday, September 11, 2006 5:56 PM Subject: Re: [PHP] Re: Newbie question about ?= ? How bored am I? This bored

Re: [PHP] Re: Newbie question about ?= ?

2006-09-11 Thread Stut
Satyam wrote: I admit I'm totally surprised about the buffered results. Nevertheless, may I sugest you add the following to the series of tests?: h3Using line-by-line single-quoted echobr/with comma separated arguments/h3 snip There seems to be one thing rarely anybody remembers,

Re: [PHP] Re: Newbie question about ?= ?

2006-09-11 Thread Stut
tedd wrote: At 4:56 PM +0100 9/11/06, Stut wrote: How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. -Stut Which begs the question, does it make much of a difference? (not you being bored, but

Re: [PHP] Re: Newbie question about ?= ?

2006-09-11 Thread Stut
Jon Anderson wrote: Stut wrote: How bored am I? This bored: http://dev.stut.net/phpspeed/ Server is running PHP 5.1.2 (really should upgrade that) with no caches of any sort. Just looking through the source, could you try changing the first example to put the output all on one line? It's

Re: [PHP] Re: Newbie question about ?= ?

2006-09-11 Thread Satyam
- Original Message - From: Stut [EMAIL PROTECTED] To: Satyam [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Monday, September 11, 2006 6:32 PM Subject: Re: [PHP] Re: Newbie question about ?= ? Satyam wrote: I admit I'm totally surprised about the buffered results

Re: [PHP] Re: Newbie question about ?= ?

2006-09-11 Thread tedd
At 5:36 PM +0100 9/11/06, Stut wrote: tedd wrote: Opinions? I would have to agree. Having watched the server CPU load while playing with this test script it would appear that the performance can be skewed a lot more by that than by the method you use for squidging out the output. As a

[PHP] Re: Newbie question about ?= ?

2006-09-10 Thread Al
Mike Borrelli wrote: Good day, While I've been using php for more than a little while now, I've never understood why the use of the ?= ...? short tag is noted to be avoided. Or rather, I understand that there's an option to disable it, and that's why it's noted in this way, but I don't

Re: [PHP] Re: Newbie question about ?= ?

2006-09-10 Thread Satyam
- Original Message - From: Al [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Sunday, September 10, 2006 5:52 PM Subject: [PHP] Re: Newbie question about ?= ? Mike Borrelli wrote: Good day, While I've been using php for more than a little while now, I've never understood why

Re: [PHP] Re: Newbie question about ?= ?

2006-09-10 Thread Jon Anderson
Al wrote: Structurally, there is a far better way to compile your html pages. This approach is easier to design and debug and it is faster since it sends one complete packet instead of one for every short tag. And, it saves using ob_start() and ob_flush(). Consider: $report= ''; $report

Re: [PHP] Re: Newbie question about ?= ?

2006-09-10 Thread Satyam
- Original Message - From: Jon Anderson [EMAIL PROTECTED] To: php-general@lists.php.net Cc: Al [EMAIL PROTECTED] Sent: Sunday, September 10, 2006 9:16 PM Subject: Re: [PHP] Re: Newbie question about ?= ? Al wrote: Structurally, there is a far better way to compile your html pages

[PHP] Re: Newbie Question Can't insert values into MySQL DB via PHP

2006-02-10 Thread Barry
Duggles Temple wrote: Hi, I'd like to say in advance that I am sorry about the silly and very newbie question I'm asking. I am having a problem with a shop system. I can't add values into the MySQL DB via a PHP statement. The values are being transferred from one page to another (know that

RE: [PHP] Re: Newbie Question Can't insert values into MySQL DB via PHP

2006-02-10 Thread Dan Parry
: [PHP] Re: Newbie Question Can't insert values into MySQL DB via PHP Duggles Temple wrote: Hi, I'd like to say in advance that I am sorry about the silly and very newbie question I'm asking. I am having a problem with a shop system. I can't add values into the MySQL DB via a PHP statement

[PHP] Re: Newbie to PHP5

2005-11-22 Thread Yoyo
Danny wrote: Hi there, I´m familiar with PHP syntax, but I´ve been reading some sample scripts, in PHP5 and i´ve seen some strange things, like diferent ways to read a collection of rows, magic functions, wrapers, and operators like :: and -. I know that all is the manual, but before that

Fwd: [PHP] Re: newbie questionsession and cookie by javascript

2005-09-23 Thread Alex Andrew Mosqueda
Thanks. -- Forwarded message -- From: Ben [EMAIL PROTECTED] Date: Sep 22, 2005 5:29 PM Subject: [PHP] Re: newbie questionsession and cookie by javascript To: php-general@lists.php.net Alex Andrew Mosqueda said the following on 09/22/05 06:28: Hi! I there a way I can get

[PHP] Re: newbie questionsession and cookie by javascript

2005-09-22 Thread Ben
Alex Andrew Mosqueda said the following on 09/22/05 06:28: Hi! I there a way I can get the cookie data stored by javascript(client side) in php(server side) and vice versa? Thanks. It never hurts to check php.net, plenty of useful information there... $_cookie['cookie name']

[PHP] Re: Newbie Variable Question

2005-03-09 Thread Jason Barnett
Jackson Linux wrote: ... php include_once /path/to/cv.$r.include.php; ? asks for cv.'1'.include.php ... And I need it to ask for cv.1.include.php How can I make a variable to fetch the literal number from the field cv.category? Not 100% certain that it will work, but try casting the variable

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jackson Linux
On 9 Mar 2005, at 11:15, Jason Barnett wrote: Jackson Linux wrote: ... php include_once /path/to/cv.$r.include.php; ? asks for cv.'1'.include.php ... And I need it to ask for cv.1.include.php How can I make a variable to fetch the literal number from the field cv.category? Not 100% certain that it

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jochem Maas
Jackson Linux wrote: On 9 Mar 2005, at 11:15, Jason Barnett wrote: Jackson Linux wrote: ... php include_once /path/to/cv.$r.include.php; ? asks for cv.'1'.include.php ... And I need it to ask for cv.1.include.php How can I make a variable to fetch the literal number from the field cv.category?

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jackson Linux
Jochem and everyone, Thanks, this solved the problem. Regarding someone's much appreciated comment: snip[this]...allows any user to simply change the value of r to something more to their liking. given the reset of the code that you included in your first message, who knows what nice holes

[PHP] Re: [NEWBIE] How to allow for a href tags but no others?

2005-02-25 Thread Jason Barnett
The solution for this problem (doing it in the matter that you are suggesting) is certainly going to involve preg_replace(). However, this will require you to match only the tags you want to let through (which is always dangerous) and then strip out all of the rest of them. This can be very

[PHP] Re: [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Ospinto
while ($tantoData = mysql_fetch_array($tantoResult)) { $tantoEmailArray[] = $tantoData; } now all the values are stored into an array ($tantoEmailArray). to convert an array to a string and join the elements together by a delimiter, use implode. hence:

Re: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Rolf Østvik
[EMAIL PROTECTED] (John Nichel) wrote in news:[EMAIL PROTECTED]: Jay Blanchard wrote: [snip] CR Just a thought, but would it be worth someone posting the list CR once a week to catch new users as they sign up? Isn't it posted once a month as it is? [/snip] It used to be, but it seems

RE: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jay Blanchard
[snip] Now, perhaps, an INTERESTING project for some of us to work on would be that system: Spec: Robot subscriber to PHP-General. Reads all incoming messages. Discards anything that looks like a 'Reply:' including: Has 'Re: ' or 'Fwd: in subject Has Message ID in-reply-to header thingies

RE: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jay Blanchard
[snip] I'm not going to promise any of this. If someone else is willing to donate the hardware to make this happen then contact me / the list. Of course anyone else that wants to donate coding time is more than welcome to join project ParrotHeadPoster. :) I can already imagine it now...

RE: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jay Blanchard
[snip] ...lots of really good stuff... [/snip] So, basically I saw 3 possible action items from this discussion... 1. phParrot development 2. Weekly CRON of NEWBIE GUIDE (once I get the e-mail portion figured out) 3. OT posts should contain a TIP or TRICK? If we did this we could harvest them

Re: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jochem Maas
Jay Blanchard wrote: [snip] Now, perhaps, an INTERESTING project for some of us to work on would be that system: Spec: Robot subscriber to PHP-General. Reads all incoming messages. Discards anything that looks like a 'Reply:' including: Has 'Re: ' or 'Fwd: in subject Has Message ID

Re: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jochem Maas
Jay Blanchard wrote: [snip] ...lots of really good stuff... [/snip] So, basically I saw 3 possible action items from this discussion... 1. phParrot development 2. Weekly CRON of NEWBIE GUIDE (once I get the e-mail portion figured out) 3. OT posts should contain a TIP or TRICK? If we did this we

RE: [PHP] Re: [NEWBIE GUIDE] For the benefit of new members

2005-01-26 Thread Jay Blanchard
[snip] 4. a website/subsite related DB to store data for phParrot, tips, etc. phparrot.net is up for grabs - I'm happy to register it (can't grace the list with ace mathematical explainations :-) but I'm happy to shell out a few bucks as a way of giving back a little) - and I'd just as happily

  1   2   3   >