Re: [PHP] PDFlib error 2516

2004-01-16 Thread Jyry Kuukkanen
On Thu, 15 Jan 2004, Mark Wouters wrote: Hello! Tried out this simple script from a tutorial on creating PDF with PHP: ?php $pdf = PDF_new(); PDF_open_file($pdf, testpdf.pdf); PDF_set_info($pdf, Author, Someone); PDF_set_info($pdf, Title, PDF creation with PHP);

[PHP] Payment Gateway List ?

2004-01-16 Thread Dave Carrera
Hi List, Is there a definitive list or site that shows the required fields to post to or we need to be sent data in this format to the various and numerous pay gateways offering credit card clearance services. Paypal is straight forward and the code required is freely available on their site,

Re: [PHP] Image Header Issues

2004-01-16 Thread php
hiho, it could be a ie-problem, see http://support.microsoft.com/default.aspx?scid=kb;EN-US;810978 g. martin luethi Thu, 15 Jan 2004 14:18:29 -0800 Bob Eldred [EMAIL PROTECTED]: Well, I've done a lot of web searching, and a lot of experimentation, but haven't hit upon a fix for my issue

Re: [PHP] R: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-16 Thread SLanger
Hello Not sure if you thought of it or if it even applies to you but when you use PEAR::DB::getOnce(SELECT LAST_INSERT_ID()); to retrieve the id do consider concurrent access to the database when using it for inserting stuff. Been there and its a hassle to resolve this little huge bug ; )

RE: [PHP] Where is the mistace? Warning: ftp_put(): 'STOR ' not u nderstood.

2004-01-16 Thread Ford, Mike [LSS]
On 15 January 2004 21:03, Jay Blanchard wrote: [snip] That shouldnt matter, because FTP_BINARY is a constant, and therfore has a numeric, or string value. The only way FTP_BINARY would become a physical string is if there was quotes around it. As for the problem, are you sure you have

RE: [PHP] Re: PHP Includes and Echoes in Head Sections and Search Engines

2004-01-16 Thread Ford, Mike [LSS]
On 15 January 2004 22:39, Luke wrote: ? Holy cow, this gets simpler all the time. Pretty soon, there'll be ? nothing left on my page but PHP includes and echo functions! ? ? Does this cut down on a website's file size? In other words, are the php ? includes effectively inactive when no one's

[PHP] dynamicly generating a transparent truecolor image

2004-01-16 Thread Michel van der Breggen
hi, i have a problem, i would like to dynamicly generete a transparent truecolor image in php. The problem is that imagecreatetruecolor standard creates a black image. Does anybody have a solution for this? Thanks in advance, Michel van der Breggen [EMAIL PROTECTED] -- PHP General Mailing List

RE: [PHP] Re: PHP Includes and Echoes (Sorry; read this post firs t!)

2004-01-16 Thread Ford, Mike [LSS]
On 16 January 2004 00:30, Freedomware wrote: I should have played with this some more before I posted more questions. After fixing an error on the included page, I replaced every instance of na/a1 on both pages with a1. That seemed to fix everything; the first style sheet comes through, but

[PHP] Sessions: strange behaviour in 4.3.3 ?

2004-01-16 Thread Dino Tsoumakis
Hi, I found a strange behavior in session handling functions after an update to PHP 4.3.3. I wrote a simple test class, which can be viewed here: http://www.serv-int.de/class.session.txt In PHP 4.2.2 the output was something like that: open:

[PHP] /VAR is driving me crazy

2004-01-16 Thread Boaz Yahav
Hi Does anyone have an idea what is so special about the string /VAR ? If i create a form that submits to a php file and in the form i put the string /VAR anywhere in the text or just /VAR I get an 404 error from apache on an existing file. If i take the same form and remove the /VAR string all

[PHP] Non American strtotime

2004-01-16 Thread Tom
Is there a way I can force PHP's time functions not to read date strings in the American MM-DD- format? I am using strtotime and strftime and date at various points (mainlty to avoid some niggly 0/NULL problems between PHP and mySQL and datefields). My date calculations (which are done in

RE: [PHP] Payment Gateway List ?

