[PHP] Not sure how to loop this...(Newbie)

2002-06-01 Thread webmaster
I have this code: $end_date = time(); $year = 2002; $month = 4; $monthi = $month + 1; $time = SecondsInMonth($month, $year); $time_i = SecondsInMonth($monthi, $year); $query = "SELECT * FROM news WHERE date $time_i AND date $time ORDER BY id"; $result = mysql_query($query); $num_results =

Re: [PHP] MS SQL Problem

2002-06-01 Thread Justin Felker
Thanks for the reply. Actually, I am using both mssql_free_query and mssql_close along with mssql_pconnect. It still happens however. I can post the code if you are unsure. Does it have a history of threading issues as it only seems to happen when several requests are sent all at once or

Re: [PHP] Re: Speed comparison of PHP vs. PERL (not conclusive)

2002-06-01 Thread Dan Lowe
Previously, Manuel Lemos wrote: Your measures do not distinguish between the compile time and execute time. I don't know about Perl, but since PHP 4, Zend engine first compiles PHP code into opcodes and only then it executes the code. Perl is compiled internally prior to execution. --

Re: [PHP] Writing Files (Unix, Apache, PHP 4.0.X) [Newbie Alert]

2002-06-01 Thread Jason Teagle
John Holmes [EMAIL PROTECTED] wrote in message 001701c20901$eecbb4e0$b402a8c0@mango">news:001701c20901$eecbb4e0$b402a8c0@mango... Does the file already exist? It's not enough to change the directory permissions, you also have to change it on the file if it exists, and all of the folders

[PHP] Re: Not sure how to loop this...(Newbie)

2002-06-01 Thread Jason Teagle
[EMAIL PROTECTED] wrote in message 010001c20934$a71ab550$0200a8c0@JohnH">news:010001c20934$a71ab550$0200a8c0@JohnH... I am not sure how to get the newest records to display at the top. Rather than the bottom. There is no looping yet as I am not sure how to do it. Can I reverse to results array

[PHP] Variables - Using The Contents Of A Varibale Name Built Dynamically

2002-06-01 Thread Jason Teagle
I have found an alternate way of achieving what I want, but I'm wondering if there was an easier way. I have a PHP file that builds a Web page that includes forms. The forms are built dynamically based on the contents of a file, and thus there may be one or two or more forms on the page at any

[PHP] Affiliate PHP program project - Please help

2002-06-01 Thread r
Hi PPL, I'm doing an affiliate program for a small company in PHP, but am stuck a bit in the logic or thinking process I have a table with IdNo,clicks,month,year the affiliates will get a link like this http://mysite.com/affiliates/aff.php?IdNo=775 every time I get a click from 775 in the

Re: [PHP] PHP Decisions and Issues

2002-06-01 Thread Justin Felker
I just want to thank everyone for their responses. I do realize this was not exactly a question that could be answered as such but I still wanted to hear some people that have had personal experiences dealing with similar issues. FYI, I have read many websites that attempt to answer this

Re: [PHP] Hi all Help :D

2002-06-01 Thread Anthony
I have sorted the problem, thanks for all the support Adam Voigt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try reversing the filelocations in your ftp_put, like if you have remotelocation and mylocation, switch them to say mylocation then remotelocation.

php-general Digest 1 Jun 2002 10:39:18 -0000 Issue 1379

2002-06-01 Thread php-general-digest-help
php-general Digest 1 Jun 2002 10:39:18 - Issue 1379 Topics (messages 100184 through 100215): Re: Speed comparison of PHP vs. PERL (not conclusive) 100184 by: Ilia A. 100186 by: Manuel Lemos 100206 by: Jason Wong 100209 by: Dan Lowe Finding what headers and

[PHP] Re: Variables - Using The Contents Of A Varibale Name Built Dynamically

2002-06-01 Thread Michael Davey
You could give the button the same name in each form - only the fields in between the form/form tags is actually submitted, then put a hidden field in the form that uniquely identifies the data being submitted. Just a thought... it is what I usually do... Mikey Jason Teagle [EMAIL PROTECTED]

[PHP] problems with installing freetype2

2002-06-01 Thread andy
Hi there, I have problems to find out if the installation of freetype 2 has been successfull. It seems that only freetype 1 is running, since I can not use some commands. something went wrong, but there have been no complains during installation. Thanx for any help, andy -- PHP General

