Re: [PHP] "sendmail_from" not set in php.ini or custom "From:" header missing

2004-07-16 Thread Curt Zirzow
* Thus wrote Wudi: > Script: > mail('[EMAIL PROTECTED]', 'Subject', 'Message', "From: [EMAIL PROTECTED]"); > ?> > > Result: > Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom > "From:" header missing in D:\ApacheData\htdocs\downloader\mail.php on line 2 > > Why does

Re: [PHP] "sendmail_from" not set in php.ini or custom "From:" header missing

2004-07-16 Thread Justin Patrin
On Sat, 17 Jul 2004 12:16:25 +0800, Wudi <[EMAIL PROTECTED]> wrote: > Script: > mail('[EMAIL PROTECTED]', 'Subject', 'Message', "From: [EMAIL PROTECTED]"); > ?> > > Result: > Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom > "From:" header missing in D:\ApacheData\h

Re: [PHP] Re: PHP5 and pass by reference bug.

2004-07-16 Thread Curt Zirzow
* Thus wrote Daevid Vincent: > Yeah, I get what references are. The point is that when it was on the user > to decide, they could do it. Now that PHP5 makes you put the & in the > function declaration instead of the passing parameter, you don't know what > the user is going to send. Therefore it re

Re: [PHP] upload an image and store it in mysql

