Re: [PHP] 4 Digit ID with Leading Zeros

2005-12-16 Thread Curt Zirzow
I got lost in the mix of threads, so here is my input on the situation. On Thu, Dec 15, 2005 at 09:53:46AM -0500, Rahul S. Johari wrote: I want to assign a 4 Digit ID with leading zeros to each record added using a form I have created. The PHP scripts does two things: (a) It adds the data

Re: [PHP] Questions from a ColdFusion Developer

2005-12-16 Thread Robert Cummings
On Thu, 2005-12-15 at 22:24, Christopher Jordan wrote: I think you've hit the nail on the head there, but I'm sorta glad the subject's come up since I'm learning about a concept that I've not used before. Is it mostly used for purposes of scalability? It seems like it might be that way.

[PHP] One big file or many includes?

2005-12-16 Thread Martin Leduc
Hi everyones, I coding PHP since 2002 and this is the first time I have to take this decision. My group and I have to build a VERY, VERY BIG website for a callcenter users. Understand I have to create (or use ;)) several code for access, transactions and management. The customer had buy

Re: [PHP] One big file or many includes?

2005-12-16 Thread Aaron Koning
I don't know about whats best for the compiler (rather interpreter), but if it is a really big site with a lot of access, transaction and management functionality I recommend you start breaking the code into classes and separating each class into a file and documenting... A LOT! It will be clearer

Re: [PHP] One big file or many includes?

2005-12-16 Thread Adrian Bruce
Definitely sounds as if you should be employing the object-orientated methodology, If the project is as big as you say it is then really you should be looking to use some UML planning tool so that you can keep all you code organised. It is ok on smaller projects to bash out some rough plans

Re: [PHP] Help with the copy command...

2005-12-16 Thread Robin Vickery
On 12/15/05, Tim Meader [EMAIL PROTECTED] wrote: Okay, this seems like a ridiculously easy question which shouldn't even need asking, but I'm having trouble getting the builtin copy command to work properly. It seems to work fine as long as I feed it a full constant string path for each

Re: [PHP] simple-ish question but something i never knew

2005-12-16 Thread Karlos Zafra
2005/12/10, Robert Cummings [EMAIL PROTECTED]: On Sat, 2005-12-10 at 10:45, Zareef Ahmed wrote: - Original Message - From: Robert Cummings [EMAIL PROTECTED] To: Aaron Koning [EMAIL PROTECTED] Cc: PHP-General php-general@lists.php.net Sent: Saturday, December 10, 2005 3:07 AM

[PHP] PHP/MySQL noob rides again.. into trouble

2005-12-16 Thread Paul Jinks
Hi all, I have a site where users can search study projects. I'd like to be able to clicks on a project title which passes a variable to this page, which then displays all the data on that project in a table. Cool - and to a noob like me, actually pretty exciting. Except it doesn't work. I

Re: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-16 Thread David Grant
Paul Jinks wrote: $SQLQuery = SELECT * FROM project WHERE projTitle = .$HTTP_GET_VARS['projTitle'] or die(SQLQuery 1 failed); $SQLQuery = SELECT * FROM project WHERE projTitle = ' . $HTTP_GET_VARS['projTitle'] . '; Not sure why you've got the or die() there.

Re: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-16 Thread Richard Davey
On 16 Dec 2005, at 12:30, Paul Jinks wrote: I have a site where users can search study projects. I'd like to be able to clicks on a project title which passes a variable to this page, which then displays all the data on that project in a table. Cool - and to a noob like me, actually pretty

RE: [PHP] Random Images with no duplicates?