2004-01-16 Thread Dave Carrera
Hi Berber, I think this would be a good page / site section to host for the php community to contribute to and I propose that I make a dedicated forum section on my dev site http://www.tigeri.com/forum for this purpose. This can then be updated by the contributors. I will do it now and I look

[PHP] random html +(hi)

2004-01-16 Thread Angela K Hilton
Hi All I'm new to this list and I suppose fairly new to PHP - and hope that this question is in keeping with the type of thing that's usually asked. I'm trying to dynamically randomise a chunk of HTML that is used on a page, aka random image, so that each time a client opens the page [or

[PHP] Forms, ListBoxes, Validating Errors.

2004-01-16 Thread Kacey A. Murphy
What I have is an issue with posting forms with Dynamic ListBoxes. What happens is when you fill the form out, and hit submit, it validates the form .. if there is a required field not filled out, it comes back and gives an error. All the textfields have all the information and the Static

Re: [PHP] Forms, ListBoxes, Validating Errors.

2004-01-16 Thread Richard Davey
Hello Kacey, Friday, January 16, 2004, 11:33:22 AM, you wrote: KAM What I have is an issue with posting forms with Dynamic ListBoxes. KAM What happens is when you fill the form out, and hit submit, it validates the KAM form .. if there is a required field not filled out, it comes back and gives

[PHP] RE:AGAIN [PHP] Forms, ListBoxes, Validating Errors.

2004-01-16 Thread Kacey A. Murphy
-Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 6:43 AM To: Kacey A. Murphy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Forms, ListBoxes, Validating Errors. Hello Kacey, Friday, January 16, 2004, 11:33:22 AM, you wrote: KAM What I have is an

[PHP] Please help me with these questions..

