Re: [PHP] redirect to a page the fist time a site is accessed

2009-04-16 Thread Shawn McKenzie
Stuart wrote: 2009/4/15 Don d...@program-it.ca: I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and

[PHP] Re: header() and passing sessions

2009-04-15 Thread Shawn McKenzie
Adam Williams wrote: I need some help passing a session variable with a header() function. According to www.php.net/header, the documentation states: *Note*: Session ID is not passed with Location header even if session.use_trans_sid session.configuration.php#ini.session.use-trans-sid is

[PHP] Re: What was the unix timestamp of last week, Monday 12:00 am?

2009-04-14 Thread Shawn McKenzie
René Fournier wrote: I'm trying to write a [simple] function, such that: function earlier_unix_timestamp () { $now = mktime(); [...] return $then; // e.g., 1238983107 } Anyone have something already made? There seem to be many ways to skin this cat, with date()

Re: [PHP] multi-dimensional arrays

2009-04-13 Thread Shawn McKenzie
Nitsan Bin-Nun wrote: $string = xxx xx x xx xxx xxx xx x xx xxx; $t = explode(\n, $string); foreach ($t as $k = $v) $t[$k] = explode( , $v); var_dump($t); On Mon, Apr 13, 2009 at 8:55 PM, Andres Gonzalez and...@packetstorm.comwrote: Hi, I am learning

Re: [PHP] multi-dimensional arrays

2009-04-13 Thread Shawn McKenzie
Shawn McKenzie wrote: Well in your approach you get a bunch of empty elements where the spaces are. Here are two ways but I'm sure one preg_match_all() without the explodes and loop could do it (some guru will show us): //one way $text = 'xxx xx x xx xxx xx x x xxx

Re: [PHP] Escape Data In/Out of db [solved]

2009-04-11 Thread Shawn McKenzie
tedd wrote: At 9:12 PM -0700 4/9/09, Jim Lucas wrote: tedd wrote: At 5:03 PM +0200 4/9/09, Jan G.B. wrote: You might want to use htmlspecialchars($str, ENT_QUOTES) OUT from db to html and mysql_real_escape_string(stripslashes($_POST['yourself'])); The above tells me that you probably

Re: [PHP] Escape Data In/Out of db [solved]

2009-04-11 Thread Shawn McKenzie
tedd wrote: I think you want to look for magic_quotes_gpc -- Thanks! -Shawn -Shawn: You were right. I'll fix it. Thanks, tedd I normally have a prep4display() and prep4store() type function that do all of the sensitization/prep for either storing or displaying. So

Re: [PHP] Escape Data In/Out of db [solved]

2009-04-11 Thread Shawn McKenzie
Shawn McKenzie wrote: tedd wrote: I think you want to look for magic_quotes_gpc -- Thanks! -Shawn -Shawn: You were right. I'll fix it. Thanks, tedd I normally have a prep4display() and prep4store() type function that do all of the sensitization/prep for either storing

Re: [PHP] opening utf-8 files - chinese mb characters

2009-04-09 Thread Shawn McKenzie
Per Jessen wrote: Andrew Ballard wrote: A bit off topic, but Ctrl+I no longer brings up the Page Info in Firefox like it used to -- at least on my Windows computers. (It opens the bookmark list in the sidebar.) Does it do differently under Linux? On FF 2.0.0.6 Ctrl-I brings up the info

[PHP] Re: unknown number of inputs

2009-04-09 Thread Shawn McKenzie
PJ wrote: I have a script with $_POST and form to load data with text input. Situation: enter name of author(s) for book. I have the script set up to enter first_name, last_name for Author1 and the same for Author 2. Check if entry 1 exists then proceed accordingly Check if entry 2 exists

[PHP] Re: problems with loaded extensions

2009-04-08 Thread Shawn McKenzie
Andres Gonzalez wrote: Hi, I have got an extension loaded in all three of my php config files (in cli, in cgi, and in apache2 directories). The functions in the extension are all accessible when running test scripts from the command line, like: php init.php for example, in the

[PHP] Re: PHP and Send Mail

2009-04-08 Thread Shawn McKenzie
Alejandro Esteban Galvez wrote: Hi!, I am making a web system and i need known how send a mail using PHP Bye --- Alejandro Esteban Galvez Administrador de Red IPICHMC Rimed, Radio-Aficionado CL2AEG Linux User #472120 -

[PHP] Re: Best Practices for Hiding Errors