2005-12-16 Thread Kilbride, James
Actually with this idea all you do is reduce $max after each successful pull and 'increment' over pictures you already have. That way you never have to pull another random number. You just may have to increment through the entire set of pulled images if you pulled a high enough number. for($i =

Re: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-16 Thread Paul Jinks
David Grant wrote: $SQLQuery = SELECT * FROM project WHERE projTitle = ' . $HTTP_GET_VARS['projTitle'] . '; Yep, that fixed it. Thanks. I had a feeling there was a mix up with the s and 's. What's with the . s? Not sure why you've got the or die() there. I had the idea that you could

Re: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-16 Thread Paul Jinks
Richard Davey wrote: ($HTTP_GET_VARS), because lots do not. I would suggest replacing $HTTP_GET_VARS with $_GET (in all instances), because the long format will eventually vanish and your script will cease to work. Cheers Rich, will sort this out. I assume you removed the MySQL details

Re: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-16 Thread David Grant
Paul, Paul Jinks wrote: David Grant wrote: $SQLQuery = SELECT * FROM project WHERE projTitle = ' . $HTTP_GET_VARS['projTitle'] . '; Yep, that fixed it. Thanks. I had a feeling there was a mix up with the s and 's. What's with the . s? The . is a concatenation operator, i.e. it joins two

RE: [PHP] PHP/MySQL noob rides again.. into trouble

2005-12-16 Thread Kilbride, James
periods are used to do string concatenation. So if you want to break a statement up you can do: $string = First part. . And this is the second part; I often do it when inserting variables: $sql = select * from The_Other_Guy; if(case 1) { $sql .= where The_Other_Guy.Is = .$something; }

[PHP] upload path

2005-12-16 Thread Adrian Bruce
hi all a quick one i hope! i am trying to allow users to save a set of data as a csv file when clicking on a link on our intranet. i can do all the formatting and output to file but i would like the user to be able to specify where the file is saved in the same way as they would choose a

RE: [PHP] Is it possible to use header() to POST form data?

2005-12-16 Thread Jay Blanchard
[snip] Does anyone know if it's possible to use the header() function to POST form data to a URL? If so what syntax needs to be used? [/snip] You will want to check out http://www.php.net/curl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP 4.4.1 array_set_current bug?

2005-12-16 Thread Eric Butera
Hello all, I have an image gallery script I created and I seem to be having some difficulties with it. I am using this script on many different platforms and different PHP versions. I have tried it on 4.4.0 (linux) and 4.3.11(entrophy osx). The problem is with PHP version 4.4.1 from what I can

RE: [PHP] Random Images with no duplicates?

2005-12-16 Thread Jared Williams
Hi, Just unset the ones you've picked ?php #random images example #this is your file $file = images.txt; #open the file $openFile = file($file); #generate a random number srand((double)microtime()*100); #get one of the entries in the file for ($i = 0; $i 10; ++$i) { $r =

RE: [PHP] upload path

2005-12-16 Thread Jay Blanchard
[snip] a quick one i hope! i am trying to allow users to save a set of data as a csv file when clicking on a link on our intranet. i can do all the formatting and output to file but i would like the user to be able to specify where the file is saved in the same way as they would choose a file

Re: [PHP] upload path

2005-12-16 Thread Adrian Bruce
i see what you mean but i dont think that will work for me, ideally just want them to choose a location after which i will create the file in this location. the only option i can think of the moment is to default to the users home directory. Ive just realised that the subject of my email is

RE: [PHP] upload path

2005-12-16 Thread Jay Blanchard
[snip] i see what you mean but i dont think that will work for me, ideally just want them to choose a location after which i will create the file in this location. the only option i can think of the moment is to default to the users home directory. Ive just realised that the subject of my

Re: [PHP] upload path

2005-12-16 Thread Oli Howson
Allow them to browse the server (up to a limited level), saving the current selected path within the $_GET string. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] upload path

2005-12-16 Thread Adrian Bruce
aaah, scrap that, i think i have solved my own problem, thanks for your time anyway, Jay Blanchard wrote: [snip] i see what you mean but i dont think that will work for me, ideally just want them to choose a location after which i will create the file in this location. the only option i

[PHP] mysql select statement in php having three conditions

2005-12-16 Thread sunaram patir
hi, can someone tell me how to do this: i have to retrive data from a mysql table let's sayTABLE . i have to check that the rows i retrive meet this condition: field1='$variable',field2 is false and field3 is also false. as you can see field2 and field3 are bool type. field1 is varchar. i did

Re: [PHP] i18n maybe?

2005-12-16 Thread Al
Jochem's right about this. I've just encountered problems trying to utf-8_decode strings. I now just make certain everying is set for utf-8, from webpage on. So far, no problems with this approach. Al... Jochem Maas wrote: hi Richard, what charset is your DB set to use? what charset

RE: [PHP] mysql select statement in php having three conditions

2005-12-16 Thread Jay Blanchard
[snip] can someone tell me how to do this: i have to retrive data from a mysql table let's sayTABLE . i have to check that the rows i retrive meet this condition: field1='$variable',field2 is false and field3 is also false. as you can see field2 and field3 are bool type. field1 is varchar. i

Re: [PHP] One big file or many includes?

2005-12-16 Thread John Nichel
Martin Leduc wrote: Hi everyones, I coding PHP since 2002 and this is the first time I have to take this decision. My group and I have to build a VERY, VERY BIG website for a callcenter users. Understand I have to create (or use ;)) several code for access, transactions and management.