RE: [PHP] Affiliate PHP program project - Please help

2002-06-01 Thread John Holmes
UPDATE table SET click = click + 1 WHERE month = MONTH(NOW()) AND year = YEAR(NOW()) AND id = 775 Don't need to use PHP at all... ---John Holmes... -Original Message- From: r [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 01, 2002 6:13 PM To: [EMAIL PROTECTED] Subject: [PHP]

Re: [PHP] Apache, html, php and global variables

2002-06-01 Thread Peter Goggin
I am not clear what you mean by this. I have set session_start() on in the php script that logs onto the database initially. i then call a test php script from a button on the menu frame. This is the output it gives: Test php variables Warning: Cannot send session cookie - headers already sent

RE: [PHP] Apache, html, php and global variables

2002-06-01 Thread John Holmes
Sessions use cookies, which use headers, which have to be sent before any output. html is output. So, put session_start() before that. ? Session_start(); ... ? html body ... Where are you putting dbauser and dbapassword into the session? Your sessions still aren't going to work because the

Re: [PHP] MS SQL Problem

2002-06-01 Thread Sqlcoders.com Programming Dept
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, I remember reading of a config setting in php.ini which lowered the time PHP waits before clearing up/closing the socket out. If it's a linux system you might want to try running netstat to see the open net connections. If you see lots of

[PHP] A small question - Mysql_insert_id

2002-06-01 Thread r
Hi, I am inserting a row into a table with this structure id (auto increment) name (varchar) hits (int) I am using insert into mytable values(NULL,'Ryan',90); Then according to the manual I have to use (to quote) printf (Last inserted record has id %d\n, mysql_insert_id()); will this return

Re: [PHP] A small question - Mysql_insert_id

2002-06-01 Thread Julie Meloni
r I am inserting a row into a table with this structure r id (auto increment) ... Assuming you mean ID int not null primary key auto_increment (or something like that). r Then according to the manual I have to use (to quote) r printf (Last inserted record has id %d\n, mysql_insert_id()); r

Re: [PHP] A small question - Mysql_insert_id

2002-06-01 Thread r
Hey Julie, Thanks for replying, Actually the ID field is not null,primary and auto_increment. Thanks for the URL but in my message I did quote the line from that same url (http://www.php.net/manual/en/function.mysql-insert-id.php) I just need to get the ID of the just inserted record. Any

Re: [PHP] A small question - Mysql_insert_id

2002-06-01 Thread Stuart Dallas
On Sunday, June 2, 2002 at 4:07:31 AM, you wrote: will this return the row number or the id fields value..? If it returns the row number how do I get the ID number? The id started at 1500. From the manual page for mysql_insert_id()... mysql_insert_id() returns the ID generated for an

Re[2]: [PHP] A small question - Mysql_insert_id

2002-06-01 Thread Julie Meloni
r Actually the ID field is not null,primary and auto_increment. Well, it has to be of a TYPE as well... r Thanks for the URL but in my message I did quote the line from that same url r (http://www.php.net/manual/en/function.mysql-insert-id.php) r I just need to get the ID of the just inserted

[PHP] XML to ARRAY

2002-06-01 Thread Christopher J. Crane
Here is a piece of code, that is close to doing what I want it to. The end result I would like to have is an array that is simple to work with. If the XML tag was issue-nameRED HAT/issue-name, I would like something like the following: $Tags['issue-name']. So I could print it out. Something

[PHP] Julie- A small question - Mysql_insert_id

2002-06-01 Thread r
Hey Julie, Sorry, am not f*cking with you or anybody, just new to databases in PHP, I'm from a java servlet background and we dont have this kind of function there. I'm sorry if I offended you or made you think that I was pulling your leg, its just that after 7 hours of programming the manual

[PHP] value passing from html form to php variable.

2002-06-01 Thread Wei Wang
I am not sure if this is the right place to ask this naive question. I got a simple form addform.html and add.php look like the following. But everytime I got empty value from firstname and lastname. It seems like the input value in the html page was not passed on to the php variable $firstname

Re: [PHP] value passing from html form to php variable.

2002-06-01 Thread Stuart Dallas
On Saturday, June 1, 2002 at 4:51:20 PM, you wrote: I got a simple form addform.html and add.php look like the following. But everytime I got empty value from firstname and lastname. It seems like the input value in the html page was not passed on to the php variable $firstname in add.php.

[PHP] reg exp problems

2002-06-01 Thread Andrew Brampton
Hi, I've never used a reg exp, but I was trying to do something simple, and I just can't seem to do it :) I have a varible $fdata which contains the contents of a webpage, and I want to strip out the base tag. I try: $fdata = preg_replace(base.*,,$fdata); But its stripping out everything

Re: [PHP] value passing from html form to php variable.

2002-06-01 Thread Wei Wang
Do you mind telling me where this php.ini is? And I tried the second attempt like this: $query = INSERT INTO friends (id, firstname, surname) values (nextval('friends_id_seq'), $_POST['firstname'], $_POST['surname']); which returns error: Parse error: parse error, unexpected

Re: [PHP] value passing from html form to php variable.

2002-06-01 Thread Philip Olson
Some thoughts: a) Why is $firstname empty? It's empty because the PHP directive register_globals = off. So, PHP will not create $firstname automatically. This is most likely the cause. b) How do I access $firstname with register_globals = off then? Many ways. Regardless of