2004-07-16 Thread raditha dissanayake
i sidhu wrote: * iNder Sidhu wrotes:- I use following query to upload the image in database DATABASE_query_die("INSERT INTO images (`name`, `status`, `image`, `size`, `type`) VALUES (name.gif', NULL, 0x52306c474f446c685a414179414f594141502f2f2f2f2f3238502f31372f54313976503, '1.624 kb', 'image/gif

Re: [PHP] Re: Embedded Email Directives

2004-07-16 Thread Curt Zirzow
* Thus wrote Manuel Lemos: > Hello, > > On 07/16/2004 10:49 PM, Curt Zirzow wrote: > remove carriage returns to prevent embedded email directives > >>> > >>>In an other thread, I readed that sentence. I'm interested to find more > >>>information about that. I have some mail forms and want to

Re: [PHP] upload an image and store it in mysql

2004-07-16 Thread i sidhu
* iNder Sidhu wrotes:- I use following query to upload the image in database DATABASE_query_die("INSERT INTO images (`name`, `status`, `image`, `size`, `type`) VALUES (name.gif', NULL, 0x52306c474f446c685a414179414f594141502f2f2f2f2f3238502f31372f54313976503, '1.624 kb', 'image/gif')"); 0x52

Re: [PHP] upload an image and store it in mysql

2004-07-16 Thread Curt Zirzow
* Thus wrote raditha dissanayake: > The approach that an overwhelming majority of PHP developers (and other > developers for that matter) use is to simply store the image on the > file system. If these images are part of a web application you can then > store a reference to the image in the dat

[PHP] Re: finding a substring

2004-07-16 Thread Jason Barnett
C.F. Scheidecker Antunes wrote: Hello all, I need to read lines within a text file that might have a " value='somevalue' " string the position of "value=" varies from line to line but there's only one "value=" in each line. So what I need to do is to parse the file and find the "value=" and put

Re: [PHP] Uploading a directory of files

2004-07-16 Thread xin
Ryan Schefke wrote: Does anyone have a script to upload a directory full of files? .something like a recursive upload. Thanks, Ryan You can use a JavaApplet and php script to upload as many files as you want. We have used one in our project. yours, xin -- PHP General Mailing List (http://www

[PHP] "sendmail_from" not set in php.ini or custom "From:" header missing

2004-07-16 Thread Wudi
Script: Result: Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\ApacheData\htdocs\downloader\mail.php on line 2 Why does the mail() not work? How can I send a e-mail without SMTP?

Re: [PHP] upload an image and store it in mysql

2004-07-16 Thread Five
"Raditha Dissanayake" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The approach that an overwhelming majority of PHP developers (and other > developers for that matter) use is to simply store the image on the > file system. If these images are part of a web application you can t

Re: [PHP] Uploading a directory of files

2004-07-16 Thread raditha dissanayake
Ryan Schefke wrote: Does anyone have a script to upload a directory full of files? Shameless plug: Rad Upload - http://www.radinks.com/upload/ .something like a recursive upload. yep. -- Raditha Dissanayake. http://www.

Re: [PHP] imagecreatefromjpeg fails on large files

2004-07-16 Thread raditha dissanayake
[EMAIL PROTECTED] wrote: I'm running into a problem where imagecreatefromjpeg fails and gives me a warning like this: Warning: imagecreatefromjpeg(): 'albums/userpics/10001/dave_sharath.jpg' is not a valid JPEG file in /homepages/32/d91926016/htdocs/photos/include/picmgmt.inc.php on line 202 Hav

Re: [PHP] upload an image and store it in mysql

2004-07-16 Thread raditha dissanayake
I've been playing with this for two days and am wondering if there's a way to retrieve and display the images in a browser using only php or is it necessary to use a graphics library like GD? The approach that an overwhelming majority of PHP developers (and other developers for that matter) us

[PHP] imagecreatefromjpeg fails on large files

2004-07-16 Thread tmp1000
I'm running into a problem where imagecreatefromjpeg fails and gives me a warning like this: Warning: imagecreatefromjpeg(): 'albums/userpics/10001/dave_sharath.jpg' is not a valid JPEG file in /homepages/32/d91926016/htdocs/photos/include/picmgmt.inc.php on line 202 The file in question is a val

Re: [PHP] Checking for character absence with regular expressions

2004-07-16 Thread Jason Wong
On Friday 16 July 2004 20:21, Rory McKinley wrote: > I am currently trying to check for the absence of certain substrings > within larger strings using > regular expressions. I know that I could use on of the string functions, > but in the interests of > flexibility I must use a regexp match of so

Re: [PHP] Re: Embedded Email Directives

2004-07-16 Thread Manuel Lemos
Hello, On 07/16/2004 10:49 PM, Curt Zirzow wrote: remove carriage returns to prevent embedded email directives In an other thread, I readed that sentence. I'm interested to find more information about that. I have some mail forms and want to make them as secure and possible, but do not know about

Re: [PHP] mysqli prepapred SELECT statement

2004-07-16 Thread Curt Zirzow
* Thus wrote Support: > Anyone working with php5/mysql 4.1 yet with the new ext/mysqli? > > This has me stumped: > > $stmt = $mysqli->prepare('SELECT * FROM users WHERE userid=?'); > > $stmt->bind_param('i', $userID); > > $stmt->execute(); > > ...now how to get the results??? I can't use bind_

Re: [PHP] Getting the primary key from a MySQL insert

2004-07-16 Thread Curt Zirzow
* Thus wrote John W. Holmes: > Andrew Wood wrote: > >Thanks. When it says 'the last insert' is that just the last insert my > >PHP script did, or the last insert on the DB as a whole? > > Read the links Daniel just sent out. And take care in reading the part about it returning the 'last insert

Re: [PHP] Re: Embedded Email Directives

2004-07-16 Thread Jordi Canals
Manuel Lemos wrote: Hello, On 07/15/2004 10:25 PM, Jordi Canals wrote: > remove carriage returns to prevent embedded email directives Should I filter all CR and LF Just in headers or also I should do that in the message body? (Which is sent in the SMTP DATA section). Anyway, you may want to take

Re: [PHP] Re: Embedded Email Directives

2004-07-16 Thread Curt Zirzow
* Thus wrote Manuel Lemos: > Hello, > > On 07/15/2004 10:25 PM, Jordi Canals wrote: > >Dennis Gearon wrote: > > > > > remove carriage returns to prevent embedded email directives > > > >In an other thread, I readed that sentence. I'm interested to find more > >information about that. I have some

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread Curt Zirzow
* Thus wrote Jason Barnett: > >That will try and find a file in these locations in order: > > /var/www/html/projects/include/db.inc > > ./db.inc > > /php/includes/db.inc > > > >And will use the first one found. > > > >I would not suggest using ini_set() inside you're scripts to > >adjust your p

Re: [PHP] Re: PHP5 and pass by reference bug.

2004-07-16 Thread Justin Patrin
But that function doesn't need to pass by reference. If you have a function that has a parameter that is passed by ref, it should always be a variable that is passed in. You should only be using pass by ref when the function changes the value and it simply doesn't make sense to change a "constant".

Re: [PHP] using PHP script to simulate a login

2004-07-16 Thread Justin Patrin
On Fri, 16 Jul 2004 20:38:22 -0400, Alex Shi <[EMAIL PROTECTED]> wrote: > > On Fri, 16 Jul 2004 19:23:30 -0400, Alex Shi <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > We have a web interface to do following: > > > 1. login > > > 2. check phone number (maybe thousands of) > > > 3. logout. > > > >

RE: [PHP] Re: PHP5 and pass by reference bug.

2004-07-16 Thread Daevid Vincent
Yeah, I get what references are. The point is that when it was on the user to decide, they could do it. Now that PHP5 makes you put the & in the function declaration instead of the passing parameter, you don't know what the user is going to send. Therefore it renders the & in the function declarati

Re: [PHP] upload an image and store it in mysql

2004-07-16 Thread John W. Holmes
Five wrote: I've been playing with this for two days and am wondering if there's a way to retrieve and display the images in a browser using only php or is it necessary to use a graphics library like GD? You don't need GD unless you want to modify the image (and even then there are other options)

Re: [PHP] upload an image and store it in mysql

2004-07-16 Thread Five
"Ed Lazor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You're seeing raw data and need to specify the mime type with headers. Search the > mailing list archive, there's a few example scripts in there. Just keep in mine that you need to create a separate script that handles th

Re: [PHP] Help on copying part of a text file

2004-07-16 Thread John W. Holmes
C.F. Scheidecker Antunes wrote: Hello all, I need some help on the following: I need to extract a paragraph from a text file that is delimited with a --start-paragraph-- and --end-paragraph-- However, after --start-paragraph-- there's a blank line that I need to remove. The delimiter --start-par

[PHP] What happen to JAVA support in PHP5

2004-07-16 Thread Alawi albaity
the setting is removed from php.ini , How can we integrate them in PHP5 ?

[PHP] Help on copying part of a text file

2004-07-16 Thread C.F. Scheidecker Antunes
Hello all, I need some help on the following: I need to extract a paragraph from a text file that is delimited with a --start-paragraph-- and --end-paragraph-- However, after --start-paragraph-- there's a blank line that I need to remove. The delimiter --start-paragraph-- might be one the first

Re: [PHP] using PHP script to simulate a login

2004-07-16 Thread Alex Shi
> On Fri, 16 Jul 2004 19:23:30 -0400, Alex Shi <[EMAIL PROTECTED]> wrote: > > Hi, > > > > We have a web interface to do following: > > 1. login > > 2. check phone number (maybe thousands of) > > 3. logout. > > > > I am just wondering is it possible to use a php script to simulate > > the three st

[PHP] Re: PHP5 and pass by reference bug.

2004-07-16 Thread Red Wingate
Maybe you recheck the dokumentation on what exactly referenzes are. Do you expect the function to alter the string "something here" and every- time you later print the string within your script you get the altered one? ONLY variables can be passed by referenze ! -- red Daevid Vincent wrote: So,

[PHP] Re: PHP5 and pass by reference bug.

2004-07-16 Thread Red Wingate
Maybe you recheck the dokumentation on what exactly referenzes are. Do you expect the function to alter the string "something here" and every- time you later print the string within your script you get the altered one? ONLY variables can be passed by referenze ! -- red Daevid Vincent wrote: So,

Re: [PHP] finding a substring

2004-07-16 Thread John W. Holmes
C.F. Scheidecker Antunes wrote: Hello all, I need to read lines within a text file that might have a " value='somevalue' " string the position of "value=" varies from line to line but there's only one "value=" in each line. So what I need to do is to parse the file and find the "value=" and put

Re: [PHP] finding a substring

2004-07-16 Thread Justin Patrin
preg_match_all('/value="(.*?)"/', file_get_contents('textFile.txt'), $matches); print_r($matches[1]); On Fri, 16 Jul 2004 18:08:12 -0600, C.F. Scheidecker Antunes <[EMAIL PROTECTED]> wrote: > Hello all, > > I need to read lines within a text file that might have a " > value='somevalue' " string

[PHP] finding a substring

2004-07-16 Thread C.F. Scheidecker Antunes
Hello all, I need to read lines within a text file that might have a " value='somevalue' " string the position of "value=" varies from line to line but there's only one "value=" in each line. So what I need to do is to parse the file and find the "value=" and put their values in an array. Supo

Re: [PHP] using PHP script to simulate a login

2004-07-16 Thread Justin Patrin
On Fri, 16 Jul 2004 19:23:30 -0400, Alex Shi <[EMAIL PROTECTED]> wrote: > Hi, > > We have a web interface to do following: > 1. login > 2. check phone number (maybe thousands of) > 3. logout. > > I am just wondering is it possible to use a php script to simulate > the three steps? I understand th

Re: [PHP] Re: convert degrees to heading

2004-07-16 Thread Tim Van Wassenhove
In article <[EMAIL PROTECTED]>, Warren Vail wrote: > Well, isn't north really about 340 to 020 degrees? Looks like if you threw > in a factor. Well, modulo is a nice function. But i'm not the homework service :) > > Warren Vail > > -Original Message- > From: René Fournier [mailto:[

Re: [PHP] Uploading a directory of files

2004-07-16 Thread John W. Holmes
Ryan Schefke wrote: Does anyone have a script to upload a directory full of files? .something like a recursive upload. Not going to happen with PHP and an HTML interface. If you have PHP running on two machines and want to do this, then say so. -- ---John Holmes... Amazon Wishlist: www.amazon.com

[PHP] php5.0.0(cli) + loose STDIN when using pcntl_alarm

2004-07-16 Thread franck
My goal is to parse apache log into a php piped program. I need pcntl_alarm to launch some function, while reading stdin. When exiting of pcntl_alarm function handler, i loose STDIN, php say it's a valid resource, but feof found, since data continu to be send into the pipe. With php5-rc1 it was

[PHP] Uploading a directory of files

2004-07-16 Thread Ryan Schefke
Does anyone have a script to upload a directory full of files? .something like a recursive upload. Thanks, Ryan

[PHP] using PHP script to simulate a login

2004-07-16 Thread Alex Shi
Hi, We have a web interface to do following: 1. login 2. check phone number (maybe thousands of) 3. logout. I am just wondering is it possible to use a php script to simulate the three steps? I understand that after login the web server will send a cookie to browser, so in that way a session ca

[PHP] PHP5 and pass by reference bug.

2004-07-16 Thread Daevid Vincent
So, I'm getting all these errors/warnings in PHP5 now saying that I have to put the & on the function and not in the passing (which sorta makes sense and puts the burden on the function rather than the user, which I like too). So I spend the time to go and fix several thousand lines of code. Then

Re: [PHP] SNMP traps generation

2004-07-16 Thread franck
If you find something, it's interesting me !! Because of ASN1 encryption, it's hard to send a simple SNMP Trap with somes lines of code. "Alessandro Vitale" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi all, > does anybody know any good library (class|script) for ge

[PHP] Tiff to Jpeg conversion

2004-07-16 Thread Hardik Doshi
Hi Group, Can anyone suggest me a tool for converting Tiff image to JPEG image? Currently i am using the GD library for manipulating images and i didn't see any function which converts Tiff image to JPEG image. I notice Imagmagic support this feature. Please let me know if anyone has any idea ab

Re: [PHP] PHPEclipse?

2004-07-16 Thread robert mena
I have downloaded the latest .zip from source forge but it keeps giving me "an error has occured when activating this view.." and hsow the php browser. eclipse 3.0, linux fedora core2, java 1.4.2_04-fcs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

RE: [PHP] Re: convert degrees to heading

2004-07-16 Thread Vail, Warren
Well, isn't north really about 340 to 020 degrees? Looks like if you threw in a factor. Warren Vail -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED] Sent: Friday, July 16, 2004 3:59 PM To: Tim Van Wassenhove Cc: php Subject: Re: [PHP] Re: convert degrees to heading

Re: [PHP] Re: convert degrees to heading

2004-07-16 Thread René Fournier
Works beautifully. Thanks! ...Rene On Friday, July 16, 2004, at 04:36 PM, Tim Van Wassenhove wrote: function degrees2compass($degrees) { $compass = array('N', 'NNW', 'NNE', 'NE', ...); $index = $heading_degrees / sizeof($compass); return $compass[$index]; } -- PHP General Mailing List (

[PHP] Re: convert degrees to heading

2004-07-16 Thread Tularis
Here's a quick script I wrote for it: $deg = $_GET['deg']; // get from URL, for testing atm $deg %= 360; // make sure it doesn't break on eg 560 degrees $deg = ((ceil(($deg-22.5)/45))*45+22.5); // break it up into parts we know, there might be an easier way though, just too tired to see it. swit

[PHP] Re: convert degrees to heading

2004-07-16 Thread Tim Van Wassenhove
In article <[EMAIL PROTECTED]>, René fournier wrote: > I have to write a little function to convert a direction from degrees > to a compass -type heading. 0 = West. 90 = North. E.g.: > > from: > 135 degrees > > to: > NW > > Now, I was planning to write a series of if statements to evaluate e.g.

[PHP] convert degrees to heading

2004-07-16 Thread René Fournier
I have to write a little function to convert a direction from degrees to a compass -type heading. 0 = West. 90 = North. E.g.: from: 135 degrees to: NW Now, I was planning to write a series of if statements to evaluate e.g., if ($heading_degrees < 112.5 && $heading_degrees > 67.5) { $headi

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Justin Patrin
Thee is a PEAR package to do posts, gets, etc. http://pear.php.net/package/HTTP_Request On Fri, 16 Jul 2004 14:00:02 -0700, Vail, Warren <[EMAIL PROTECTED]> wrote: > I believe we all missed something important here, but I've been wrong > before. > > Notice his URL below, specifically the "https"

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Jeff Oien
The client's vendor only specifies that it's = pairs and that it's URL encoded so I don't think that's an issue. But don't let that squelch any discussion. :) Jeff Oien Vail, Warren wrote: I believe we all missed something important here, but I've been wrong before. Notice his URL below, specifi

[PHP] Re: PHP5 Install Version (Win32)

2004-07-16 Thread Lester Caine
Ron Stiemer wrote: Does anybody got some information if there will be a Win32 Install Version of PHP5 like it exists for 4.3.8 ? Personally I simply don't see the point :) Unzip the zip, tweak Apache and php.ini and I have what *I* want running in minutes. I don't want MySQL, I do use Apache2 so t

Re: [PHP] Problem with calculate

2004-07-16 Thread Rosen
Thanks ! abs() will not work for me, because I may have na negative numbers, but with round() it worked ! 10x "John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Rosen wrote: > > > I use some numbers from mysql table and other local vars to calculate one > > number. >

RE: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Vail, Warren
I believe we all missed something important here, but I've been wrong before. Notice his URL below, specifically the "https" part. I believe this means that the data not only needs to be URL encoded but SSL encrypted. I believe this makes a stronger case for using CURL, does it not? I also woul

Re: [PHP] quotes in text.

2004-07-16 Thread Matt M.
> Ok then, I want to know how to do it the right way but just using > $_POST['text'], as stated before, in my query still cuts off the text at > the quote. > > While passing this field between pages I don't do anything to it but when > I want to show it to the user I would use stripslashes($_POST[

Re: [PHP] quotes in text.

2004-07-16 Thread Ed Curtis
On Fri, 16 Jul 2004, John W. Holmes wrote: > Ed Curtis wrote: > > On Fri, 16 Jul 2004, Justin Patrin wrote: > >>This is why he said: "Since you seem to have magic_quotes_gpc enabled, > >>you can put the value directly into your query." > >> > >>You shouldn't use htmlentities when putting it into

Re: [PHP] Problem with calculate

2004-07-16 Thread John W. Holmes
Rosen wrote: I use some numbers from mysql table and other local vars to calculate one number. But on one calc I receive thath $value=4.5474735088646E-013; This must be zero (0) - I see all vars and calc then with calculator. I use function number_format($value, 2, ".", "" ) and it return me -0.00

[PHP] Problem with calculate

2004-07-16 Thread Rosen
Hi, I have following problem: I use some numbers from mysql table and other local vars to calculate one number. But on one calc I receive thath $value=4.5474735088646E-013; This must be zero (0) - I see all vars and calc then with calculator. I use function number_format($value, 2, ".", "" ) and it

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Lars Torben Wilson
Jeff Oien wrote: Thanks for the helpful examples. One other question. Is there an advantage to sending the URL via a header as opposed to doing http_post like this? http://shiflett.org/hacks/php/http_post Jeff As mentioned a couple of times, size is one. But you still need to url-encode the data

Re: [PHP] quotes in text.

2004-07-16 Thread John W. Holmes
Ed Curtis wrote: On Fri, 16 Jul 2004, Justin Patrin wrote: This is why he said: "Since you seem to have magic_quotes_gpc enabled, you can put the value directly into your query." You shouldn't use htmlentities when putting it into the DB. Use it when displaying the text. I tried it both ways and i

Re: [PHP] Security vulerability, any more detail info than this???

2004-07-16 Thread John W. Holmes
Scott Fletcher wrote: Saw a website about security vulerability and there's no info on php.net that can describe more about it. So, anyone know? http://pcworld.co.nz/news.nsf/0/4D6AE0157B37ACDCCC256ED200693BB3?OpenDocument One more reason to not use strip_tags... like I really needed another, tho

RE: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Vail, Warren
If the hack works, it should get around the length limitation of the URL, but I would be more tempted to use CURL for that. http://www.php.net/manual/en/ref.curl.php Warren Vail Warren Vail (415) 667-0240 SF211-07-434 -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED] Sent

[PHP] PHP5 Install Version (Win32)

2004-07-16 Thread Ron Stiemer
Hello List, Does anybody got some information if there will be a Win32 Install Version of PHP5 like it exists for 4.3.8 ? Kind Regards, -Ron **Disclaimer: everything I post, will post and have posted, is subject to change without reason; any errors in logic, math or spelling is to assumed to be

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Matt M.
> Thanks for the helpful examples. One other question. Is there an > advantage to sending the URL via a header as opposed to doing http_post > like this? > http://shiflett.org/hacks/php/http_post > Jeff Like someone mentioned earlier. URL's have length limits. That would be one reason to do a po

Re: [PHP] quotes in text.

2004-07-16 Thread Ed Curtis
On Fri, 16 Jul 2004, Justin Patrin wrote: > This is why he said: "Since you seem to have magic_quotes_gpc enabled, > you can put the value directly into your query." > > You shouldn't use htmlentities when putting it into the DB. Use it > when displaying the text. I tried it both ways and it on

RE: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Vail, Warren
> You could do that, but for one thing, it doesn't handle > arrays. The code snippet in the user notes does. You are absolutely correct, but I'm not sure that ASP could handle arrays either. On the other side Matt M.s processing should work better than mine; >foreach($_POST as $key => $value) {

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Jeff Oien
Thanks for the helpful examples. One other question. Is there an advantage to sending the URL via a header as opposed to doing http_post like this? http://shiflett.org/hacks/php/http_post Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] quotes in text.

2004-07-16 Thread Justin Patrin
On Fri, 16 Jul 2004 11:58:55 -0500 (EST), Ed Curtis <[EMAIL PROTECTED]> wrote: > > > > On Fri, 16 Jul 2004, John W. Holmes wrote: > > > Let's say you have $_POST['text'] from the user. > > > > To display the value back to the user with magic_quotes_enabled, you'd > > do this: > > > > echo htmle

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Lars Torben Wilson
Vail, Warren wrote: How about (probably one of fifty solutions; Foreach($_POST as $k => $v) $vals[] = $k."=".$v; $strvals = urlencode(implode("&",$vals)); Header("Location: https://example.com/script.asp?".$strvals); One thing to think about, URL's are limited in length, and one reason for using me

RE: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Vail, Warren
How about (probably one of fifty solutions; Foreach($_POST as $k => $v) $vals[] = $k."=".$v; $strvals = urlencode(implode("&",$vals)); Header("Location: https://example.com/script.asp?".$strvals); One thing to think about, URL's are limited in length, and one reason for using method=post is that

[PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Lars Torben Wilson
Jeff Oien wrote: Dumb question, sorry if it's a repeat. I will use PHP for a form with error checking. When there are no errors I need to send all the variables thru something like this: $URL = "https://example.com/script.asp?First=Jim&Last=Smith";; urlencode($URL); header("Location: $URL\n"); H

Re: [PHP] Populating a Dropdown Menu From a Query

2004-07-16 Thread Arnout Boks
The exact implementation differs with your database system, but as an example for MySQL: {$row['name_of_description_field']}< /option>"); } ?> greetz, Arnout "Harlequin" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > Another day another conundrum. > > I have a form wher

Re: [PHP] Populating a Dropdown Menu From a Query

2004-07-16 Thread Matt M.
> I have a form where one option is a dropdown menu. I'd like that menu to > only have items in it that are actually available. Selecting the items with > a query is easy enough but I wondered if anyone could tell me where to start > wit the code. I dont know what kind of db so I will just use mys

[PHP] Populating a Dropdown Menu From a Query

2004-07-16 Thread Harlequin
Another day another conundrum. I have a form where one option is a dropdown menu. I'd like that menu to only have items in it that are actually available. Selecting the items with a query is easy enough but I wondered if anyone could tell me where to start wit the code. Am I using a for each agai

Re: [PHP] Echoing Results in a Table

2004-07-16 Thread Harlequin
Thanks John. I managed to get what I wanted. Now I have a very neat table showing my results. Nice. Next conundrum is stuffing a dropdown menu with results. I'll post a new thread but have a dig around the Internet, many thanks John. -- - Michael Mason Arras People

RE: [PHP] load data infile

2004-07-16 Thread Jay Blanchard
[snip] I have a tab delimited file I am trying to load in my database using: LOAD DATA INFILE '/users/dbs/sites/phpmyadmin/gus/exptab.txt' INTO TABLE datable; But all it will load is the first record and I have about 2000 records. There are 20 columns of data in my 'exptab.txt' file I am loading

Re: [PHP] Putting $_POST into string to send to ASP

2004-07-16 Thread Matt M.
> How do I gather up all the variables in $_POST and attach them as a > string after the question mark? Thanks. this is untested: $arr = array(); foreach($_POST as $key => $value) { $arr[] = $key.'='.urlencode($value); } $URL = "https://example.com/script.asp?".implode('&',$arr); header

[PHP] Putting $_POST into string to send to ASP

2004-07-16 Thread Jeff Oien
Dumb question, sorry if it's a repeat. I will use PHP for a form with error checking. When there are no errors I need to send all the variables thru something like this: $URL = "https://example.com/script.asp?First=Jim&Last=Smith";; urlencode($URL); header("Location: $URL\n"); How do I gather up

[PHP] load data infile

2004-07-16 Thread Hull, Douglas D
I have a tab delimited file I am trying to load in my database using: LOAD DATA INFILE '/users/dbs/sites/phpmyadmin/gus/exptab.txt' INTO TABLE datable; But all it will load is the first record and I have about 2000 records. There are 20 columns of data in my 'exptab.txt' file I am loading and t

[PHP] Re: Security vulerability, any more detail info than this???

2004-07-16 Thread Scott Fletcher
Except that 4.3.8 cover the 4.3.7 issues "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Saw a website about security vulerability and there's no info on php.net > that can describe more about it. So, anyone know? > > http://pcworld.co.nz/news.nsf/0/4D6AE0157B37

[PHP] Security vulerability, any more detail info than this???

2004-07-16 Thread Scott Fletcher
Saw a website about security vulerability and there's no info on php.net that can describe more about it. So, anyone know? http://pcworld.co.nz/news.nsf/0/4D6AE0157B37ACDCCC256ED200693BB3?OpenDocument FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

[PHP] mysqli prepapred SELECT statement

2004-07-16 Thread Support
Anyone working with php5/mysql 4.1 yet with the new ext/mysqli? This has me stumped: $stmt = $mysqli->prepare('SELECT * FROM users WHERE userid=?'); $stmt->bind_param('i', $userID); $stmt->execute(); ...now how to get the results??? I can't use bind_result() since I have no clue how many colum

[PHP] Re: Echoing Results in a Table

2004-07-16 Thread rush
"Harlequin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've managed to develop a query which pulls a finite number of records from > a table based on a query. > > What commends do I now use to present these results in a table...? There are plenty of such advices, I assume google

Re: [PHP] quotes in text.

2004-07-16 Thread Ed Curtis
On Fri, 16 Jul 2004, John W. Holmes wrote: > Let's say you have $_POST['text'] from the user. > > To display the value back to the user with magic_quotes_enabled, you'd > do this: > > echo htmlentities(stripslashes($_POST['text'])); > > To put the value into a hidden form element, you'd do this

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread raditha dissanayake
Jason Barnett wrote: I would not suggest using ini_set() inside you're scripts to adjust your paths. Hey Curt, why do you suggest we don't use ini_set to adjust paths? I'm using it as part of my library autoloader - it may not be as efficient as changing the path directly but it seems to work

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread Jason Barnett
That will try and find a file in these locations in order: /var/www/html/projects/include/db.inc ./db.inc /php/includes/db.inc And will use the first one found. I would not suggest using ini_set() inside you're scripts to adjust your paths. Curt Hey Curt, why do you suggest we don't use ini

RE: [PHP] Need help with line breaks in a textarea form

2004-07-16 Thread PHP User
John, If I just echo $text on the webpage now, everything shows as it should. HOWEVER, another problem I didn't even clue into until now. This form gets emailed to a specified address and all I get in my email is one long line with no line breaks. How do I fix this? I was reading a thread in a we

Re: [PHP] quotes in text.

2004-07-16 Thread John W. Holmes
Ed Curtis wrote: I'm having some difficulty with quotation marks, both single and double, input via a textarea in a form. Here's and example of text. Trying out the "Special Character" thing. Page 1 is the form. Page 2 is the data shown back to the user. original POST data is not touched. NO strips

Re: [PHP] Echoing Results in a Table

2004-07-16 Thread John W. Holmes
Harlequin wrote: I've managed to develop a query which pulls a finite number of records from a table based on a query. What commends do I now use to present these results in a table...? How would you show a table now with a single record? Start there. Now, what areas would need repeating with a "f

Re: [PHP] Need help with line breaks in a textarea form

2004-07-16 Thread John W. Holmes
PHP User wrote: Something came to mind as soon as I sent my last email, and it seems to work. Not sure it will work in every circumstance but the few tests I tried seemed ok. This is what I did. I added the two following lines to my script. $text=str_replace("\n","",$text); $text=str_replace("","",

[PHP] quotes in text.

2004-07-16 Thread Ed Curtis
I'm having some difficulty with quotation marks, both single and double, input via a textarea in a form. Here's and example of text. Trying out the "Special Character" thing. Page 1 is the form. Page 2 is the data shown back to the user. original POST data is not touched. NO stripslashes origi

Re: [PHP] Echoing Results in a Table

2004-07-16 Thread Justin Patrin
http://www.google.com/search?hl=en&ie=UTF-8&q=HTML+table&btnG=Google+Search On Fri, 16 Jul 2004 17:07:17 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > I've managed to develop a query which pulls a finite number of records from > a table based on a query. > > What commends do I now use to present

[PHP] Echoing Results in a Table

2004-07-16 Thread Harlequin
I've managed to develop a query which pulls a finite number of records from a table based on a query. What commends do I now use to present these results in a table...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP Gen

Re: [PHP] Most used oop pattern to use for php application development?

2004-07-16 Thread Justin Patrin
On Thu, 15 Jul 2004 23:57:59 -0500, Brent Clements <[EMAIL PROTECTED]> wrote: > Good Evening All, > > I know this will probably start a flame war, but I want to get everyone's opinion on > which oop pattern is either the accepted pattern or most used pattern for php > application. > > I'm prett

Re: [PHP] Checking for character absence with regular expressions

2004-07-16 Thread Matt M.
> I need to check that the substring " R" (that's a space followed by an > uppercase R) is not contained within my haystack. Just one way to do it: $strings[] = 'Blah Blah R 99.99'; $strings[] = 'Blah Blah R99.99'; $strings[] = 'Blah Blah 99.99CR'; foreach($strings as $value) { if (preg_match('/

[PHP] SNMP traps generation

2004-07-16 Thread Alessandro Vitale
Hi all, does anybody know any good library (class|script) for generating SNMP traps wirtten in PHP? thanks in advance, A. *** Alessandro Vitale Jr. Software Engineer Tiscali International Network Spa +39 070 4601678 [EMAIL PROTECTED] *

Re: [PHP] Re: problem with super global '$_REQUEST'

2004-07-16 Thread Justin Patrin
It does. ;-) I was just throwing out an interesting piece of code. Honestly, I'm surprised that it doesn't segfault PHP. Good job, internals! On Thu, 15 Jul 2004 21:02:10 -0700, Dennis Gearon <[EMAIL PROTECTED]> wrote: > I bet it would work, 'cause whenever $GLOBALS is 'print_r'd, Globals shows u

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread Curt Zirzow
* Thus wrote A. Lanza: > In fact, i'm not changing the include_path in my code, just uncommented > the line in php.ini configuration file. > > Do i have to set include_path in code? Where in code should i put that > piece of code setting include_path? Is there any simple way to include > files usi

  1   2   >