[PHP] PHP and Apache 2.2.0

2005-12-16 Thread Kevin McBride
Hello, I hope I am not repeating something that was discussed on this list before. I am curious to know if there are plans to make a module for Apache 2.2.0. I couldn't find it in the anonymous CVS, but if it's already there, can someone point to me where it is? - KJM -- PHP General Mailing

RE: [PHP] upload path

2005-12-16 Thread Weber Sites LTD
Something like this? http://www.weberdev.com/get_example-3701.html Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. PHP code examples : http://www.weberdev.com PHP Web Logs : http://www.weberblog.com/ PHP MySQL Forums :

[PHP] Fatal error 'Unable to read from thread kernel pipe' when using mail() function

2005-12-16 Thread Stut
Hi All, I've just upgraded the PHP port installation on my server to v4.4.1 and the mail function has stopped working. I created a script that simply calls the mail function to send a test email ad this is what I get when I run it... [EMAIL PROTECTED]:~$ php test.php Fatal error 'Unable to

Re: [PHP] simple-ish question but something i never knew

2005-12-16 Thread Robert Cummings
On Fri, 2005-12-16 at 06:59, Karlos Zafra wrote: 2005/12/10, Robert Cummings [EMAIL PROTECTED]: I've tried this in my server and had no problem. ?php session_start(); $_SESSION['string']=foobar; header(location:print_string.php); ? ?php session_start(); echo String =

[PHP] Re: PHP and Apache 2.2.0

2005-12-16 Thread Kevin McBride
belia wrote: Hi, You can download at http://www.apachelounge.com/download/ I am using Linux, not Windows, so the content there will not work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php file upload permission query

2005-12-16 Thread Burhan
Angelo Zanetti wrote: thanks, but Im sure there is something that is messing up the file permissions that I can change before the upload, instead of trying to cure the problem by setting the chmod of the file after its uplaoded Check the following things: 1. umask settings on the

[PHP] Can anyone recommend a hosting company

2005-12-16 Thread Marty
Can anyone recommend a fair priced, reliable hosting company that would best meet my needs as follows: Shared plan with PHP Windows server Mssql Need to host multiple domains under one account. thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Can anyone recommend a hosting company

2005-12-16 Thread Dan Harrington
I'd recommend www.xiolink.com Thanks Dan -Original Message- From: Marty [mailto:[EMAIL PROTECTED] Sent: Friday, December 16, 2005 9:10 AM To: php-general@lists.php.net Subject: [PHP] Can anyone recommend a hosting company Can anyone recommend a fair priced, reliable hosting company

Re: [PHP] Can anyone recommend a hosting company

2005-12-16 Thread Oli Howson
I've been using www.wehostwebpages.com for about 4 years, been good to me :) Can anyone recommend a fair priced, reliable hosting company that would best meet my needs as follows: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can anyone recommend a hosting company

2005-12-16 Thread loveneesh.bansal
Hi, Please use www.veryfasthosting.net Regards, Love - Original Message - From: Oli Howson [EMAIL PROTECTED] To: php-general@lists.php.net Sent: 16 December 2005 10:21 Subject: Re: [PHP] Can anyone recommend a hosting company I've been using www.wehostwebpages.com for about 4

[PHP] Blocking Values From an External Source

2005-12-16 Thread Shaun
Hi, I have a script on my site for processing values sent from a contact form and emailing them to the webmaster. The script has been abused by spammers and my hosting company has recommended that I change the script to only accept information posted from my own URL. Could someone tell me how

Re: [PHP] Blocking Values From an External Source

2005-12-16 Thread Michael Hulse
On Dec 16, 2005, at 11:50 AM, Shaun wrote: I have a script on my site for processing values sent from a contact form and emailing them to the webmaster. The script has been abused by spammers and my hosting company has recommended that I change the script to only accept information posted

Re: [PHP] Blocking Values From an External Source

2005-12-16 Thread Jason Gerfen
Or try $defined['hostname'] = ALLOWED_DOMAIN_NAME; if ($_SERVER['SERVER_NAME'] != $defined['hostname']) { echo Not from my domain pal; } Michael Hulse wrote: On Dec 16, 2005, at 11:50 AM, Shaun wrote: I have a script on my site for processing values sent from a contact form and emailing

Re: [PHP] Blocking Values From an External Source

2005-12-16 Thread Michael Hulse
On Dec 16, 2005, at 12:05 PM, Michael Hulse wrote: http://us2.php.net/reserved.variables Check this post in the comment section of above url: Zoic 20-Sep-2005 11:39 I just wrote up this function to secure forms on my site so that you can't submit a form from anywhere but your site. This is