2004-01-16 Thread SASSINC Internet Solutions - Arabic Department
Hi all.. I'm a beginner in PHP.. And I'm working on a project.. I want your help please to learn how to : 1- MD5 with PHP values. 2- Random values in PHP. 3- Inserting values to mySQL DB by PHP and importing from them also to send echo. (For example : after MD5 some strings in PHP I want to

Re: [PHP] Non American strtotime

2004-01-16 Thread Jon Bennett
try using this function to re-order UK to US dates and vice versa // converts a UK date (DD-MM-YYY) to a US date (MM-DD-) and vice versa so strtotime doesn't fail // expects a string such as 24/05/2004 or 05/24/2004 function convertDate ($sDate) { $aDate = split (/, $sDate);

Re: [PHP] random html +(hi)

2004-01-16 Thread Richard Davey
Hello Angela, Friday, January 16, 2004, 11:30:16 AM, you wrote: AKH ?php AKH // images in folder AKH $total = 5; AKH // file type AKH $file_type = .htm, .gif, .jpg; AKH // dir location AKH $image_folder = dir/dir; AKH $start = 1; AKH $random = mt_rand($start, $total); AKH $image_name =

Re: [PHP] Please help me with these questions..

2004-01-16 Thread Richard Davey
Hello, Friday, January 16, 2004, 11:54:26 AM, you wrote: SISAD I'm a beginner in PHP.. And I'm working on a project.. SISAD I want your help please to learn how to : SISAD 1- MD5 with PHP values. $md5 = md5($variable); SISAD 2- Random values in PHP. $min = 1; $max = 100; $random =

RE: [PHP] Non American strtotime

2004-01-16 Thread Ford, Mike [LSS]
On 16 January 2004 11:14, Tom wrote: Is there a way I can force PHP's time functions not to read date strings in the American MM-DD- format? I am using strtotime and strftime and date at various points (mainlty to avoid some niggly 0/NULL problems between PHP and mySQL and

[PHP] PHP or Apache Problem?

2004-01-16 Thread Nick Wilson
Hi all, I'm getting this error on a well tested and used CMS script: ** CODE warning: main(): URL file-access is disabled in the server configuration in /var/www/localhost/htdocs/ellasattic.co.uk/error.php on line 19. warning: main(http://ellasattic.co.uk/index.php): failed to open stream: no

Re: [PHP] PHP or Apache Problem?

2004-01-16 Thread Richard Davey
Hello Nick, Friday, January 16, 2004, 12:39:16 PM, you wrote: NW Line 19 is a simple include() but uses 'http://' rather than a local NW path (i cannot change this)... allow_url_fopen is almost certainly disabled in your php.ini file. -- Best regards, Richard

[PHP] How to compare between two values?

2004-01-16 Thread SASSINC Internet Solutions - Arabic Department
Hi again.. How to compare between two values, One imported from a mySQL DB and the other grabbed by GET (http://www.sitename.com/test.php?value2=3342g345) Waiting your replies.. regards..

Re: [PHP] PHP or Apache Problem?

2004-01-16 Thread Nick Wilson
* and then Richard Davey declared Hello Nick, Friday, January 16, 2004, 12:39:16 PM, you wrote: NW Line 19 is a simple include() but uses 'http://' rather than a local NW path (i cannot change this)... allow_url_fopen is almost certainly disabled in your php.ini file. Yes, that

Re: [PHP] How to compare between two values?

2004-01-16 Thread Nick Wilson
* and then SASSINC Internet Solutions - Arabic Department declared Hi again.. How to compare between two values, One imported from a mySQL DB and the other grabbed by GET (http://www.sitename.com/test.php?value2=3342g345) if($myMySQLValue==$_GET['myGetVar']) { do stuff } --

Re: [PHP] How to compare between two values?

2004-01-16 Thread Stuart
SASSINC Internet Solutions - Arabic Department wrote: How to compare between two values, One imported from a mySQL DB and the other grabbed by GET (http://www.sitename.com/test.php?value2=3342g345) Waiting your replies.. It is clear that you have not followed Richards advice and downloaded the

Re: [PHP] How to compare between two values?

2004-01-16 Thread Chris Knipe
err if ($_GET['value2'] == $DataRecord['Value1']) { // do something } ? - Original Message - From: SASSINC Internet Solutions - Arabic Department [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 16, 2004 2:42 PM Subject: [PHP] How to compare between two values?

[PHP] Justin is a genius

2004-01-16 Thread Robert Temple
Just wanted to say Thanks! and acknowledge the help I received from this list. I had a question about dynamic forms that had me stumped and got back several informative replies. In particular, Justin French solved the problem with just a few lines of code - the sign of a true genius. Thanks

Re: [PHP] random html +(hi)

2004-01-16 Thread memoimyself
Hello Angela, On 16 Jan 2004 at 11:30, Angela K Hilton wrote: I'm trying to dynamically randomise a chunk of HTML that is used on a page, aka random image, so that each time a client opens the page [or refreshes] a part of the page changes. The chunks of HTML are saved in their own

[PHP] Re: /VAR is driving me crazy

2004-01-16 Thread DvDmanDT
I don't have any problems with it... -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Boaz Yahav [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Hi Does anyone have an idea what is so special about the string /VAR ? If i create a form that submits to a php file and

Re: [PHP] Re: PHP Includes and Echoes (From the top...)

2004-01-16 Thread Freedomware
Thanks for all the tips. It's getting generally getting clearer, but I'm a little confused somewhere. Can I give you a better explanation of what I'm trying to do, along with my latest code? The pages on this site focus on various nations and states, with lots of links like this: [LOCAL]

[PHP] Syntax Error - This is WEIRD!

2004-01-16 Thread Nick Wilson
if a script calls antohter like 'include('http://site.com/index.php'); Why would I get a syntax error on line 1 of index.php when it looks like this: ?php // line one above this one What's the deal there? Many thanks for any insight ;-) -- Nick W -- PHP General Mailing List

Re[2]: [PHP] PHP or Apache Problem?

2004-01-16 Thread Richard Davey
Hello Nick, Friday, January 16, 2004, 12:47:43 PM, you wrote: NW I'm getting this now: NW Parse error: parse error in http://ellasattic.co.uk/index.php on line 1 NW ### CODE NW ?php NW // $Id: index.php,v 1.68 2003/09/30 17:00:49 dries Exp $ NW ### END CODE NW What? - how can that be? - is

Re: [PHP] Syntax Error - This is WEIRD!

2004-01-16 Thread Richard Davey
Hello Nick, Friday, January 16, 2004, 2:16:43 PM, you wrote: NW if a script calls antohter like NW 'include('http://site.com/index.php'); NW Why would I get a syntax error on line 1 of index.php when it looks like NW this: NW ?php NW // line one above this one NW What's the deal there? Say

[PHP] Combining results - is there better way?

2004-01-16 Thread Miles Thompson
This code works, but are there alternate, more efficient ways of doing it. A count of subscribers, by classification, has to be provided, where the classification definitions are in one table (class) with this structure: nClassKey - unique, numeric, autoincrement Classification - text

[PHP] Re: PHP Collaboration

2004-01-16 Thread Marco
Cesar Aracena wrote: Does anyone knows of any nice PHP/MySQL program (free of course) that could help me do a more efficient collaboration between me and my programming partners? I've tried like 8 of them but the nice ones are pricely. I need to We use http://www.phprojekt.com/ Then also I've

RE: [PHP] Image Header Issues

2004-01-16 Thread Arthur Pelkey
I've had this same problem, and it was not related to any script I wrote, ie just stopped saving in any other format(for images), besides bmp, I am sure there would be something on ms's knowledge base, but it escapes me what I did to fix it, or updated. -Original Message- From: [EMAIL

Re: [PHP] PHP or Apache Problem?

2004-01-16 Thread Nick Wilson
* and then Richard Davey declared Why do you have code comments OUTSIDE of the php tags? I can't say for sure, but it wouldn't surprise me if it caused it. I dont. That's just in my email to tell where the code begins ;-) line 1 is just ?php -- Nick W -- PHP General Mailing List

Re[2]: [PHP] PHP or Apache Problem?

2004-01-16 Thread Richard Davey
Hello Nick, Friday, January 16, 2004, 2:31:46 PM, you wrote: NW I dont. That's just in my email to tell where the code begins ;-) NW line 1 is just NW ?php Heh :) Do other scripts work fine? i.e. is it just that one that dies? -- Best regards, Richard

[PHP] Re: Please help me with these questions..

2004-01-16 Thread Ben Ramsey
An excellent resource for all these questions is the documentation found at http://www.php.net/docs.php. Below, I've provided some links to the specfic docs for each question. 1- MD5 with PHP values. http://www.php.net/md5 2- Random values in PHP.

[PHP] Schedule an Event with PHP

2004-01-16 Thread Alex Pilson
Say I want a MySQL database to have a table that holds certain events, the Event table. And in the event table, one of the records is an event that has a startdate of today, I want to check against that date, if it equals now, then do this Besides using CRON to hit that particular event

Re: [PHP] Syntax Error - This is WEIRD!

2004-01-16 Thread Nick Wilson
* and then Richard Davey declared Hello Nick, Friday, January 16, 2004, 2:16:43 PM, you wrote: NW if a script calls antohter like NW 'include('http://site.com/index.php'); NW Why would I get a syntax error on line 1 of index.php when it looks like NW this: NW ?php NW // line

Re: [PHP] Non American strtotime

2004-01-16 Thread Tom
Ford, Mike [LSS] wrote: On 16 January 2004 11:14, Tom wrote: Is there a way I can force PHP's time functions not to read date strings in the American MM-DD- format? [*snip*] Is there a way I can have strtotime read 10-01-2004 (and all other such date connotations) as the 10th Jan and

[PHP] Re: How to compare between two values?

2004-01-16 Thread Ben Ramsey
How to compare between two values You may also use strcmp() to compare string values: if (strcmp($string1, $string2) == 0) { //do stuff } I know that in ASP (*gasp*... he uses a MS technology!) the StrComp function has an increased performance difference over comparing the strings with an

Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread Stuart
Alex Pilson wrote: Say I want a MySQL database to have a table that holds certain events, the Event table. And in the event table, one of the records is an event that has a startdate of today, I want to check against that date, if it equals now, then do this Besides using CRON to hit that

Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread John W. Holmes
Alex Pilson wrote: Say I want a MySQL database to have a table that holds certain events, the Event table. And in the event table, one of the records is an event that has a startdate of today, I want to check against that date, if it equals now, then do this Besides using CRON to hit that

Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread Richard Davey
Hello Alex, Friday, January 16, 2004, 2:36:45 PM, you wrote: AP Besides using CRON to hit that particular event table, is there any AP other method I am not thinking of that can be used with PHP? I want AP to check that event table every 5 minutes. Use cron. There are several other ways, but

[PHP] Re: Schedule an Event with PHP

2004-01-16 Thread Ben Ramsey
Besides using CRON to hit that particular event table, is there any other method I am not thinking of that can be used with PHP? I want to check that event table every 5 minutes. If this is on a Web site, can you not just check the database everytime a user hits a page in the site rather than

[PHP] Syntax Error - This is WEIRD!

2004-01-16 Thread Donald Tyler
There could be something you're not seeing and assuming it's correct. But typing your code into the email we aren't getting the full story. Can you actually attach your scripts to an email and send that? Copying and pasting then into the email won't necessarily provide all the info needed to

Re: [PHP] Non American strtotime

2004-01-16 Thread John W. Holmes
Tom wrote: The end user gets to chose their date format, and so if I cannot reverse their arbitrary date format into a timestamp then I have no chance of ensuring that dates are correct. This seems like a really fundamentally bad thing about PHP :( Seems like a fundamental flaw in your

[PHP] aggregate, parent::

2004-01-16 Thread Veres Lajos
Hello, When I use an aggregated variable, how parent:: is defined? (in perl: SUPER:: or NEXT::) parent of the current classes, or parent of the original class? (PS: I'm not in list, please CC: me) Veres Lajos [EMAIL PROTECTED] +36 20 438 5909 -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Non American strtotime

2004-01-16 Thread John W. Holmes
Tom wrote: Is there a way I can force PHP's time functions not to read date strings in the American MM-DD- format? If you read the strtotime() manual page, there is a link to this page: http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html which gives you all of the formats that are

Re: [PHP] R: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-16 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Hello Not sure if you thought of it or if it even applies to you but when you use PEAR::DB::getOnce(SELECT LAST_INSERT_ID()); to retrieve the id do consider concurrent access to the database when using it for inserting stuff. Been there and its a hassle to resolve

Re: [PHP] Non American strtotime

2004-01-16 Thread Bogdan Stancescu
John W. Holmes wrote: Tom wrote: The end user gets to chose their date format, and so if I cannot reverse their arbitrary date format into a timestamp then I have no chance of ensuring that dates are correct. This seems like a really fundamentally bad thing about PHP :( Seems like a

Re: [PHP] /VAR is driving me crazy

2004-01-16 Thread John W. Holmes
Boaz Yahav wrote: Hi Does anyone have an idea what is so special about the string /VAR ? If i create a form that submits to a php file and in the form i put the string /VAR anywhere in the text or just /VAR I get an 404 error from apache on an existing file. If i take the same form and remove the

[PHP] LOAD_FILE and PHP

2004-01-16 Thread Jough P
Greetings all, I can't get LOAD_FILE to work in an INSERT statement from PHP. The generated sql works when you're in mysql but won't work from PHP. BSDB is my database object. sql_query basically just does a mysql_query and some error outputting stuff. There error is: Column 'photo' cannot

RE: [PHP] Re: PHP Includes and Echoes (From the top...)

2004-01-16 Thread Ford, Mike [LSS]
On 16 January 2004 13:54, Freedomware wrote: Thanks for all the tips. It's getting generally getting clearer, but I'm a little confused somewhere. [SNIP] I inserted one of the functions you suggested - $includea1 = TRUE; - after the include, but I'm sure I did it wrong. Just like before

Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread Alex Pilson
At 9:44 AM -0500 1/16/04, John W. Holmes wrote: Alex Pilson wrote: Say I want a MySQL database to have a table that holds certain events, the Event table. And in the event table, one of the records is an event that has a startdate of today, I want to check against that date, if it equals now,

RE: [PHP] Syntax Error - This is WEIRD!

2004-01-16 Thread Jeremy
Did the script accidently get saved in MS-DOS text format? -Original Message- From: Donald Tyler [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 8:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Syntax Error - This is WEIRD! There could be something you're not seeing and assuming

RE: [PHP] /VAR is driving me crazy - SOLVED

2004-01-16 Thread Boaz Yahav
Actually i just found the problem. My sysadmin recently added MOD Security and one of the lines that my conf file had was : SecFilter /var Security people can drive me crazy :) Sincerely berber Visit http://www.weberdev.com/ http://www.weberblog.com/ Today!!! To see where PHP might take

[PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi, I've got a dynamically generated form and once it's submitted I need to _push the data from my form elements into an array so I can ad them to the db. My form elements are created like so: ?php $i = 1; while ($i = $iListItems){ ? div class=row div class=labelList Item ?php print $i

Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread Jason Wong
On Friday 16 January 2004 23:25, Alex Pilson wrote: BTW. I didn't get what Stuart said about replying to an existing thread, did something screw up when I sent to the list? He means: You have started a new thread by taking an existing posting and replying to it while you changed the subject.

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi, Sorry for the double post, meant to say 'but nothing appears to be added to the array' not the db! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts,

Re: [PHP] Combining results - is there better way?

2004-01-16 Thread John W. Holmes
Miles Thompson wrote: This code works, but are there alternate, more efficient ways of doing it. A count of subscribers, by classification, has to be provided, where the classification definitions are in one table (class) with this structure: nClassKey - unique, numeric, autoincrement

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Richard Davey
Hello Jon, Friday, January 16, 2004, 3:29:07 PM, you wrote: JB And after the form is submitted I assumed I could do this... JB $aListItems = array(); JB $i = 1; JB while ($i = $iListItems) { JB $tempItem = $_POST[listItem . $i]; JB array_push($aListItems, $tempItem); JB ++$i; JB

[PHP] Re: dynamic array creation from form elements

2004-01-16 Thread Ben Ramsey
Try using $_POST[listItem$i] instead of $_POST[listItem . $i] or do something like this: $post_var_name = 'listItem' . $i; this do $_POST[$post_var_name]; I don't think you can do any evaluation within the brackets. Thus, you couldn't use the concatenating dot. -Ben -- PHP General Mailing

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi Rich, $iListItems is set when a user chooses how many list elements they require (this is for the example pages I was asking about) and is always greater than 0 (we don't get this far in the script if it's not!). Anyway, it was my silly fault, I had changed the name of my form elements

[PHP] Re: dynamic array creation from form elements

2004-01-16 Thread Ben Ramsey
I don't think you can do any evaluation within the brackets. Thus, you couldn't use the concatenating dot. Nevermind... I am wrong on this. But, I also completely missed that the code you have posted doesn't set $iListItems as Richard suggested. So, go with his suggestion. :) -Ben -- PHP

Re: [PHP] Re: dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi Ben, Sorry, it does work - so I can safely say you can concat the name of a associ array :-) Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14

[PHP] SOLVED = is ' or different in MS-Word then ascII?

2004-01-16 Thread Roger Spears
Here is a real code solution instead of my original posted client solution My original problem involved text submitted via the good old fashion textarea in a web form. If a visitor created their text in MS-Word and then cut and paste their text over to the web form and submitted, any

Re: [PHP] LOAD_FILE and PHP

2004-01-16 Thread John W. Holmes
Jough P wrote: Greetings all, I can't get LOAD_FILE to work in an INSERT statement from PHP. The generated sql works when you're in mysql but won't work from PHP. BSDB is my database object. sql_query basically just does a mysql_query and some error outputting stuff. There error is: Column

Re: [PHP] a clean way to upload

2004-01-16 Thread Matt Hedges
Thanks Jason. How would I do that? I mean, what would I put instead of if ($_FILES['imagefile']['type'] != image/pjpeg) thanks Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Friday 16 January 2004 10:32, Matt Hedges wrote: if ($_FILES['imagefile']['type'] !=

Re: [PHP] Combining results - is there better way?

2004-01-16 Thread Miles Thompson
John, Perfect. Don't know where my head was. Miles At 10:29 AM 1/16/2004 -0500, John W. Holmes wrote: Miles Thompson wrote: snip } // foreach My question is if there is a faster, cleaner way to do this? I did try array_search, but as it looks for any matching value anywhere in the target array

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread John W. Holmes
Jon Bennett wrote: Hi, I've got a dynamically generated form and once it's submitted I need to _push the data from my form elements into an array so I can ad them to the db. My form elements are created like so: ?php $i = 1; while ($i = $iListItems){ ? div class=row div class=labelList

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
nice one, solves my next problem as well if any elements are empty! Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w:

[PHP] getimagesize() to find type?

2004-01-16 Thread Matt Hedges
On Friday 16 January 2004 10:32, Matt Hedges wrote: if ($_FILES['imagefile']['type'] != image/pjpeg) The 'type' in $_FILES is provided by the browser. IIRC only IE uses image/pjpeg whilst other browsers use image/jpeg. But regardless of what the browser sets, it is more reliable to get the

Re: [PHP] a clean way to upload

2004-01-16 Thread Jason Wong
On Friday 16 January 2004 23:55, Matt Hedges wrote: How would I do that? I mean, what would I put instead of if ($_FILES['imagefile']['type'] != image/pjpeg) the browser sets, it is more reliable to get the image type from getimagesize(). -- Jason Wong - Gremlins Associates -

Re: [PHP] Syntax Error - This is WEIRD!

2004-01-16 Thread Dagfinn Reiersøl
Nick Wilson wrote: if a script calls antohter like 'include('http://site.com/index.php'); Why would I get a syntax error on line 1 of index.php when it looks like this: ?php // line one above this one What's the deal there? Many thanks for any insight ;-) I've never tried to do an include

Re: [PHP] LOAD_FILE and PHP

2004-01-16 Thread Jough P
I've tried a couple different paths and double checked them. Permissions are 755. Like I said that exact same SQL statement inserts the correct record from the mysql command line. mysql INSERT INTO photo VALUES('', LOAD_FILE(/Library/WebServer/Documents/var/tmp/default_smiley.png)); does

Re: [PHP] a clean way to upload

2004-01-16 Thread Matt Hedges
? Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Friday 16 January 2004 23:55, Matt Hedges wrote: How would I do that? I mean, what would I put instead of if ($_FILES['imagefile']['type'] != image/pjpeg) the browser sets, it is more reliable to get the

Re: [PHP] Sessions: strange behaviour in 4.3.3 ?

2004-01-16 Thread Chris Shiflett
--- Dino Tsoumakis [EMAIL PROTECTED] wrote: Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at XX/class.session.php:61) in XX/class.session.php on line 38 You need to either put session_start() prior to any output (my preference) or

Re: [PHP] getimagesize() to find type?

2004-01-16 Thread Matt Matijevich
[snip] (1) How would I do that (use getimagesize() instead to find type)? [/snip] http://php.net/getimagesize [snip] (2) Stupid question: how do I say if ($_FILES['imagefile']['type'] != image/pjpeg) and add image/jpeg to that constraint? [/snip] there are many ways, I will show you an

[PHP] Regular Expression for Search/Replace

2004-01-16 Thread Tobias Engelhardt
Hi list, i hope someone can help me out... i have to replace a href=order.php?order_id=12345 with a href=order_12345.html any ideas? thank you! Tobias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Brad Pauly
On Fri, 2004-01-16 at 09:49, Tobias Engelhardt wrote: Hi list, i hope someone can help me out... i have to replace a href=order.php?order_id=12345 with a href=order_12345.html any ideas? thank you! What about just using the variable to build the name? $file_name =

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Tobias Engelhardt
That is not possible because the id's are hard-coded in thousands of html-pages. Not a very good idea, i know. It wasn't mine... I *have* to use search/replace. (A script processes each file in the directory) Brad Pauly wrote: What about just using the variable to build the name? $file_name =

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Mike Migurski
i hope someone can help me out... i have to replace a href=order.php?order_id=12345 with a href=order_12345.html any ideas? thank you! PCRE style: '/a href=order.php\?order_id=(\d+)/' replaced by 'a href=order_$1.html'. -

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Brad Pauly
On Fri, 2004-01-16 at 10:07, Tobias Engelhardt wrote: That is not possible because the id's are hard-coded in thousands of html-pages. Not a very good idea, i know. It wasn't mine... I *have* to use search/replace. (A script processes each file in the directory) Ah, I see. I think you could

RE: [PHP] Syntax Error - This is WEIRD!

2004-01-16 Thread Donald Tyler
Yes your right, that’s exactly the problem. I didn’t even realize he was doing that. By including the PHP file via HTTP, you are including the OUTPUT of the PHP file, not the actual PHP file itself. e.g. by including a file with the following code: ?PHP print 'Hello'; ? you would be

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Brad Pauly
On Fri, 2004-01-16 at 10:21, Brad Pauly wrote: On Fri, 2004-01-16 at 10:07, Tobias Engelhardt wrote: That is not possible because the id's are hard-coded in thousands of html-pages. Not a very good idea, i know. It wasn't mine... I *have* to use search/replace. (A script processes each

[PHP] sorting multi-dimensional arrays

2004-01-16 Thread Katie Dewees
Hi All, I've read the manual several times on sorting multi-dimensional arrays, but I can't seem to wrap my mind around what I need to do to accomplish my goal. //this is what I'm doing: (stepping through a result set, and putting it into a multi-dimensional array. while ($row =

Re: [PHP] Syntax Error - This is WEIRD!

2004-01-16 Thread Dagfinn Reiersl
Donald Tyler wrote: Yes your right, thats exactly the problem. I didnt even realize he was doing that. By including the PHP file via HTTP, you are including the OUTPUT of the PHP file, not the actual PHP file itself. e.g. by including a file with the following code: ?PHP print 'Hello'; ?

Re: [PHP] Sessions: strange behaviour in 4.3.3 ?

2004-01-16 Thread Dino Tsoumakis
Chris Shiflett [EMAIL PROTECTED] wrote news:[EMAIL PROTECTED] --- Dino Tsoumakis [EMAIL PROTECTED] wrote: Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at XX/class.session.php:61) in XX/class.session.php on line 38 You need to

Re: [PHP] mysql question

2004-01-16 Thread Christian Calloway
Well let me try and describe a simplified version of what I am doing. I work for a group of analysts, and they analyse technical products. Each products has about 300+ fields associated with it, and each product is vastly different from the other. Let's say the product foo has a table fields

[PHP] Re: sorting multi-dimensional arrays

2004-01-16 Thread Ben Ramsey
//now, I want that array sorted by the clinic_name, and then doc_name. Can someone who has more currently active brain cells than me figure out what the array_multisort function call should look like? In the documentation, I've found plenty of examples to do a multi-dimensional sort on one

Re: [PHP] sorting multi-dimensional arrays

2004-01-16 Thread Mike Migurski
I've read the manual several times on sorting multi-dimensional arrays, but I can't seem to wrap my mind around what I need to do to accomplish my goal. //this is what I'm doing: (stepping through a result set, and putting it into a multi-dimensional array. while ($row =

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Tobias Engelhardt
Thanks, that solved the problem... Mike Migurski wrote: i hope someone can help me out... i have to replace a href=order.php?order_id=12345 with a href=order_12345.html any ideas? thank you! PCRE style: '/a href=order.php\?order_id=(\d+)/' replaced by 'a href=order_$1.html'.

Re: [PHP] Syntax Error - This is WEIRD!

2004-01-16 Thread Jason Wong
On Saturday 17 January 2004 01:50, Dagfinn Reiersl wrote: Yes. I read the manual which provides no clear explanation (I suspect that whoever wrote it didn't actually know how it works). So I decided to test it. It does exactly what you say it does. I made an include file like this: In

[PHP] PHP Apache Build Problem

2004-01-16 Thread pw
Hello, I am trying to build php-4.3.3 into apache_1.3.28 as a module. I configure php --with-apache=/apache/source/path and the php make process puts the source for mod_php4 into /apache/source/path/src/modules/php4/ /apache/source/path/src/include/ap_config.h:77:28: ap_config_auto.h: No such

Re: [PHP] a clean way to upload

2004-01-16 Thread David T-G
Matt -- ...and then Matt Hedges said... % % ? He's telling you to search the list archives. This is not new ground you're breaking here. Just call getimagesize() on the temp file and see what type it reports back. HTH HAND :-D -- David T-G * There is too much animal

  1   2   >