[PHP] Re: Close all open tags in HTML text

2004-12-09 Thread Daniel Schierbeck
Matt Palermo wrote: I am allowing users to imput HTML code into a textarea. After they input this, I wany to output their HTML to the browser. In order for the document to be safe, I need to close all open HTML tags that have been left open by the user, along with any open comments. Is there

[PHP] MYSQL Query question

2004-12-09 Thread Reinhart Viane
Table chat_online: session (varchar) activity (datetime) Table persons persons_region_int(int) Table regions region_id region_name On a page i list all persons which are in the chat_online dbase and within a certain period: $limit_time = time() - 130; // 2 Minutes time out. 60 * 2 = 120

Re: [PHP] ini_set doesn't work

2004-12-09 Thread Thomas Munz
your set it to '-1'!!! thats not allowed. You must habe a value highter than zero. Its better you set it in generall to 60. And you forgot the 'M' fater the number like ini_set(memory_limit,-1M); set it better to that: ini_set(memory_limit,60M); hello, what do I have to change in

[PHP] Need shipping info

2004-12-09 Thread suneel
Hi guys... Here I'm using a UPS service Could any one tell what sort details we have to consider in the database while shipping the products to the shipment gateway thanks regards, Suneel

[PHP] PHP4 mysqli with mysql 4.1.7?

2004-12-09 Thread Francis Mak
Hi, This message is a bit long, but I hope somebody could help me on this issue, thank you . I am using mysql 4.1.0(default-character-set=utf8) with PHP 4.3.3. All tables are using utf8 charset. I can insert, select and display the utf8 character without any problem using PHP, I used the normal

[PHP] Objects and sessions