Re: [PHP] Help with the copy command...

2005-12-16 Thread Tim Meader
What difference are you seeing in the files I give in the example? Are they not identical paths? Thanks. Hristo Yankov wrote: The two examples you give are not the same? I see different files. Please, doublecheck. --- Tim Meader [EMAIL PROTECTED] wrote: Okay, this seems like a

[PHP] Weird html - No real cr

2005-12-16 Thread Gustav Wiberg
Hi there! Why do I get this kind of ... why don't cr work? There is now newline as when you view source in an ordinary html-file... I hope you guys understand what I mean... DOWN BELOW IS THE PHP CODE! :-) html head titlemain/title meta http-equiv=Content-Type content=text/html;

Re: [PHP] Weird html - No real cr

2005-12-16 Thread Gustav Wiberg
Hi Yes, but I assume that echo hrKontroll rad i textfil:$rowsInTextFile av $totalRowsInTextFilebr; would render a newline ? /G - Original Message - From: [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Sent: Saturday, December 17, 2005 12:15 AM Subject: Re: [PHP] Weird html

RE: [PHP] Weird html - No real cr

2005-12-16 Thread Brady Mitchell
Hi Yes, but I assume that echo hrKontroll rad i textfil:$rowsInTextFile av $totalRowsInTextFilebr; would render a newline ? /G Echo does not automatically add a newline, you would have to use \n to get newlines with the echo statement: echo hrKontroll rad i textfil:$rowsInTextFile

Re: [PHP] Help with the copy command...

2005-12-16 Thread adriano ghezzi
just put the wrong lines in a file and run it from the shell with php -f you should get more info about what's going wrong hyh ciao! 2005/12/16, Tim Meader [EMAIL PROTECTED]: What difference are you seeing in the files I give in the example? Are they not identical paths? Thanks. Hristo

Re: [PHP] Blocking Values From an External Source

2005-12-16 Thread Matt Stone
- Original Message - From: Shaun [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Friday, December 16, 2005 7:50 PM Subject: [PHP] Blocking Values From an External Source Hi, I have a script on my site for processing values sent from a contact form and emailing them to the

Re: [PHP] Can anyone recommend a hosting company

2005-12-16 Thread Jose Miguel
Try browsing the forums webhostingtalk.com, they have some pretty good reviews about several hosting companys. On 12/16/05, Marty [EMAIL PROTECTED] wrote: Can anyone recommend a fair priced, reliable hosting company that would best meet my needs as follows: Shared plan with PHP Windows

Re: [PHP] Can anyone recommend a hosting company

2005-12-16 Thread Ray Hauge
I use SiteFlip. Their prices are really low, and they offer quite a bit. www.siteflip.com Affiliates have some special discount prices as low as $11.40/yr for 250 MB space, 5GB transfer, 1 domain (you register it), PHP, MySQL, and more (no setup fees). http://affiliates.siteflip.com Jose

[PHP] setcookie doesn't save session properly

2005-12-16 Thread nhiemenz
I'm using setcookie($sessionName, $sessionid, time()+60*60*24*1, $sessionCookie['path'], $sessionCookie['domain'], $sessionCookie['secure']); to, obviously, store a session. The problem is that this always times out after 24 hours, and I can't figure out why. Is there something I'm missing?

Re: [PHP] setcookie doesn't save session properly

2005-12-16 Thread comex
I'm using setcookie($sessionName, $sessionid, time()+60*60*24*1, $sessionCookie['path'], $sessionCookie['domain'], $sessionCookie['secure']); to, obviously, store a session. Also, I only use session_start() so perhaps I'm supposed to call session_id()? I'm not sure why the cookie is

Re: [PHP] Binary Config file: Protect script(s): Powered-by logo: How to?

2005-12-16 Thread Michael Hulse
On Dec 15, 2005, at 10:15 PM, Michael Hulse wrote: On Dec 15, 2005, at 10:09 PM, Michael Hulse wrote: So, if you buy the gallery script, which I did (I think I spent like 20$), the Powered by Company Name disappears. I forgot to add: When you buy the script, the company will send you a new

Re: [PHP] Weird html - No real cr

2005-12-16 Thread Gustav Wiberg
Ok, thanx!:-) /G - Original Message - From: Brady Mitchell [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Saturday, December 17, 2005 12:35 AM Subject: RE: [PHP] Weird html - No real cr Hi Yes, but I assume that echo hrKontroll rad i textfil:$rowsInTextFile av