Re: [PHP] value passing from html form to php variable.

2002-06-01 Thread Philip Olson
$query = INSERT INTO friends (id, firstname, surname) values (nextval('friends_id_seq'), $_POST['firstname'], $_POST['surname']); which returns error: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in

Re[2]: [PHP] value passing from html form to php variable.

2002-06-01 Thread Stuart Dallas
On Saturday, June 1, 2002 at 5:00:18 PM, you wrote: Do you mind telling me where this php.ini is? Create a php script containing just ?php phpinfo(); ?. That page will tell you where your php.ini is (or should be). And I tried the second attempt like this: $query = INSERT INTO friends (id,

Re: Re[2]: [PHP] value passing from html form to php variable.

2002-06-01 Thread Wei Wang
Create a php script containing just ?php phpinfo(); ?. That page will tell you where your php.ini is (or should be). it told me it's in php/lib, but it's not there. Try this... $query = INSERT INTO friends (id, firstname, surname) values (nextval('friends_id_seq'),

Re: Re[2]: [PHP] value passing from html form to php variable.

2002-06-01 Thread Wei Wang
Sorry. When I input Andras as firstname in the form, ... On Sat, 1 Jun 2002 17:22:02 +0100 [EMAIL PROTECTED] (Wei Wang) wrote: Create a php script containing just ?php phpinfo(); ?. That page will tell you where your php.ini is (or should be). it told me it's in php/lib, but it's

Re[4]: [PHP] value passing from html form to php variable.

2002-06-01 Thread Stuart Dallas
On Saturday, June 1, 2002 at 5:22:02 PM, you wrote: Create a php script containing just ?php phpinfo(); ?. That page will tell you where your php.ini is (or should be). it told me it's in php/lib, but it's not there. The default php.ini is called php.ini-recommended and will be in the

Re: Re[2]: [PHP] value passing from html form to php variable.

2002-06-01 Thread Wei Wang
Is there anything I should do to make the php.ini come into effect? I did put the register_global = On but still got empty values. And my $_POST version is like this: ?php $db = pg_connect(dbname=friends); $query = INSERT INTO friends (id, firstname, surname) values

Re: Re[4]: [PHP] value passing from html form to php variable.

2002-06-01 Thread Wei Wang
Sorry. I restared apache and php.ini came into effect. On Sat, 1 Jun 2002 17:29:13 +0100 [EMAIL PROTECTED] (Stuart Dallas) wrote: On Saturday, June 1, 2002 at 5:22:02 PM, you wrote: Create a php script containing just ?php phpinfo(); ?. That page will tell you where your php.ini is (or

Re[4]: [PHP] value passing from html form to php variable.

2002-06-01 Thread Stuart Dallas
On Saturday, June 1, 2002 at 5:35:03 PM, you wrote: Is there anything I should do to make the php.ini come into effect? I did put the register_global = On but still got empty values. you may not need to do anything or you may need to restart your http server. Have a look at your phpinfo()

Re[6]: [PHP] value passing from html form to php variable.

2002-06-01 Thread Stuart Dallas
On Saturday, June 1, 2002 at 5:37:37 PM, you wrote: Sorry. I restared apache and php.ini came into effect. If you're going to run with register_globals on you should make sure you understand the implications: http://www.php.net/manual/en/security.registerglobals.php. -- Stuart -- PHP

Re: Re[4]: [PHP] value passing from html form to php variable.

2002-06-01 Thread Wei Wang
Changed the query and get this error when input dave as firstname: ERRORERROR: Attribute 'dave' not found add2.php is: html body ?php $db = pg_connect(dbname=friends); $query = INSERT INTO friends (id, firstname, surname) values (nextval('friends_id_seq'), .$_POST['firstname'].,

Re: [PHP] reg exp problems

2002-06-01 Thread Jason Wong
On Saturday 01 June 2002 23:56, Andrew Brampton wrote: Hi, I've never used a reg exp, but I was trying to do something simple, and I just can't seem to do it :) I have a varible $fdata which contains the contents of a webpage, and I want to strip out the base tag. I try: $fdata =

Re[6]: [PHP] value passing from html form to php variable.

2002-06-01 Thread Stuart Dallas
On Saturday, June 1, 2002 at 6:00:22 PM, you wrote: $query = INSERT INTO friends (id, firstname, surname) values (nextval('friends_id_seq'), .$_POST['firstname']., .$_POST['surname'].); It's so obvious you're gonna kick yourself (I did!). You need to enclose the two values in quotes, like

[PHP] Possible to convert from Hex string to integer?

2002-06-01 Thread Michael Davey
Does anyone know of a function within PHP that will convert a hexadecimal string (without the leading 0x) into an integer? regards, Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Possible to convert from Hex string to integer?

2002-06-01 Thread Rasmus Lerdorf
Did you check the manual? http://php.net/hexdec On Sat, 1 Jun 2002, Michael Davey wrote: Does anyone know of a function within PHP that will convert a hexadecimal string (without the leading 0x) into an integer? regards, Mikey -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Possible to convert from Hex string to integer?

2002-06-01 Thread Stuart Dallas
On Saturday, June 1, 2002 at 6:29:59 PM, you wrote: Does anyone know of a function within PHP that will convert a hexadecimal string (without the leading 0x) into an integer? FFS!! http://www.php.net/hexdec -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] reg exp problems

2002-06-01 Thread Andrew Brampton
Hi, thanks for the suggestion, but the base tag doesn't have to have a closing tag, OR it appears many/all sites I've seen don't use the closing tag. Andrew - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 01, 2002 6:02 PM Subject: Re:

Re: [PHP] reg exp problems

2002-06-01 Thread Michael Sims
On Sat, 1 Jun 2002 16:56:04 +0100, you wrote: Hi, I've never used a reg exp, but I was trying to do something simple, and I just can't seem to do it :) I have a varible $fdata which contains the contents of a webpage, and I want to strip out the base tag. I try: $fdata =

Re: [PHP] Possible to convert from Hex string to integer?

2002-06-01 Thread Michael Davey
Which is so easy to find in the offline manual... Stuart Dallas [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Saturday, June 1, 2002 at 6:29:59 PM, you wrote: Does anyone know of a function within PHP that will convert a hexadecimal string (without the

RE: [PHP] Speed comparison of PHP vs. PERL (not conclusive)

2002-06-01 Thread Mark Charette
From: Jason Wong [mailto:[EMAIL PROTECTED]] Try comparing reading 10K rows from a DB using Perl and PHP would be a more useful benchmark. --- When's the last time you wrote a Web page that needed 10K rows displayed? Writing good _and relevant_ benchmarks is one of the more difficult things to do

[PHP] help me....S.O.S...my php doesn't ascend

2002-06-01 Thread omora
Hi: I have a Big Problems for my. I have a server with WINNT 4.0 and IIS 3.0, I wanted to install PHP (ver. 4.2.1) and it doesn't ascend. I made it like it was indicated it configures in it paginates it http://www.php.net/manual/fi/configuration.php but neither I am this way, did I

[PHP] Re: Is PHP used by U.S. Government? By U.S. DoD?

2002-06-01 Thread Christopher J. Crane
Another site that you should be aware of is for both internal and external, NASA uses PHP and MySQL, of which both are free. John Christopher [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I would like to use PHP in a project for a United States Government

Re: [PHP] Speed comparison of PHP vs. PERL (not conclusive)

2002-06-01 Thread Jason Wong
On Sunday 02 June 2002 02:12, Mark Charette wrote: From: Jason Wong [mailto:[EMAIL PROTECTED]] Try comparing reading 10K rows from a DB using Perl and PHP would be a more useful benchmark. --- When's the last time you wrote a Web page that needed 10K rows displayed? Never. Perhaps you

[PHP] pcntl functions for task manager - comments?

2002-06-01 Thread Clay Loveless
I'm experimenting with PHP's pcntl_* functions using the PHP cgi ... I've never written a daemon before, and there doesn't seem to be a lot of information out there about how to do this with the pcntl functions. So, I've read what I can find on the subject as it deals with UNIX programming. The

[PHP] displaying client IP address

2002-06-01 Thread Hugo Gallo
I an effort to deter fraudulent credit cards, I'd like to display the client's IP address. Anyone know how this is done with PHP scripting? There is SSI code Perl code for this, but I need to have this be a .php page since it's talking to MySQL. Any help would be much appreciated. Hugo --

Re: [PHP] displaying client IP address

2002-06-01 Thread Gerard Samuel
$_SERVER['REMOTE_ADDR'] Hugo Gallo wrote: I an effort to deter fraudulent credit cards, I'd like to display the client's IP address. Anyone know how this is done with PHP scripting? There is SSI code Perl code for this, but I need to have this be a .php page since it's talking to MySQL. Any

[PHP] Nathan-Re: [PHP] Julie- A small question - Mysql_insert_id

2002-06-01 Thread r
Hey dude, Yeah, I seem to have a talent for pissing people of unintentally, and Julie seemed to have gotten more than a little pissed at me. Anyway, the reason I didnt specify the type was that I was under the impression that if you have a auto_increment it has to be an integer...I mean you cant

[PHP] New to PHP- Form Validation Logic/Design Question

2002-06-01 Thread lfindle
I am *very* new to PHP am trying to write a tool where a user can add books to a library MySQL database. The user fills out an HTML form. I do some form validation if the form entries are ok, I need to run some SQL queries using the form variables. I have the HTML form posting back to

[PHP] Problems with Multi-Uploads (AGAIN)

2002-06-01 Thread Nick Patsaros
Okay so this is what I'm trying, basically for the purposes of posting a news article I want to be able to upload supporting text files with the content of the article. Here's what I've got so far... I think I've totally missed the mark or understood the documentation in the manual on this...

RE: [PHP] New to PHP- Form Validation Logic/Design Question

2002-06-01 Thread David Freeman
I included a pseudocode form of my logic here my actual code below. A suggestion in similar pseudo code. top of page set a flag to display form If (form submitted) { validate entered data if (data is correctly validated) { enter data into database if (database

RE: [PHP] Nathan-Re: [PHP] Julie- A small question - Mysql_insert_id

2002-06-01 Thread David Freeman
Yeah, I seem to have a talent for pissing people of unintentally, and Julie seemed to have gotten more than a little pissed at me. Anyway, the reason I didnt specify the Perhaps the problem is that you're asking a question that you could solve yourself. You asked about

[PHP] Newman Says: Only one value from a msSQL field.

2002-06-01 Thread Philip J. Newman
Only one value from a msSQL field. I have many values the same in a field and would like to know how i can select one of each (not mating). $sql = SELECT * FROM brands WHERE 1 ORDER BY `sId` DESC LIMIT 6; lists everything .. ANy help would be cool. Phil

php-general Digest 2 Jun 2002 00:39:52 -0000 Issue 1380

2002-06-01 Thread php-general-digest-help
php-general Digest 2 Jun 2002 00:39:52 - Issue 1380 Topics (messages 100216 through 100264): Re: Variables - Using The Contents Of A Varibale Name Built Dynamically 100216 by: Michael Davey problems with installing freetype2 100217 by: andy Re: Affiliate PHP program

[PHP] PHP Coding Problem

2002-06-01 Thread Christopher J. Crane
Here is a piece of code, that is close to doing what I want it to. The end result I would like to have is an array that is simple to work with. If the XML tag was issue-nameRED HAT/issue-name, I would like something like the following: $Tags['issue-name']. So I could print it out. Something

RE: [PHP] New to PHP- Form Validation Logic/Design Question

2002-06-01 Thread John Holmes
if($REQUEST_METHOD == post) { //do validation of data if($validated == yes) { //do queries } else { echo not validated; include(form.html); } } else {include(form.html);} Maybe that'll work. I'm trying to follow your logic. That will check for the request method

RE: [PHP] help me....S.O.S...my php doesn't ascend

2002-06-01 Thread John Holmes
Maybe you should just ask your question in Spanish, because I have no idea what you just asked... Does it just not work? ---John Holmes... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 01, 2002 2:34 PM To: [EMAIL PROTECTED] Subject:

Re: [PHP] Newman Says: Only one value from a msSQL field.

2002-06-01 Thread Leif K-Brooks
I don't know about msSQL, but in mySQL you can do something like $sql = SELECT * FROM brands WHERE 1 GROUP BY field ORDER BY `sId` DESC LIMIT 6; Philip J. Newman wrote: Only one value from a msSQL field. I have many values the same in a field and would like to know how i can select one of

RE: [PHP] Newman Says: Only one value from a msSQL field.

2002-06-01 Thread John Holmes
This has nothing to do with PHP. Subscribe to a database list. Use DISTINCT or GROUP BY ---John Holmes... -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 8:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Newman Says: Only one value from

[PHP] Include question

2002-06-01 Thread John Holmes
Hi. When I've got code like the following: if($this) { include(this.html); } elseif($that) { include(that.html); } When are the includes() evaluated? Does the Zend engine do the includes first, pull in all of the code, then process it and produce output. Or does the engine start processing

[PHP] Determine overhead of PHP script.

2002-06-01 Thread John Holmes
Is there a way to determine the overhead or memory usage of a PHP script as it runs? What I'm looking at is say I've got this nice simple script to display info. Now I want to add a database abstraction layer and a template engine. Sure, this makes it easy for me to control changes, but now

[PHP] massive words

2002-06-01 Thread Justin French
hi all, looking for some advice on the best way to approach this: i have a guestbook running on a few sites, and occasionally we get creative people who think it's a good idea to post messages with really long words or URLs into the text, which totally mess up the layout of the page. what I

Re: [PHP] Determine overhead of PHP script.

2002-06-01 Thread Bogdan Stancescu
It's more of a time-consuming issue rather than memory usage IMHO. However, unless you make several extra database requests, I found that running PHP code is generally rather fast and adding considerable extra code doesn't affect the speed significantly. I must reiterate however that if your

Re: [PHP] Include question

2002-06-01 Thread Bogdan Stancescu
Your second guess. But you could've tested it easily with two includes appending stuff to the same global var. Bogdan John Holmes wrote: Hi. When I've got code like the following: if($this) { include(this.html); } elseif($that) { include(that.html); } When are the includes() evaluated?

Re: [PHP] massive words

2002-06-01 Thread Bogdan Stancescu
First, you don't need to explode and then implode - just use a different var for the exploded array and use the original after the test. My suggestion for testing (but you really must test it and see if it's faster or slower than your method) is using wordwrap() with your max word length and

[PHP] Baffled, line producing error

2002-06-01 Thread Craig Vincent
I was happily coding when I came across a mysterious error. I've traced it to this line if ($player_password != $player_password_verify) { $errmsg .= 'Password don't match. Please try againBR'; $error = 1; } commented out the script runs fine, if this line is active an error is produced. My

Re: [PHP] displaying client IP address

2002-06-01 Thread Bogdan Stancescu
http://www.faqts.com/knowledge_base/view.phtml/aid/186 Hugo Gallo wrote: I an effort to deter fraudulent credit cards, I'd like to display the client's IP address. Anyone know how this is done with PHP scripting? There is SSI code Perl code for this, but I need to have this be a .php page

Re: [PHP] massive words

2002-06-01 Thread Justin French
Thanks! Justin on 02/06/02 1:18 PM, Bogdan Stancescu ([EMAIL PROTECTED]) wrote: First, you don't need to explode and then implode - just use a different var for the exploded array and use the original after the test. My suggestion for testing (but you really must test it and see if it's

RE: [PHP] Baffled, line producing error

2002-06-01 Thread Jonathan Rosenberg
What is the exact error message are you seeing? -Original Message- From: Craig Vincent [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 01, 2002 11:29 PM To: [EMAIL PROTECTED] Subject: [PHP] Baffled, line producing error I was happily coding when I came across a mysterious

RE: [PHP] Include question

2002-06-01 Thread John Holmes
The global var wouldn't work. Even if both are loaded into memory before the script is ran, only one include will actually be executed along with the code, so only one would end up affecting a global var either way. What I'm looking at is if each include .html file is 50K, am I loading 100K

[PHP] Re: Problems with upload

2002-06-01 Thread Aaron Ott
The answer... the php.ini did not accept the value 2M. it would, however accept 2097152. Aaron Aaron [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to upload files to a server. I have the script and it works on other servers but when I try to

[PHP] simple email validation ereg

2002-06-01 Thread Justin French
Hi, I know that there are more complex functions and classes out there for validating email address', but some of them do return invalid on *technically* valid, although uncommon email address', so all I want is a simple test for: (anything)@(anything) followed by 1 or more (.anything) ie

RE: [PHP] Baffled, line producing error

2002-06-01 Thread John Holmes
If the error is a warning about undefined variable, then set a default value for $errmsg before you start adding strings to it. $errmsg .= this; That by itself means $errmsg = $errmsg . this;, but if $errmsg isnt' defined, you'll get the warning. Set $errmsg = ''; at the beginning of your

Re: [PHP] simple email validation ereg

2002-06-01 Thread Clay Loveless
Maybe I'm biased, but if you grab validateEmailFormat.php from www.killersoft.com, you'd be able to do something as simple as this: ?php include(/path/to/validateEmailFormat.php); $email = [EMAIL PROTECTED]; $isValid = validateEmailFormat($email); if($isValid) { // do whatever you need to

Re: [PHP] Baffled, line producing error

2002-06-01 Thread Craig Vincent
If the error is a warning about undefined variable, then set a default value for $errmsg before you start adding strings to it. $errmsg .= this; That by itself means $errmsg = $errmsg . this;, but if $errmsg isnt' defined, you'll get the warning. Set $errmsg = ''; at the beginning of

Re: [PHP] Apache, html, php and global variables

2002-06-01 Thread Peter Goggin
My script is: html body ?php session_start(); printf(P loggin on as ); printf (Puser name: ); printf ($HTTP_POST_VARS['User']); printf (PPassword: );printf ($HTTP_POST_VARS['Password']); printf (P); /* Connecting, selecting database */ $link = mysql_pconnect(localhost,

RE: [PHP] Apache, html, php and global variables

2002-06-01 Thread John Holmes
Did you read my reply at all? Call session_start() before any output to the browser. ---John Holmes... -Original Message- From: Peter Goggin [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 1:20 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Apache, html, php

Re: [PHP] Baffled, line producing error

2002-06-01 Thread Philip Olson
You have: if ($player_password != $player_password_verify) { $errmsg .= 'Password don't match. Please try againBR'; $error = 1; } Notice the ' inside the '', this is bad syntax. For more information on using strings in PHP, see: http://www.zend.com/zend/tut/using-strings.php

Re: [PHP] Baffled, line producing error

2002-06-01 Thread Craig Vincent
Notice the ' inside the '', this is bad syntax. For more information on using strings in PHP, see: Sheesh you're right, as I said it was probably a dumb error, three other people have looked at this that I'm aware of and missed it toolol glad your eyes are better than ours. Thank you for

Re: [PHP] Apache, html, php and global variables

2002-06-01 Thread Jason Wong
On Sunday 02 June 2002 13:31, John Holmes wrote: Did you read my reply at all? Call session_start() before any output to the browser. The errors I get are: Warning: Cannot send session cookie - headers already sent by (output started at c:\usr\www\my-domain\databaselogin.php:3) in

RE: [PHP] Apache, html, php and global variables

2002-06-01 Thread John Holmes
Thanks, well said. John -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 2:10 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Apache, html, php and global variables On Sunday 02 June 2002 13:31, John Holmes wrote: Did you read my reply at