2004-12-09 Thread Francisco M. Marzoa Alonso
Following code: ?php class SessionTestC { protected $value; function __construct ( $val ) { $this-value = $val; } function GetValue () { return $this-value; } } if ( isset ($_SESSION['TestObj'])) { echo 'Session Test is set to:

[PHP] Re: mail with attachment

2004-12-09 Thread Dre
I did not try it yet .. but I will Manuel Lemos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, Dre wrote: Thanks Manuel, I will check the class and here is the code of the mail sending script //== ?php

Re: [PHP] Close all open tags in HTML text

2004-12-09 Thread Robin Vickery
On Wed, 8 Dec 2004 22:33:19 -0500, Matt Palermo [EMAIL PROTECTED] wrote: I am allowing users to imput HTML code into a textarea. After they input this, I wany to output their HTML to the browser. In order for the document to be safe, I need to close all open HTML tags that have been left open

[PHP] Question: urldecode

2004-12-09 Thread Stuart Felenstein
In my search page, the url returned comes back with the ..err I forget what it's called, but query string looks like this: %5B%5D=3. I think the %5B and 5D should be []. What I think is needed is rawurldecode. I've looked through my code and think it belongs somewhere in this block:

Re: [PHP] duplicate md5 hash's

2004-12-09 Thread Richard Davey
Hello Guy, Thursday, December 9, 2004, 11:39:27 AM, you wrote: GB $hash = md5(uniqid($message)); GB where message is a string that the user will input. GB How likely is it that this hash might be repeated? GB I'm using the hash as a primary key in a database - the user gets sent GB the hash

[PHP] [SOLUTION] Re: [PHP] Objects and sessions

2004-12-09 Thread Francisco M. Marzoa Alonso
Thomas Munz wrote: I think, its not possible to init an Objeect on a session. Yes, it can. The problem was with serialization. With session.auto_start set to 1 on php.ini, seems like session's objects are unserialized before loading the script, so the class is not loaded when the session

[PHP] allow_url_fopen ini directive not enough

2004-12-09 Thread Kelvin Jones
Hi, I would like to see a new directive to go alongside allow_url_fopen to allow people to turn on or off the ability to include/require a remote file. The ability to include and execute a file as php from a remote host leaves many applications open to cross-site-scripting attacks. This would be

[PHP] duplicate md5 hash's

2004-12-09 Thread Guy Bowden
Hi, I know this is highly unlikely... but I have this code: $hash = md5(uniqid($message)); where message is a string that the user will input. How likely is it that this hash might be repeated? I'm using the hash as a primary key in a database - the user gets sent the hash as part of a url to

Re: [PHP] duplicate md5 hash's

2004-12-09 Thread Guy Bowden
Thanks for the tip... I have now implemented a while loop to make sure that it goes into the db, as you say this should never actually loop, but if it does it should only loop once.. kind of extra security.. cheers Richard Davey wrote: Hello Guy, Thursday, December 9, 2004, 11:39:27 AM, you

Re: [PHP] Objects and sessions

2004-12-09 Thread Thomas Munz
I think, its not possible to init an Objeect on a session. Session will be rebuild on each reload of the site based on the session id, i think... Maybe here the object can't be rebuild anymore... Following code: ?php class SessionTestC { protected $value; function __construct (

[PHP] best practice question..

2004-12-09 Thread Guy Bowden
On this note - what is considered best practice in a - sent to friend type thing. i.e. User inputs their name + message + email + friends email into a html/flash form friend gets a link to read the message. currently I do this: 1 collect form input 2 create hash using the md5/uniqid method :

Re: [PHP] Need shipping info

2004-12-09 Thread John Nichel
suneel wrote: Hi guys... Here I'm using a UPS service Could any one tell what sort details we have to consider in the database while shipping the products to the shipment gateway thanks regards, Suneel You might want to consider asking a php question. muttering adds UPS to the

Re: [PHP] best practice question..

2004-12-09 Thread Richard Davey
Hello Guy, Thursday, December 9, 2004, 12:34:03 PM, you wrote: GB There's never a security issue here - i.e. i don't mind how many times / GB who reads the message, but just want to make it hard to just guess keys GB to read other messages (otherwise it would just be the db id) GB This method

RE: [PHP] Question: urldecode

2004-12-09 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: 09 December 2004 11:52 In my search page, the url returned comes back with the ..err I

Re: [PHP] MYSQL Query question

2004-12-09 Thread Raditha Dissanayake
Reinhart Viane wrote: And a last question: I always seem to get stuck on mysql queries when scripting. mysql.com gives me a headache whens earching something. Does someone know a good mysql manual site or a good mysql book? That does not mean mysql questions should be posted on php mailing

RE: [PHP] MYSQL Query question

2004-12-09 Thread Reinhart Viane
First, since it was a combined question of php and mysql I thought of sending it here. Secondly, this is my standard footer. My appologizes if my question irritates you -Original Message- From: Raditha Dissanayake [mailto:[EMAIL PROTECTED] Sent: donderdag 9 december 2004 14:14 To:

RE: [PHP] Question: urldecode

2004-12-09 Thread Stuart Felenstein
--- Ford, Mike [EMAIL PROTECTED] wrote: Are you seeing the URL-encoded version *only* in your browser's Address/Location bar? If so, that's perfectly normal and nothing to worry about -- it should be automatically decoded by the Web server before being passed to PHP. If you're seeing

[PHP] Re: Objects and sessions

2004-12-09 Thread Shen Kong
Hi, your code my be this , you must use session_start() first: ?php session_start (); class SessionTestC { protected $value; function __construct ( $val ) { $this-value = $val; } function GetValue () { return $this-value; } } if ( isset ($_SESSION['TestObj'])) {

[PHP] a question about the PHP manual

2004-12-09 Thread Eakin, W
Hello, As I'm studying, and learning, PHP, I use certain resources again and again. A few books I've bought, some web sites, this mailing list, and the PHP manual. I've taken the often repeated 'RTFM' to heart, and I attempt to google or RTFM before considering a post to the list with a

[PHP] Re: Installing Apache and PHP from scratch

2004-12-09 Thread Don
Hi, Have been using RedHat and Fedora Systems. When I install the OS, Apache is usually installed already and I download PHP and install manually. I'd like to install Apache itself but not sure what configuration to use. Is there a command similar to the phpinfo() command that can

RE: [PHP] Question: urldecode

2004-12-09 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: 09 December 2004 13:38 --- Ford, Mike [EMAIL PROTECTED] wrote: Are you seeing the

Re: [PHP] MYSQL Query question

2004-12-09 Thread John Nichel
Raditha Dissanayake wrote: Reinhart Viane wrote: And a last question: I always seem to get stuck on mysql queries when scripting. mysql.com gives me a headache whens earching something. Does someone know a good mysql manual site or a good mysql book? That does not mean mysql questions should be

Re: [PHP] Re: Installing Apache and PHP from scratch

2004-12-09 Thread Jason Wong
On Thursday 09 December 2004 22:12, Don wrote: 1. In my httpd.,conf file i uncommented teh following lines: Location /server-info SetHandler server-info Order deny,allow Deny from all Allow from .lclnav.com /Location That Allow from ... has to specify an IP address /

Re: [PHP] a question about the PHP manual

2004-12-09 Thread Miles Thompson
At 09:56 AM 12/9/2004, Eakin, W wrote: Hello, As I'm studying, and learning, PHP, I use certain resources again and again. A few books I've bought, some web sites, this mailing list, and the PHP manual. I've taken the often repeated 'RTFM' to heart, and I attempt to google or RTFM before

Re: [PHP] a question about the PHP manualB

2004-12-09 Thread Ron Clark
At 09:56 AM 12/9/2004, Eakin, W wrote: Hello, As I'm studying, and learning, PHP, I use certain resources again and again. A few books I've bought, some web sites, this mailing list, and the PHP manual. I've taken the often repeated 'RTFM' to heart, and I attempt to google or RTFM before

Re: [PHP] a question about the PHP manual

2004-12-09 Thread Nick Talbott
On Thursday 09 December 2004 1:56 pm, Eakin, W wrote: I've noticed that most of the replies to the questions on this list, when they refer to a part of the manual, point to the same few sections over and over. Such as arrays, strings, sessions, objects, and a few others. My question is this,

RE: [PHP] Question:maybe urldecode

2004-12-09 Thread Stuart Felenstein
--- Ford, Mike [EMAIL PROTECTED] wrote: Lastly, I wasn't concerned about the hex code, but I just made some reconnections of scripts. Users can save their search parameters. I am saving the query string. Now I had this set up before and the way it was working , is when the user wanted

Re: [PHP] MYSQL Query question

2004-12-09 Thread Raditha Dissanayake
John Nichel wrote: Raditha Dissanayake wrote: Reinhart Viane wrote: And a last question: I always seem to get stuck on mysql queries when scripting. mysql.com gives me a headache whens earching something. Does someone know a good mysql manual site or a good mysql book? That does not mean mysql

[PHP] Finding the location of an included script

2004-12-09 Thread Gadi Cohen
Is this possible? I'm trying to write a back end to be used in most of my websites. While I can simply use symlinks to ensure this is included from my various sites but only exists once on the hardrive, I'd prefer to simply include the file and have the script itself work out where it lives. So

Re: [PHP] Question:maybe urldecode

2004-12-09 Thread Jason Wong
On Thursday 09 December 2004 23:16, Stuart Felenstein wrote: I'm not sure if this particular is a matter of debugging. Your program doesn't work the way you intended it? So if you don't debug it, how is it going to get from a not working as intended state, to a working state? There is a

Re: [PHP] Question:maybe urldecode

2004-12-09 Thread Stuart Felenstein
--- Jason Wong [EMAIL PROTECTED] wrote: Basically I'm throwing this out though since I'm wondering if there is something that should be in the search script , that when I apply a query string to it would fill in the field (like magic hands) Yeah I wish I had some magic hands that

[PHP] Re: Finding the location of an included script

2004-12-09 Thread Ben Ramsey
Gadi Cohen wrote: So if I have: include(/path/to/backend.php); Is there a way from inside of backend.php to return /path/to ? Check out the filesystem functions in the PHP manual. You're probably particularly interested in pathinfo() http://www.php.net/pathinfo -- Ben Ramsey Zend Certified

Re: [PHP] a question about the PHP manual

2004-12-09 Thread Richard Lynch
Eakin, W wrote: Hello, As I'm studying, and learning, PHP, I use certain resources again and again. A few books I've bought, some web sites, this mailing list, and the PHP manual. I've taken the often repeated 'RTFM' to heart, and I attempt to google or RTFM before considering a post to

Re: [PHP] best practice question..

2004-12-09 Thread Richard Lynch
Guy Bowden wrote: On this note - what is considered best practice in a - sent to friend type thing. i.e. User inputs their name + message + email + friends email into a html/flash form friend gets a link to read the message. currently I do this: 1 collect form input 2 create hash using

Re: [PHP] duplicate md5 hash's

2004-12-09 Thread Richard Lynch
GB Is there any way that the same hash could have been generated more than GB once? It's extremely unlikely (I cannot give you any stats as to how unlikely though, sorry). As I understand it (or don't, rather) the odds are one in 2,147,...,... (2 billion) But that's only in theory. In

RE: [PHP] a question about the PHP manual

2004-12-09 Thread Justin Palmer
Hi, Richard is spot on, but learning (PHP, ASP, Java, ...) programming is not all about reading. Set up small examples that better enforce the ideas in your mind about specific topics that you are having a hard time with. You will loose, roughly, 90% of the information by just reading. Examples

Re: [PHP] Question: urldecode

2004-12-09 Thread Richard Lynch
Stuart Felenstein wrote: In my search page, the url returned comes back with the ..err I forget what it's called, but query string looks like this: %5B%5D=3. I think the %5B and 5D should be []. What I think is needed is rawurldecode. I've looked through my code and think it belongs

Re: [PHP] Question:maybe urldecode

2004-12-09 Thread Jason Wong
On Friday 10 December 2004 00:24, Stuart Felenstein wrote: Jason, I don't think you read or understood my question. sigh As I said, it doesn't seem to be a debugging scenario.I was asking if anyone would know a reason why on one page , one could apply the query string to url and

Re: [PHP] allow_url_fopen ini directive not enough

2004-12-09 Thread Richard Lynch
Kelvin Jones wrote: I would like to see a new directive to go alongside allow_url_fopen to allow people to turn on or off the ability to include/require a remote file. The ability to include and execute a file as php from a remote host leaves many applications open to cross-site-scripting

[PHP] Unsubscribing Junk Emails From the List: requests@firstustrading.com

2004-12-09 Thread Justin Palmer
Hi, Every time I send a response to the list I get a auto-reply from: [EMAIL PROTECTED] Is there someone that I could email that can delete this user from the list? Thanks for any information. Regards, Justin Palmer __ KISS (Keep It Simple, SEARCH)! Google::getUri(

Re: [PHP] Finding the location of an included script

2004-12-09 Thread Jason Wong
On Thursday 09 December 2004 22:46, Gadi Cohen wrote: So if I have: include(/path/to/backend.php); Is there a way from inside of backend.php to return /path/to ? echo __FILE__; -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design

Re: [PHP] PHP4 mysqli with mysql 4.1.7?

2004-12-09 Thread Richard Lynch
Francis Mak wrote: mysqli_query($c, SET CHARACTER SET utf8;); The naive user, who understands *NOTHING* about i18l (?) functions, character sets, or anything other than American English (and not all that up on the esoterics of grammar in that) asks: What happens in your application if you just

Re: [PHP] help me split chars w/o spaces by 2... like: 2004

2004-12-09 Thread ApexEleven
I did something like this a while back, I believe I used chunk_split [code] ? $year_split = date(Y); $chars = chunk_split($year_split,2); print_r($chars); ? [/code] it'll output something along the lines of: 20 04 Hope this helps, --

[PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions cannot grab the item_pics1 variable. I have tried passing the variable to the function, tried using $GLOBALS['item_pic1']. So I guess my question is, does PHP in

Re: [PHP] about installing php

2004-12-09 Thread Richard Lynch
satya bharti wrote: sir, I am using Red Hat Linux 8.0, and tried many times to install apache 2.0 and php4.0 many times, the message comes that apache and php has installed on my system. when i execute a php program through my web brouser it shows blank. what causes this and how can I solve

Re: [PHP] login.php

2004-12-09 Thread Richard Lynch
badlya badlu wrote: This is my first mail to php mailing list. i want to create one login.php program in linux. i want this page to go the ldap server for authentication. how should i do it. http://php.net/ldap You may also want to just use somebody else's LDAP PHP script. I'm betting you

Re: [PHP] Close all open tags in HTML text

2004-12-09 Thread Richard Lynch
Matt Palermo wrote: I am allowing users to imput HTML code into a textarea. After they input this, I wany to output their HTML to the browser. In order for the document to be safe, I need to close all open HTML tags that have been left open by the user, along with any open comments. Is

RE: [PHP] Question:maybe urldecode

2004-12-09 Thread Stuart Felenstein
--- Richard Lynch [EMAIL PROTECTED] wrote: Then your new script is broken, as clearly the GET paramters *ARE* there. Sorry, I'm not following you. Where are my GET parameters ? The way I've built my present script is the reults page is grabbing the parameters. Do I need to set up GET

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread John Nichel
Danny Brow wrote: Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions cannot grab the item_pics1 variable. I have tried passing the variable to the function, tried using $GLOBALS['item_pic1']. So I guess my

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread John Nichel
Belay that...the $GLOBALS array has existed since PHP3 -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Object In Object

2004-12-09 Thread Diner Akay
Hi, Is this a good way ? ? class main{ var $mysql; var $user; function main(){ $this-mysql=new mysql(); $this-user=new user(); } } class Mysql { function x(){ return Some Query Result for ;} } class user { var $username; function

Re: [PHP] Unsubscribing Junk Emails From the List: requests@firstustrading.com

2004-12-09 Thread Danny Brow
I'm getting it too. On Thu, 2004-12-09 at 09:49 -0800, Justin Palmer wrote: Hi, Every time I send a response to the list I get a auto-reply from: [EMAIL PROTECTED] Is there someone that I could email that can delete this user from the list? Thanks for any information. Regards,

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 13:41 -0500, John Nichel wrote: Danny Brow wrote: Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions cannot grab the item_pics1 variable. I have tried passing the variable to the

[PHP] Re: Object In Object

2004-12-09 Thread Matthew Weier O'Phinney
* Dinçer akay [EMAIL PROTECTED]: Is this a good way ? ? class main{ var $mysql; var $user; function main(){ $this-mysql=new mysql(); $this-user=new user(); If you're developing strictly for PHP5, this will work fine. However, if you're in PHP4, you're going to

Re: [PHP] Re: PHP Security

2004-12-09 Thread Richard Lynch
Also, you *SHOULD* force the file to be saved on your server with the correct extension. If a user can upload a JPEG with .php on the end, or worse, with php in the middle of the filename, and then your server puts that file in the web tree or otherwise allows it to be executed, *YOU* (and

Re: [PHP] PHP Security

2004-12-09 Thread Richard Lynch
There are better ways to do this than parsing .jpg files as PHP. One obvious one is: http://example.org/image.php/foo.jpg I believe this broke on a very very very obscure version of IE -- Maybe even the re-branded IE I ran into one time [shudder]. In theory, it was just IE X.xx.yy, but it

Re: [PHP] Close all open tags in HTML text

2004-12-09 Thread Marek Kilimajer
Richard Lynch wrote: Matt Palermo wrote: I am allowing users to imput HTML code into a textarea. After they input this, I wany to output their HTML to the browser. In order for the document to be safe, I need to close all open HTML tags that have been left open by the user, along with any open

Re: [PHP] Re: PHP Security

2004-12-09 Thread Richard Lynch
Chris Shiflett wrote: --- Greg Donald [EMAIL PROTECTED] wrote: http://seclists.org/lists/security-basics/2004/Dec/0080.html Most of this is actually true. The one statement that is unclear is the following: There are two kinds of flaws : - flaws inherent to the php langage itself,

RE: [PHP] Question:maybe urldecode

2004-12-09 Thread Stuart Felenstein
--- Richard Lynch [EMAIL PROTECTED] wrote: Then your new script is broken, as clearly the GET paramters *ARE* there. Sorry, I'm not following you. Where are my GET parameters ? The way I've built my present script is the reults page is grabbing the parameters. Do I need to set

Re: [PHP] Implementing database cache.

2004-12-09 Thread Richard Lynch
Bruno B B Magalhães wrote: does anybody have am idea of witch are the required functions to implement a database query cache? I have a very nice and fast database layer, witch I use in all my projects (about 19 sites and a lot of others hot-sites and systems like intranet and extranets). Here

Re: [PHP] How to make a PHP Socket client crash-proof?

2004-12-09 Thread Richard Lynch
Have you completely eliminated the possiblity of having a second, independent, completely unrelated client/socket which is used to *SEND* data to the server? client_get -- server client_send --- server They can both use your local database to share data, to whatever degree you deem

Re: [PHP] Pass mysql array into SESSION?

2004-12-09 Thread Richard Lynch
Jerry Swanson wrote: I want to pass an array from one page to excell generation page. I tried to pass through session($_SESSION['sql'] = $var). But value is not set. The array is actually $result = mysql_query($query); The result from mysql_query() is not an array. It's a MySQL result

Re: [PHP] fread()

2004-12-09 Thread Richard Lynch
Russell P Jones wrote: Is there any way to use fread() or a similar function to read a section of a document NOT starting at the beginning... for example, I can read the first 1000 bytes of a document with fread($doc, 1000); Is there any way to read the second 1000 bytes? perhaps,

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Richard Lynch
My best guess from skimming your code is that you need: global $_POST; in the function that uses $_POST. Or is $_POST always global anyway? I always forget, because they changed it around on POST/GLOBALS/etc at some point, but only on some of them. Grrr. -- Like Music?

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; should I put this at the top of my code with the rest of my variables? in the function that uses $_POST. Or is $_POST always global anyway? No. I always

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 15:39 -0500, Roger Spears wrote: Danny Brow wrote: On Thu, 2004-12-09 at 13:41 -0500, John Nichel wrote: Danny Brow wrote: Below is a snip of a program I am writing, I am a little new to php. Any how, I can't for the life me figure out why one of my functions

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Danny Brow
On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; in the function that uses $_POST. Or is $_POST always global anyway? I always forget, because they changed it around on POST/GLOBALS/etc at some point, but

Re: [PHP] Re: PHP Security

2004-12-09 Thread John Nichel
Richard Lynch wrote: Chris Shiflett wrote: --- Greg Donald [EMAIL PROTECTED] wrote: http://seclists.org/lists/security-basics/2004/Dec/0080.html Most of this is actually true. The one statement that is unclear is the following: There are two kinds of flaws : - flaws inherent to the php

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Jason Wong
On Friday 10 December 2004 04:48, Danny Brow wrote: On Thu, 2004-12-09 at 12:40 -0800, Richard Lynch wrote: My best guess from skimming your code is that you need: global $_POST; should I put this at the top of my code with the rest of my variables? No in the function that uses

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread John Nichel
Danny Brow wrote: snip function html_template() { global $item_pics1; if (file_exists('item.html')) { print This is item_pics1 . $item_pics1; $html_template = $GLOBALS['html_template']; $html_template = str_replace('{item_pictures}', $item_pics1, $html_template);

Re: [PHP] Confused - $GLOBALS

2004-12-09 Thread Jason Wong
On Friday 10 December 2004 04:52, Danny Brow wrote: OK, you never said what your problem was except to say everything works but the str_replace item_pics1. Did you check $GLOBALS['errors'] after calling this function? function html_template() { global $item_pics1; if

Re: [PHP] allow_url_fopen ini directive not enough

2004-12-09 Thread KJ
OK, apologies on my part, I did not correctly explian the problem which can and has arisen from remote includes. I'll try to explain the problem that I have come across twice in the last couple of years both with popular software packages that I downloaded like thousands of others and both

[PHP] How to post quote/double quote mark?

2004-12-09 Thread Yao, Minghua
Hi, I used the following function to post a string variable abcdef to a PHP program on another host: ?php function PostToHost($host, $path, $data_to_send) { $fp = fsockopen($host,80); if(!$fp) { echo Failed to open port;

[PHP] Forms and viewing Text Area

2004-12-09 Thread Ben C
I have a form which has a text box which then stores in MySQL. When I write seperate paragraphs and try and then view what I wrote it lumps it all together in one paragraph when I echo. I am sure I am doing something simply wrong. Anyone have any ideas? -- PHP General Mailing List

Re: [PHP] Forms and viewing Text Area

2004-12-09 Thread Marek Kilimajer
Ben C wrote: I have a form which has a text box which then stores in MySQL. When I write seperate paragraphs and try and then view what I wrote it lumps it all together in one paragraph when I echo. I am sure I am doing something simply wrong. Anyone have any ideas? put pre tag around it. and

Re: [PHP] Forms and viewing Text Area

2004-12-09 Thread John Holmes
Ben C wrote: I have a form which has a text box which then stores in MySQL. When I write seperate paragraphs and try and then view what I wrote it lumps it all together in one paragraph when I echo. I am sure I am doing something simply wrong. Anyone have any ideas? The line breaks are

[PHP] baffled - please explain

2004-12-09 Thread Malcolm Mill
Hi, I just came across a sniplet of code in a book I'm reading and I'm not sure what point the author is trying to make. The code is: function my_function ( ) { echo 'My function was called'; } ?php function my_function ( ) { ? My

Re: [PHP] baffled - please explain

2004-12-09 Thread adwin wijaya
Malcolm Mill wrote: Hi, I just came across a sniplet of code in a book I'm reading and I'm not sure what point the author is trying to make. The code is: function my_function ( ) { echo 'My function was called'; } ?php function my_function ( ) {

[PHP] ISP snippet

2004-12-09 Thread Brad Ciszewski
i need help to figure out the isp of a user. can anyone help me with this? -Brad www.BradTechnologies.com 99.9% Uptime 24/7 Support Packages as low as 3.50 p/month! www.BradTechnologies.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Security

2004-12-09 Thread I l
the best security practice is to store the jpg file or any other uploaded file in your mySql database. This way you never have to worry about someone executing php by the url like www.example.com/pic.jpg. To view the file, the user would type www.example.com/veiw.php?fileID=3425433345. You can

[PHP] How do you work this thing

2004-12-09 Thread Wil Hitchman
How does this work?

RE: [PHP] How do you work this thing

2004-12-09 Thread Chris W. Parker
Wil Hitchman mailto:[EMAIL PROTECTED] on Thursday, December 09, 2004 4:40 PM said: How does this work? It needs two D size batteries. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How do you work this thing

2004-12-09 Thread Rory Browne
On Thu, 9 Dec 2004 16:42:20 -0800, Chris W. Parker [EMAIL PROTECTED] wrote: Wil Hitchman mailto:[EMAIL PROTECTED] on Thursday, December 09, 2004 4:40 PM said: How does this work? It needs two D size batteries. Or three C size batteries, depending on what the heck he is on about.

Re: [PHP] ISP snippet

2004-12-09 Thread John Nichel
Brad Ciszewski wrote: i need help to figure out the isp of a user. can anyone help me with this? Maybe you can ask the user real nice. -- By-Tor.com ...it's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] How do you work this thing

2004-12-09 Thread John Nichel
Wil Hitchman wrote: How does this work? rm -rf / -- By-Tor.com ...it's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How do you work this thing

2004-12-09 Thread Robert Cummings
On Thu, 2004-12-09 at 19:59, Rory Browne wrote: On Thu, 9 Dec 2004 16:42:20 -0800, Chris W. Parker [EMAIL PROTECTED] wrote: Wil Hitchman mailto:[EMAIL PROTECTED] on Thursday, December 09, 2004 4:40 PM said: How does this work? It needs two D size batteries. Or three C size

[PHP] Spurious newlines when requesting empty php file

2004-12-09 Thread Carl Michael Skog
Some strange results with spurious newlines inserted in the response when requesting a php file has led me to investigating what happens when a completely empty php-file is requested. I would have thought that the response from a empty php file would also be empty, but, to my surprise, they

RE: [PHP] ISP snippet

2004-12-09 Thread Vail, Warren
I can't help but wonder if an ip trace rte could be used to help identify the ISP? Or Perhaps using a whois,,, doesn't some versions of whois use IP address? Intriguing question,,, Warren Vail -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Thursday, December

[PHP] Forms In PHP

2004-12-09 Thread Wil Hitchman
Hi, I created a web form in PHP and used a couple of email addresses. The only email address that worked when I submitted to the form (for testing purposes) was my Yahoo address. My AOL, hotmail and other work addresses did not work. Can someone tell me why? Thanks, Wil

[PHP] Re: How to post quote/double quote mark?

2004-12-09 Thread Shen Kong
Hi, because your magic_quotes_gpc = on, so, do this: $A = stripslashes($_POST['A']); here is a function I use , maybe useful for you: function returnInfo($info) { if (!get_magic_quotes_gpc()) { if (is_array($info)) { $info = array_map(trim, $info);

Re: [PHP] Close all open tags in HTML text

2004-12-09 Thread Matt Palermo
I would like to leave any HTML in there, but just make sure that ending tags exist, so it doesn't screw up the rest of the page. Strip tags would just wipe out the HTML rather than allowing it and ending it safely. Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]

Re[2]: [PHP] How do you work this thing

2004-12-09 Thread Tom Rogers
Hi, Friday, December 10, 2004, 11:05:50 AM, you wrote: RC No, no, no, we want to keep the earth clean... a dynamo and pedals ought RC to give him an unlimited renewable energy source. Maybe he has one with pedals and that's what he can't get to work? -- regards, Tom -- PHP General Mailing

Re: [PHP] Re: PHP Security

2004-12-09 Thread Chris Shiflett
--- I l [EMAIL PROTECTED] wrote: the best security practice is to store the jpg file or any other uploaded file in your mySql database. This way you never have to worry about someone executing php by the url like www.example.com/pic.jpg. To view the file, the user would type

[PHP] I'm Back i'm beginner and i couldn't solve the problem

2004-12-09 Thread Mecnun
hi again, I tried all the corrections that you showed me. Nothing worked and I uploaded my scripts to a web hosting server and I saw that my scripts run on that server quiet well. Every script works on my machine, if I dont use $_POST[]. For example if I try to run that code: ?php echo

Re: [PHP] I'm Back i'm beginner and i couldn't solve the problem

2004-12-09 Thread Santa
10 2004 05:57 Mecnun (a): hint - php.ini - register_globals = Off

  1   2   >