2009-04-06 Thread Shawn McKenzie
George Langley wrote: Hi all! Have a question about hiding PHP errors from the end user. I have the following lines: $fp = fsockopen ($host, 80, $errno, $errstr, $timeout); if (!$fp) { // problem, put error handing code here } else { //

Re: [PHP] syntax woes

2009-04-03 Thread Shawn McKenzie
Chris wrote: Shawn McKenzie wrote: Chris wrote: Wow, it does chown and chmod as well, thats friggen cool. chown will only work if the script is running as root which I doubt your drupal site will be. Or if the script is running as a user/group that has write permissions to the dir/file

Re: [PHP] syntax woes

2009-04-02 Thread Shawn McKenzie
Chris wrote: Wow, it does chown and chmod as well, thats friggen cool. chown will only work if the script is running as root which I doubt your drupal site will be. Or if the script is running as a user/group that has write permissions to the dir/file that your trying to chown. --

Re: [PHP] time() TIMER in seconds or just numbers

2009-03-30 Thread Shawn McKenzie
Andrew Williams wrote: what does time(); $t1 = time(); { do something } $t2 = time(); $end_time = $t2 - $t1; echo $end_time; what does $end_time represent? how do you determine the next 5 mins? So if you haven't deduced the answer from other replies, this would probably be

[PHP] Re: Error printer_open()

2009-03-27 Thread Shawn McKenzie
Gerardo Picotti wrote: Hi. I'm trying to use the printer functions in my php development. I add the php_printer.dll in the c:/php/ext/ path. I add the line in the php.ini file like that: extension=php_printer.dll. But that doesn't work and gives the next error: Fatal error: Call to

Re: [PHP] Multiple cookies on the same computer

2009-03-27 Thread Shawn McKenzie
Ken Watkins wrote: On 3/26/2009 at 11:12 PM, in message 70.12.30978.2144c...@pb1.pair.com, Shawn McKenzie nos...@mckenzies.net wrote: Shawn McKenzie wrote: Ken Watkins wrote: Hi all. Newbie here. I have set up a blog site where my family creates posts and they get emailed to members

[PHP] Regex help please

2009-03-27 Thread Shawn McKenzie
I'm normally OK with regex, especially if I fiddle with it long enough, however I have fiddled with this one so long that I'm either totally missing it or it's something simple. Does it have anything to do with the backref, or the fact that the value of the backref has a $? I have: $out = '

Re: [PHP] Regex help please

2009-03-27 Thread Shawn McKenzie
haliphax wrote: On Fri, Mar 27, 2009 at 9:40 AM, Shawn McKenzie nos...@mckenzies.net wrote: I'm normally OK with regex, especially if I fiddle with it long enough, however I have fiddled with this one so long that I'm either totally missing it or it's something simple. Does it have anything

Re: [PHP] hierarchies

2009-03-27 Thread Shawn McKenzie
PJ wrote: Not quite, but interesting option. This would be fine on my local intranet, if needed; but I don't think this would be allowed on a virtual hosted site. Actually, my problem is to use a header.php (for example) in pages in the webroot directory or any directory within (or under)

[PHP] Re: similar page replication

2009-03-26 Thread Shawn McKenzie
PJ wrote: I have a series of pages to display that are all exactly the same, except for a couple of small changes like 1 number that needs to be changed for a mysql_query, the title of the page, and the page_name.php. I am wondering how these changes could be implemented when clicking on an

Re: [PHP] Regex

2009-03-26 Thread Shawn McKenzie
jesse.ha...@arvatousa.com wrote: Nistan, Just got home, tested on linux. No problem on linux, the control-z just exits. I may just go ahead and post my issue to the PHP windows list to see if anything comes up, and not worry if it doesnt. I appreciate the help very much Thanks,

[PHP] Re: Multiple cookies on the same computer

2009-03-26 Thread Shawn McKenzie
Ken Watkins wrote: Hi all. Newbie here. I have set up a blog site where my family creates posts and they get emailed to members of the family. To keep up with their identities, I created a script for each family member to run (dad.php, mom.php, etc.), and it sets a cookie on each

[PHP] Re: Multiple cookies on the same computer

2009-03-26 Thread Shawn McKenzie
Shawn McKenzie wrote: Ken Watkins wrote: Hi all. Newbie here. I have set up a blog site where my family creates posts and they get emailed to members of the family. To keep up with their identities, I created a script for each family member to run (dad.php, mom.php, etc.), and it sets

Re: [PHP] Fwd: A fatal error with php virtual cron

2009-03-25 Thread Shawn McKenzie
אלמוג בקו wrote: This is a part of the class: private function _request() { //URL information $url= http://.$_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; $url_info= parse_url($url); //Fixing port if(!isset($url_info['port'])) $url_info['port']=80;

Re: [PHP] Fwd: A fatal error with php virtual cron

2009-03-25 Thread Shawn McKenzie
אלמוג בקו wrote: my script(cron.php) check the job and call by http-request himself(cron.php). I already solve the timezone problem, I set the timezone to Israel`s timezone[works fine]: //Set TimeZone date_default_timezone_set(timezone_name_from_abbr(, 2*60*60, null)); I was talking

Re: [PHP] Proper code formatting

2009-03-23 Thread Shawn McKenzie
Bob McConnell wrote: From: Michael A. Peters Angus Mann wrote: Hi all, I'm fairly new to PHP so I don't have too many bad habits yet. I'm keen to make my code easy to read for me in the future, and for others as well. Are there any rules or advice I can use for formatting (especially

Re: [PHP] Proper code formatting

2009-03-23 Thread Shawn McKenzie
George Larson wrote: On Mon, Mar 23, 2009 at 8:23 AM, Shawn McKenzie nos...@mckenzies.netwrote: Bob McConnell wrote: From: Michael A. Peters Angus Mann wrote: Hi all, I'm fairly new to PHP so I don't have too many bad habits yet. I'm keen to make my code easy to read for me in the future

Re: [PHP] Double the fun

2009-03-23 Thread Shawn McKenzie
tedd wrote: At 10:09 AM -0400 3/23/09, Jason Pruim wrote: tedd wrote: Daniel Brown wrote: Sorry, all, I must have yelled. Two days later and my words are still echoing. ;-P I'm sure everyone has experienced email being delivered oddly. What's the problem that causes an email to be

Re: [PHP] Frameworks / obstinate?

2009-03-23 Thread Shawn McKenzie
Arno Kuhl wrote: -Original Message- From: Sancar Saran [mailto:sancar.sa...@evodot.com] Sent: 23 March 2009 11:52 AM To: php-general@lists.php.net Subject: Re: [PHP] Frameworks / obstinate? Probably a bit off topic and The Game is over man. Javascript coming with flank

[PHP] Re: Frameworks / obstinate?

2009-03-22 Thread Shawn McKenzie
Daniel Kolbo wrote: Tony Marston wrote: Nitsan Bin-Nun nit...@binnun.co.il wrote in message news:d47da0100903220910q7bb66706s6255f0fc89b98...@mail.gmail.com... Don't forget to attach the message to the list. Regarding the frameworks, which of them, for your opinion, will take the fastest

Re: [PHP] Re: Problems with exec() on windows

2009-03-20 Thread Shawn McKenzie
Kyohere Luke wrote: You might have something there - never really thought about how windows forms the 8.3 names... not many resources online about it ... The actual path is c:\Program File\Gammu 1.23.91\bin\gammu.exe I'd used c:\Progra~1\Gammu~1\bin\gammu.exe You take the first 6

[PHP] Re: very strange session behavior -- fails on port 80, works on 9090

2009-03-20 Thread Shawn McKenzie
francisco j sanchez wrote: hello. I have been working on this bug for days now, and have scoured these forums and the web to no avail. I am fairly new to PHP, so please forgive me if I don't provide the right info. here is the problem: as of 9 days ago, when someone arrives at a document on

[PHP] Re: very strange session behavior -- fails on port 80, works on 9090

2009-03-20 Thread Shawn McKenzie
Shawn McKenzie wrote: francisco j sanchez wrote: hello. I have been working on this bug for days now, and have scoured these forums and the web to no avail. I am fairly new to PHP, so please forgive me if I don't provide the right info. here is the problem: as of 9 days ago, when someone

Re: [PHP] how to make for statement run faster

2009-03-20 Thread Shawn McKenzie
Andrew Williams wrote: I have a program where I process more that 5000 list of 100 data at time but it very slow due to many *for statement*s. how you make it run faster Without seeing the code I would have to say optimize the code. -- Thanks! -Shawn http://www.spidean.com -- PHP

[PHP] Re: very strange session behavior -- fails on port 80, works on 9090

2009-03-20 Thread Shawn McKenzie
francisco j sanchez wrote: Shawn, thank you so much for your reply. I think this definitely has me on the right track. what i need to figure out now is, is it Apache or PHP that is switching the domain? all the code uses relative links (as far as i can tell... i didn't build this

[PHP] Re: today i found the best function I've ever seen

2009-03-20 Thread Shawn McKenzie
Nathan Rixham wrote: if( !function_exists('clean_sql_term') ) { function clean_sql_term($term) { return $term; } } beautiful How is best to update all of my code to use this new function? Should I just search and replace 'mysql_real_esacpe_string(' with 'clean_sql_term('

[PHP] Re: So called PHP Expert

2009-03-20 Thread Shawn McKenzie
דניאל דנון wrote: I'm a member of some forums about some topics, One of them include a programming forum. Now, I've visited there a week ago and saw a topic with the title Free security, Someone who calls himself a PHP expert (and said that he could teach me PHP since my level is so low),

[PHP] Re: Importing Data with Field Names

2009-03-20 Thread Shawn McKenzie
revDAVE wrote: Newbie... I have phpmyadmin... I'm basically looking for a quick way to import records and avoid hand- typing many field names (I can set the field types later) Is there a way to import into mySql with let's say a csv file - (or Tab delimited file) and have the first

Re: [PHP] Re: today i found the best function I've ever seen

2009-03-20 Thread Shawn McKenzie
Daniel Brown wrote: On Fri, Mar 20, 2009 at 20:06, Shawn McKenzie nos...@mckenzies.net wrote: How is best to update all of my code to use this new function? Should I just search and replace 'mysql_real_esacpe_string(' with 'clean_sql_term(' or does this replace all of my validations

[PHP] Re: Problems with exec() on windows

2009-03-19 Thread Shawn McKenzie
Kyohere Luke wrote: Hi, I'm trying to use exec to call gammu.exe and send sms on windows XP. This works from commandline: C:\path\to\gammu.exe 1 --sendsms EMS 200 -text test1 test2 But if I run it through php like this: $command = \C:\path\to\gammu.exe\ --sendsms EMS 200 -text \test1

Re: [PHP] Smarty Tips and Techniques

2009-03-19 Thread Shawn McKenzie
Bob McConnell wrote: From: Virgilio Quilario That looks nice, but how do I get to the point where I can understand how to use it? I have also looked at the Smarty site http://www.smarty.net/, but their documents assume significant experience in building and using templates. Where can I

Re: [PHP] Re: Problems with exec() on windows

2009-03-19 Thread Shawn McKenzie
Kyohere Luke wrote: Thanks, but I tried this. Doesn't work because the path\to\gammu.exe has spaces in it Haliphax, thanks for your comments. I tried escapeshellarg() to no end. I'm exploring your reply regarding proc_open, but how exactly does proc_open separate the arguments from the

Re: [PHP] Re: Problems with exec() on windows

2009-03-19 Thread Shawn McKenzie
them with or with '' ie double/single quotes... -Original Message- From: Kyohere Luke [mailto:l...@beyonic.com] Sent: Thursday, March 19, 2009 10:18 AM To: Bastien Koert Cc: Shawn McKenzie; php-general@lists.php.net Subject: Re: [PHP] Re: Problems with exec() on windows Eventually

[PHP] Re: PHP + IIS7 - 'weird stuff' with multiple sites on same server

2009-03-19 Thread Shawn McKenzie
scubak1w1 wrote: Hello, I was/am using the excellent tutorial over at http://learn.iis.net/page.aspx/246/u...ons-on-iis-70/ to get PHP5.2.9 up and running on Server '08 and IIS7. All was working well, got my site migrated across, code was working, data coming and going out of

Re: [PHP] Stopping bad entries in PHP form

2009-03-19 Thread Shawn McKenzie
Ashley Sheridan wrote: On Thu, 2009-03-19 at 13:46 -0700, sono...@fannullone.us wrote: I have a PHP form that allows end users to request a sample of the products we sell. Unfortunately, a person/people have found it and are sending in bad requests. We sell only within the US, and

Re: [PHP] Dynamic Form 'on The Fly'

2009-03-18 Thread Shawn McKenzie
Bob McConnell wrote: From: revDAVE Using a repeating region of a query, I want to generate a 'form on the fly' So for each repeat - I have an extra form input Each input name = thisline?php echo $cnt; ? So it will make names like: thisline1 thisline2 thisline3 Etc. For the form

[PHP] Re: Anyone know of a project like Redmine written in PHP?

2009-03-18 Thread Shawn McKenzie
mike wrote: http://www.redmine.org/ Looks pretty useful; I want one in PHP though. Anyone? Haven't used it, but it looks pretty cool. Guess it depends on what features you need. http://gforge.org/gf/project/gforge/frs/?action=FrsReleaseBrowsefrs_package_id=2 -- Thanks! -Shawn

[PHP] Re: strcmp() versus ==

2009-03-17 Thread Shawn McKenzie
Clancy wrote: On Mon, 16 Mar 2009 17:06:35 -0500, nos...@mckenzies.net (Shawn McKenzie) wrote: Shawn McKenzie wrote: Paul M Foster wrote: I had never completely read over the rules with regard to comparisons in PHP, and was recently alarmed to find that $str1 == $str2 might not compare

[PHP] Re: pdf_new() uncalled Function

2009-03-16 Thread Shawn McKenzie
Alice Wei wrote: Hi, I use Linux, and I had installed PHP using yum install php. I am trying to use the pdf_new function to create pdfs from existing text files, but I get this error PHP Fatal error: Call to undefined function pdf_new() I have noticed that when I run the

[PHP] Re: strcmp() versus ==

2009-03-16 Thread Shawn McKenzie
Paul M Foster wrote: I had never completely read over the rules with regard to comparisons in PHP, and was recently alarmed to find that $str1 == $str2 might not compare the way I thought they would. Is it common practice among PHP coders to use strcmp() instead of == in making string

[PHP] Re: strcmp() versus ==

2009-03-16 Thread Shawn McKenzie
Shawn McKenzie wrote: Paul M Foster wrote: I had never completely read over the rules with regard to comparisons in PHP, and was recently alarmed to find that $str1 == $str2 might not compare the way I thought they would. Is it common practice among PHP coders to use strcmp() instead

[PHP] Re: Studying IF statements

2009-03-16 Thread Shawn McKenzie
Gary wrote: Reading a book on php/mysql (Head First) and the following code is not working, athough I am pretty sure I have it as they say to. Trying to kill a sendmail script if I forget to enter a subject or text in body of email. I am getting the echo, but it is still sending the emails

[PHP] Re: Studying IF statements

2009-03-16 Thread Shawn McKenzie
getting a parse error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in on line 109 Line 109 die 'You forgot to enter a subject and or text in the body! br/Click the back buttonbr /'; Shawn McKenzie nos...@mckenzies.net wrote in message news:b8.22.22219.724fe

[PHP] Re: Studying IF statements

2009-03-16 Thread Shawn McKenzie
Shawn McKenzie wrote: Gary wrote: Shawn Thanks for your reply. Some of what you are saying is a little ahead of my lessons, but let me address as best I can. The script worked fine in the previous lesson where I was to send emails from my DB, this lesson is to kill the email from being

Re: [PHP] Problem with passing and Area in a $_POST

2009-03-15 Thread Shawn McKenzie
tedd wrote: At 6:31 PM -0700 3/14/09, Richard Kurth wrote: I have a script that is passing a area in a $_POST and it does not pass the data. When I try to look at the data with $_POST['fieldorder'] it its empty but when I look at it with $_REQUEST['fieldorder'] the data is there. This seams

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Shawn McKenzie
Jochem Maas wrote: Martin Zvarík schreef: What's the point? If user puts in a search input something like scriptalert('I am super hacker');/script And the website outputs: You are searching for: script/script then what? it shows an alert(), who cares? replace the alert() with some

Re: [PHP] Re: The PHP filter class I'm working on (securiity)

2009-03-14 Thread Shawn McKenzie
Shawn McKenzie wrote: Jochem Maas wrote: Martin Zvarík schreef: What's the point? If user puts in a search input something like scriptalert('I am super hacker');/script And the website outputs: You are searching for: script/script then what? it shows an alert(), who cares? replace

Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread Shawn McKenzie
Gary wrote: Thanks again to everyone. I have just checked the servers phpinfo, and turns out they are running PHP Version 4.3.11 while I have verstion 5.2.8, could this change any of the advice? Yes, the mysqli extension is only available for PHP5. Use the mysql_x() functions or move to

Re: [PHP] Fatal error: Call to undefined function:mysqli_connect() in

2009-03-14 Thread Shawn McKenzie
revDAVE wrote: On 3/14/2009 10:36 AM, Gary gwp...@ptd.net wrote: Can anyone enlighted me as to what I am not doing correctly? Hi Gary, I am hosted using a basic cpanel interface ... There's a button = Remote MySQL which brings up a page: Remote Database Access Hosts And I put in my

Re: [PHP] Fatal error: Call to undefined function:mysqli_connect()in

2009-03-14 Thread Shawn McKenzie
Shawn McKenzie wrote: revDAVE wrote: On 3/14/2009 10:36 AM, Gary gwp...@ptd.net wrote: Can anyone enlighted me as to what I am not doing correctly? Hi Gary, I am hosted using a basic cpanel interface ... There's a button = Remote MySQL which brings up a page: Remote Database Access Hosts

Re: [PHP] Export/Write rows from DBF to CSV

2009-03-13 Thread Shawn McKenzie
Rahul S. Johari wrote: On Mar 13, 2009, at 10:01 AM, Bastien Koert wrote: On Fri, Mar 13, 2009 at 9:56 AM, Rahul S. Johari sleepwal...@rahulsjohari.com wrote: Ave, I'm trying to retrieve data from a DBF database and write it to a CSV file in a comma delimited format. I'm able to get

Re: [PHP] Anyone fancy getting paid to improve my PHP in London?

2009-03-13 Thread Shawn McKenzie
Tom Chubb wrote: 2009/3/13 Robert Cummings rob...@interjinn.com On Fri, 2009-03-13 at 17:16 +, Tom Chubb wrote: Do any experienced PHP programmers in London fancy helping me improve my PHP? I'd like to know where my code could be improved and to be shown how an experienced programmer

[PHP] Re: Copy Non-Text file from One Server to Another Issues

2009-03-12 Thread Shawn McKenzie
Alice Wei wrote: Hi, I have a simple code as shown in the following: ?php //original file $file = http://remote_server/copy/play.txt;; $file2 = http://remote_server/copy/test.jpg;; $file3 = http://remote_server/copy/sample.pdf;; //directory to copy to (must be CHMOD to 777)

[PHP] Re: password field validation

2009-03-12 Thread Shawn McKenzie
Jason Todd Slack-Moehrle wrote: Hi All, I have an input field with type=password. I am trying to do some error checking to see if the user puts a value in after they submit the form (i.e not left it blank) Here is what I have: on form: Password: input id=PASSWORD name=PASSWORD

Re: [PHP] Silly question - include vs. eval

2009-03-11 Thread Shawn McKenzie
Sándor Tamás (HostWare Kft . ) wrote: Yes, Rob is right. My original question is about the difference between the processing of a file-based site with include() OR eval(). In that case, if I understood it correctly, the results are the same. But! If the included pages contain functions,

[PHP] Re: Working directory of PHP pages?

2009-03-11 Thread Shawn McKenzie
Clancy wrote: It is my understanding that when you open a page the PHP server looks for index.php in the site root directory, and loads it. As a result the working directory of the page will be the root directory of the site. I have always worked on this assumption, and it has always

[PHP] Re: Include File Errors with Comments

2009-03-11 Thread Shawn McKenzie
Patrick Moloney wrote: Thanks for all the replies. As I said in my original post the comments are on the first lines of the included file and are HTML comments. I'll have to look closer at comment syntax - I see there are empty comments and issues with pairs of double hyphens. My overall

Re: [PHP] Header - Redirect Command Not Working

2009-03-11 Thread Shawn McKenzie
Daniel Brown wrote: On Wed, Mar 11, 2009 at 12:38, Jan G.B. ro0ot.w...@googlemail.com wrote: One more thing to mention: The HTTP Protocoll requires you to give a full URL on Location Headers. That means that this is wrong: Location: file.txt and this is correct Location:

Re: [PHP] Silly question - include vs. eval

2009-03-11 Thread Shawn McKenzie
Robert Cummings wrote: On Wed, 2009-03-11 at 12:19 -0500, Shawn McKenzie wrote: Sándor Tamás (HostWare Kft . ) wrote: Yes, Rob is right. My original question is about the difference between the processing of a file-based site with include() OR eval(). In that case, if I understood

Re: [PHP] Silly question - include vs. eval

2009-03-11 Thread Shawn McKenzie
Robert Cummings wrote: On Wed, 2009-03-11 at 13:20 -0500, Shawn McKenzie wrote: Robert Cummings wrote: On Wed, 2009-03-11 at 12:19 -0500, Shawn McKenzie wrote: Sándor Tamás (HostWare Kft . ) wrote: Yes, Rob is right. My original question is about the difference between the processing

Re: [PHP] Silly question - include vs. eval

2009-03-11 Thread Shawn McKenzie
Shawn McKenzie wrote: Robert Cummings wrote: On Wed, 2009-03-11 at 13:20 -0500, Shawn McKenzie wrote: Robert Cummings wrote: On Wed, 2009-03-11 at 12:19 -0500, Shawn McKenzie wrote: Sándor Tamás (HostWare Kft . ) wrote: Yes, Rob is right. My original question is about the difference between

Re: [PHP] Silly question - include vs. eval

2009-03-11 Thread Shawn McKenzie
Robert Cummings wrote: On Wed, 2009-03-11 at 16:16 -0500, Shawn McKenzie wrote: Shawn McKenzie wrote: Robert Cummings wrote: On Wed, 2009-03-11 at 13:20 -0500, Shawn McKenzie wrote: Robert Cummings wrote: On Wed, 2009-03-11 at 12:19 -0500, Shawn McKenzie wrote: Sándor Tamás (HostWare Kft

[PHP] Re: Error with DOMDocument in php's functions

2009-03-10 Thread Shawn McKenzie
Mauricio Muriel wrote: Hi Guys, I want to ask you about this problem: I have a FUNCTION where is a DOMDocument element, that DOMDocument element is Load from a string (With well formed XML structure) stored in a param, this is code: ?php function xml_match($columns,$text,$result) {

Re: [PHP] Re: Error with DOMDocument in php's functions

2009-03-10 Thread Shawn McKenzie
Mauricio Muriel wrote: Hi Shawn, Thanks for your time, this is the complete code of the function (in fact the complete code in: xml_match.php file) ?php function xml_match($columns,$text,$result) {$debug=true; echo Starting XML Module; if ($debug) {echo br /strongStarting

Re: [PHP] Re: Error with DOMDocument in php's functions

2009-03-10 Thread Shawn McKenzie
Mauricio Muriel wrote: Please keep replies on list. At a minimum you are missing the closing brace } for your function. I would suggest that you find an IDE or at least a text editor that has PHP syntax checking. -Shawn Sorry for my error IN THE EMAIL, the code is

[PHP] Re: Hi!! I Joined the PHP Mailing List

2009-03-09 Thread Shawn McKenzie
Picu Priya wrote: Hello Everyone, I have just joined the PHP Community.. I hope, I will spend good time here.. I am already a PHP programmer, and Love to learn a lot of new php tricks while helping others, as best of my knowledge. :) Welcome! You are the designated helper for PJ. --

[PHP] Re: Script execution

2009-03-09 Thread Shawn McKenzie
George Larson wrote: Hi everybody. The problem that I'm having is probably because I've got more of a Windows background -- and it isn't so much a problem as a point of curiosity. I've recently noticed that when I write a script that they seem to have different permissions when executed

[PHP] Re: Script execution

2009-03-09 Thread Shawn McKenzie
George Larson wrote: Hi everybody. The problem that I'm having is probably because I've got more of a Windows background -- and it isn't so much a problem as a point of curiosity. I've recently noticed that when I write a script that they seem to have different permissions when executed

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Shawn McKenzie
Sashikanth Gurram wrote: haliphax wrote: On Mon, Mar 9, 2009 at 10:52 AM, Sashikanth Gurram sashi...@vt.edu wrote: haliphax wrote: On Mon, Mar 9, 2009 at 10:24 AM, Sashikanth Gurram sashi...@vt.edu wrote: Nathan Nobbe wrote: On Mon, Mar 9, 2009 at 7:32 AM,

[PHP] Re: Database Abstraction Class

2009-03-08 Thread Shawn McKenzie
Micah Gersten wrote: Michael A. Peters wrote: Anywhoo, that being said, does anyone have a suggestion for a good database abstraction class? Preferably one that already has decent support for several open source databases? Try Doctrine: http://www.doctrine-project.org/ From the

Re: [PHP] Assign 2 values from Mysql to an array

2009-03-06 Thread Shawn McKenzie
Dollah Ihsan wrote: I'm sorry if this is not what you're talking about... /** * assume your table structure just like this. * table: users * | id | country| name | population | * -- * | 1 |Texas

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Shawn McKenzie
Robert Cummings wrote: On Tue, 2009-03-03 at 21:18 -0600, Shawn McKenzie wrote: Matthew Croud wrote: Hello, First post here, I'm in the process of learning PHP , I'm digesting a few books as we speak. I'm working on a content heavy website that provides a lot of information, a template

Re: [PHP] whoami explanation

2009-03-04 Thread Shawn McKenzie
PJ wrote: Daniel Brown wrote: On Wed, Mar 4, 2009 at 10:42, PJ af.gour...@videotron.ca wrote: Right on. Good comments. No offense taken and none intended. I am enoying the list and will continue to participate, if i may. I have learned a great deal already and really do appreciate the

Re: [PHP] whoami explanation

2009-03-04 Thread Shawn McKenzie
Thodoris wrote: Didn't have the time to read the whole thread. Sorry for being so lame. Obviously, or you would have known that this thread has very little if anything to do with whoami! :-) -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Re: Question about template systems

2009-03-04 Thread Shawn McKenzie
Robert Cummings wrote: On Wed, 2009-03-04 at 10:55 -0600, Shawn McKenzie wrote: Robert Cummings wrote: On Tue, 2009-03-03 at 21:18 -0600, Shawn McKenzie wrote: Matthew Croud wrote: Hello, First post here, I'm in the process of learning PHP , I'm digesting a few books as we speak. I'm

[PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Shawn McKenzie
Jason Cipriani wrote: I am trying to submit a request to an HTTP server with multipart/form-data encoded data. I'm using PECL's HttpRequest (although I'm open to alternatives). I am using PHP5. I noticed that if you call addPostFile to add a file, PECL will send the file, and all other post

Re: [PHP] whoami explanation

2009-03-04 Thread Shawn McKenzie
PJ wrote: Shawn McKenzie wrote: PJ wrote: Daniel Brown wrote: On Wed, Mar 4, 2009 at 10:42, PJ af.gour...@videotron.ca wrote: Right on. Good comments. No offense taken and none intended. I am enoying the list and will continue to participate, if i may. I have learned

Re: [PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Shawn McKenzie
Jason Cipriani wrote: On Wed, Mar 4, 2009 at 2:10 PM, Shawn McKenzie nos...@mckenzies.net wrote: Jason Cipriani wrote: Is there a way to force PECL to use multipart/form-data encoding for all post fields added with addPostFields, even when you are not calling addPostFile to add a file? Try

Re: [PHP] if elseif elseif elseif....

2009-03-04 Thread Shawn McKenzie
Chris wrote: PJ wrote: Daniel Brown wrote: On Wed, Mar 4, 2009 at 17:51, PJ af.gour...@videotron.ca wrote: elseif ($obligatoryFieldNotPresent = 1) { $obligatoryFieldNotPresent = 0; } Are you certain you only wanted a single equal operator in the last elseif()

Re: [PHP] whoami explanation

2009-03-04 Thread Shawn McKenzie
Robert Cummings wrote: On Wed, 2009-03-04 at 15:48 -0600, Shawn McKenzie wrote: Whatever you do, please, please, please, for the love of all that is holy, please, do not vilify potatoes! ...or the Irish :-) Potatoes are best served sliced into sticks, pan-fried, covered in cheese curds

Re: [PHP] if elseif elseif elseif....

2009-03-04 Thread Shawn McKenzie
PJ wrote: PJ wrote: Daniel Brown wrote: On Wed, Mar 4, 2009 at 17:51, PJ af.gour...@videotron.ca wrote: elseif ($obligatoryFieldNotPresent = 1) { $obligatoryFieldNotPresent = 0; } Are you certain you only wanted a single equal operator in the last elseif() condition? Further,

Re: [PHP] whoami explanation

2009-03-04 Thread Shawn McKenzie
PJ wrote: Shawn McKenzie wrote: Robert Cummings wrote: On Wed, 2009-03-04 at 15:48 -0600, Shawn McKenzie wrote: Whatever you do, please, please, please, for the love of all that is holy, please, do not vilify potatoes! ...or the Irish :-) Potatoes are best served sliced

Re: [PHP] whoami explanation

2009-03-04 Thread Shawn McKenzie
Shawn McKenzie wrote: PJ wrote: Shawn McKenzie wrote: Robert Cummings wrote: On Wed, 2009-03-04 at 15:48 -0600, Shawn McKenzie wrote: Whatever you do, please, please, please, for the love of all that is holy, please, do not vilify potatoes! ...or the Irish :-) Potatoes

[PHP] Re: whoami explanation

2009-03-03 Thread Shawn McKenzie
PJ wrote: This really needs some explanation I found this on the web: ?php echo `whoami`; ? with it there was the comment the direction of those single-quotes matters (WHY ?) and it works But this (_*FROM THE PHP MANUAL***_ * - exec()* executes the given /command/ ) does not,

[PHP] Re: Problems with displaying results

2009-03-03 Thread Shawn McKenzie
Terion Miller wrote: I have two queries one pulls out which users to use and the second pulls those users orders Looks something like this but is only pulling the first record: $query = SELECT `UserName`, `AdminID` FROM admin WHERE Key1 = 'YES' ; $result =

Re: [PHP] Re: whoami explanation

2009-03-03 Thread Shawn McKenzie
PJ wrote: Shawn McKenzie wrote: PJ wrote: This really needs some explanation I found this on the web: ?php echo `whoami`; ? with it there was the comment the direction of those single-quotes matters (WHY ?) and it works But this (_*FROM THE PHP MANUAL***_ * - exec()* executes

[PHP] Re: Question about template systems

2009-03-03 Thread Shawn McKenzie
Matthew Croud wrote: Hello, First post here, I'm in the process of learning PHP , I'm digesting a few books as we speak. I'm working on a content heavy website that provides a lot of information, a template system would be great and so i've been looking at ways to create dynamic data with

[PHP] Re: Question about template systems

2009-03-03 Thread Shawn McKenzie
Shawn McKenzie wrote: Matthew Croud wrote: Hello, First post here, I'm in the process of learning PHP , I'm digesting a few books as we speak. I'm working on a content heavy website that provides a lot of information, a template system would be great and so i've been looking at ways

<    1   2   3   4   5   6   7   8   9   10   >