Re: [PHP] isset()

2001-02-25 Thread Joe Stump
> you do not want to use strlen() for the following reasons: > 1) makes code unreadable -> very sloppy Yeah and your if(isset($var) && $var != '') is pretty > 2) overhead You call one function and do two comparisons - vs an age old C function I'd like to run some numbers on that. > 3) it

[PHP] Join causing Error?

2001-02-25 Thread Keith Spiller
Can anyone tell me why this: Line 282mysql_select_db("centraldb",$db); Line 283$qorder++; Line 284$result = mysql_query("SELECT q.questid, q.question, q.answer, q.qorder, q.depart, q.catid, q.active, q.global, q.adate, q.author, q.authoremail, q.askemail, c.

[PHP] Implode?

2001-02-25 Thread Kenneth R Zink II
What is the best way to pull data from one table and insert into another? How can I delete entries from a table with a php document? The gist of what I'm trying to accomplish is this. This is somewhat of a detailed outline, so please bear with me. 1. I have one table (members) that has all the

[PHP] How do I submit a POST form?

2001-02-25 Thread Alexis Michel Golzman
Hi, I've submitted many times a GET form like this: header("Location: http://examplesite.com/myscript.php3?key=value&key2=value2&keyn=valuen"); but now I need to submit a POST form. How is this done? I found this Perl code on the web: --

[PHP] php.ini

2001-02-25 Thread Brandon Feldhahn
what do i put in the "Sendmail_from" section of php.ini? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Join causing Error?

2001-02-25 Thread CC Zona
In article <030601c09f05$2b9e6e70$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Keith Spiller") wrote: > Can anyone tell me why this: > Line 282mysql select db("centraldb",$db); > Line 283$qorder++; > Line 284$result = mysql query("SELECT q.questid, q.question, q.answer, > q.qord

Re: [PHP] PHP4 install question

2001-02-25 Thread Michael Hall
There may be other/easier solutions, but what always works for me is compiling Apache from source after removing the rpm, then compiling PHP from source. The instructions at the end of the README.config file in the Apache source distro work like a charm. This seems long-winded but at least I know

Re: [PHP] Join causing Error?

2001-02-25 Thread Chris Adams
On 25 Feb 2001 00:20:37 -0800, Keith Spiller <[EMAIL PROTECTED]> wrote: > Line 284$result =3D mysql_query("SELECT q.questid, q.question, = Try changing this to something like $result = mysql_query("SELECT ...") or die(mysql_error()); and seeing what error is being returned by MySQL.

RE: [PHP] session_register in function

2001-02-25 Thread PHPBeginner.com
you have to have the variable you register (in both ways) global. so no matter how you call the function the variable must be defined global. mailto:[EMAIL PROTECTED]] Sent: Sunday, February 25, 2001 1:16 AM To: PHP List Subject: [PHP] session_register in function The variable I register befor

RE: [PHP] DIsplaying page before script finnished

2001-02-25 Thread PHPBeginner.com
use flush() it will push the output out of apache. But note, if you have a table, on Netscape not much will be shown (even if it receives the data) until the arrives. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.

RE: [PHP] Cookie References?

2001-02-25 Thread PHPBeginner.com
Yes it can : here's what I once was doing to assign a user with a cookie containing a Session ID: $uniqid = md5 (uniqid (rand())); if(!isset($sid)) { $time = time(); setcookie ("sid", $uniqid, $time*3); } time()+time() makes it really, really LONG ... (62 years?), of course i

RE: [PHP] php_self

2001-02-25 Thread PHPBeginner.com
Here's what to do: in Apache: Add (this is all one line) LoadModule php4_module C:/Webserver/php/sapi/php4apache.dll then (five lines) AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4 Add

RE: [PHP] comparing numbers

2001-02-25 Thread PHPBeginner.com
$id = ($id<=59) ? $id=81 : false; or the traditional way: if($id<=59) { $id=81; } Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Clayton Dukes [mailto:[EMAIL PROTECTED]

RE: [PHP] Temporarily turning off magic quotes?

2001-02-25 Thread PHPBeginner.com
you can use: if($REQUEST_METHOD=='GET' or $REQUEST_METHOD=='POST') ini_set ('magic_quotes_gpc', 'off'); Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Ben Cheng

RE: [PHP] Unwanted Characters

2001-02-25 Thread PHPBeginner.com
use eregi_replace("[asutk]+", '', $string) in this way there will be no such letters as a,s,u,t,k in $string Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Clayton Dukes [

RE: [PHP] isset()

2001-02-25 Thread PHPBeginner.com
100% agreed! this makes much more sense then any of us was saying before. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Mark Maggelet [mailto:[EMAIL PROTECTED]] Sent: Sunda

Re: [PHP] isset()

2001-02-25 Thread Christian Reiniger
On Sunday 25 February 2001 09:01, Mark Maggelet wrote: > >> if($var!='') > >> > >> will fix your all your worries without an intervention of a > >Except that it will throw a warning in PHP4 if $var is not set. > >=> isset () should be used. > > man, this is like the thread that will not die. iss

[PHP] incrementing a date!

2001-02-25 Thread kaab kaoutar
Hi all! s there a way with which we can increment a date (by day) without extracting the month the day and the year then increment some of them depending on the day the month and the year ? ex: 2001-03-28 'll become 2001-04-01 Thanks _

[PHP] session_start

2001-02-25 Thread kaab kaoutar
hi! do we have to use in each page using the data of a session the session-start()? cause in the manual it says that session_start -- Initialize session data and session_start() creates a session ?! thanks _ Get Your Private

[PHP] Plugin Detection with PHP?

2001-02-25 Thread Andy Clarke
Is there a way to use PHP to tell whether a user's browser has a particular plugin? I thought that the $HTTP_ACCEPT variable might have this type of information, but in a little test that I have done, it just returns "*/*". I know that this can be done using Javascript, but as this can be turned

[PHP] No same username

2001-02-25 Thread Brandon Feldhahn
how do i make somthing with my database that knows it the username entered is already a name in use? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL

[PHP] Re: [PHP-DEV] No same username

2001-02-25 Thread André Langhorst
Brandon Feldhahn wrote: > how do i make somthing with my database that knows it the username > entered is already a name in use? please do not cross-post!!! it is sufficient to post it to _one_ mailing list (php-general) thanks -- · André Langhorstt: +49 331 5811560 · · [EMAIL PROTEC

Re: [PHP] incrementing a date!

2001-02-25 Thread Web Admin
hi, try $tomorrow = mktime(0,0,0,date("m") ,date("d")+1,date("Y")); or maybe better than this, if you convert the date to the standard unix timestamp and use DATE function. Best of luck, Ahmad Anvari - Original Message - From: kaab kaoutar To: [EMAIL PROTECTED] Sent: Sunday, F

Re: [PHP] No same username

2001-02-25 Thread Web Admin
define a UNIQUE field :) - Original Message - From: Brandon Feldhahn To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Sunday, February 25, 2001 4:03 PM Subject: [PHP] No same username how do i make somthing with my database that knows it the username

Re: [PHP] No same username

2001-02-25 Thread Kath
$sql = "SELECT username FROM main_users WHERE username = '$username'"; $result = mysql_query($sql); $num = mysql_numrows($result); if ($num > "0") { die ("That username already exists, please chose another"); } - That could do it :) - Kath - Original Messa

Re: [PHP] crontab help

2001-02-25 Thread Joe Stump
Didn't you just ask this a few days ago? In your while loop put a sleep(300) which will sleep for 300 seconds after processing X amount of emails. --Joe On Fri, Feb 22, 2002 at 02:53:10PM +0800, Arnold Gamboa wrote: > hi there. > > is there a way to tell crontab to do: > > "run script every 5

Re: [PHP] No same username

2001-02-25 Thread Web Admin
Or better using: create table test1 (t1 char(5), t2 char(5), primary key (t1), unique (t2)); when creating table. No duplicate records with the same t2 because it's unique. Ahmad Anvari - Original Message - From: Kath To: Brandon Feldhahn ; [EMAIL PROTECTED] Sent: Sunday, Fe

Re: [PHP] Detecting JavaScript

2001-02-25 Thread Trevor DeVore
PHP won't be able to tell you if JavaScript is enabled or not. PHP can only determine what version of JavaScript is supported based on the browser information provided in HTTP_USER_AGENT. Trevor DeVore Blue Mango Multimedia > > > > > > > Who can give me a PHP-Script to > > > > detect if Ja

Re: [PHP] Unwanted Characters

2001-02-25 Thread Clayton Dukes
This doesn't seem to work, have I done something wrong? $sometext = "ThÀe cØar röøan over mÖy dog\n"; $thread = ereg_replace("[^[:alnum:][:space:]]", "", $sometext); echo $thread; still prints: ThÀe cØar röøan over mÖy dog Thanks, Clayton - Original Message - From: <[EMAIL

[PHP] so what program?

2001-02-25 Thread Knasen
Ok.. What I found out in my first mail to the list was..quit working with filmaker =). Sure, I can do that. But the question remains..what program WILL a macuser use to forfill the needs in MySQL/PHP? _ knasen -- PHP General Mailing List (http://www.php.net/) To unsubs

[PHP] Re: [PHP-DB] Join causing Error?

2001-02-25 Thread Bob Hall
Sir, I don't see anything wrong with the syntax in your query. If I haven't over looked something, and if you haven't misspelled anything, then you have a data problem. Since your first query returns a Cartesian product, you should get something if the WHERE clause returns >= 1 row for each ta

[PHP-CVS] cvs: CVSROOT / avail gen_acl_file.m4

2001-02-25 Thread Rasmus Lerdorf
rasmus Sun Feb 25 08:43:12 2001 EDT Modified files: /CVSROOTavail gen_acl_file.m4 Log: gtk karma for jan Index: CVSROOT/avail diff -u CVSROOT/avail:1.101 CVSROOT/avail:1.102 --- CVSROOT/avail:1.101 Sat Feb 24 11:53:41 2001 +++ CVSROOT/avail Sun Fe

php-general Digest 25 Feb 2001 16:56:03 -0000 Issue 533

2001-02-25 Thread php-general-digest-help
php-general Digest 25 Feb 2001 16:56:03 - Issue 533 Topics (messages 41542 through 41592): Re: Detecting JavaScript 41542 by: Mitchell Hagerty 41544 by: Mitchell Hagerty 41588 by: Trevor DeVore Re: Temporarily turning off magic quotes? 41543 by: Zeev Suraski

RE: [PHP] Temporarily turning off magic quotes?

2001-02-25 Thread Philip Olson
> you can use: > > if($REQUEST_METHOD=='GET' or $REQUEST_METHOD=='POST') > ini_set ('magic_quotes_gpc', 'off'); This will not work, ini_set cannot mess with magic_quotes setting, .htaccess is the prime option for temporarily changing this setting, as per the example provided by Zeev.

Re: [PHP] incrementing a date!

2001-02-25 Thread Philip Olson
> ex: 2001-03-28 'll become 2001-04-01 Here's an example (a hack) which may help you get going : print getFutureDate('2001-03-28',4); // 2001-04-01 function getFutureDate($date,$days,$format='Y-m-d') { list($year,$month,$day) = explode('-', $date); $timestamp = mktime(0,0,0, $mo

[PHP-CVS] cvs: php4 /ext/ircg ircg.c php_ircg.h

2001-02-25 Thread Sascha Schumann
sas Sun Feb 25 10:16:42 2001 EDT Modified files: /php4/ext/ircg ircg.c php_ircg.h Log: Add function for kick and topic Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.36 php4/ext/ircg/ircg.c:1.37 --- php4/ext/ircg/ircg.c:1.36 Sat Feb 24

[PHP] Simple String Replace Question

2001-02-25 Thread Jeff Oien
I would like to get rid of \n characters unless there are two or more in a row. So for example if there is a long email formatted like we do here with line break I want to remove the line breaks so text can be wrapped by a browser, but also show paragraph breaks where necessary. This is what I ha

Re: [PHP] Temporarily turning off magic quotes?

2001-02-25 Thread Chris Adams
On 25 Feb 2001 09:15:08 -0800, Philip Olson <[EMAIL PROTECTED]> wrote: >> ini_set ('magic_quotes_gpc', 'off'); > >This will not work, ini_set cannot mess with magic_quotes setting, More precisely, it can change the setting but your PHP code will be executed after the magic quotes work has

Re: [PHP] Unwanted Characters

2001-02-25 Thread Chris Adams
On 24 Feb 2001 21:31:33 -0800, Clayton Dukes <[EMAIL PROTECTED]> wrote: >How do I remove unwanted/unprintable characters from a variable? > >$sometext =3D "Th=C0e c=D8ar r=F6=F8an over m=D6y dog" >needs to be filtered and reprinted as: >"The car ran over my dog" Strip everything which isn't in th

Re: [PHP] isset()

2001-02-25 Thread Chris Adams
On 25 Feb 2001 00:01:30 -0800, Mark Maggelet <[EMAIL PROTECTED]> wrote: >On Sat, 24 Feb 2001 17:51:07 +0100, Christian Reiniger >([EMAIL PROTECTED]) wrote: >>On Saturday 24 February 2001 17:18, PHPBeginner.com wrote: >>> in my preceding email I've written: >>> >>> if($var!='') >>> >>> will fix yo

Re: [PHP] Plugin Detection with PHP?

2001-02-25 Thread Chris Adams
On 25 Feb 2001 04:37:21 -0800, Andy Clarke <[EMAIL PROTECTED]> wrote: >Is there a way to use PHP to tell whether a user's browser has a particular >plugin? ... >I know that this can be done using Javascript, but as this can be turned >off by the user etc, it seemed as though it would be more relia

Re: [PHP] isset()

2001-02-25 Thread Joe Stump
empty() fails when $var == 0 --Joe On Sun, Feb 25, 2001 at 10:50:15AM -0800, Chris Adams wrote: > On 25 Feb 2001 00:01:30 -0800, Mark Maggelet <[EMAIL PROTECTED]> wrote: > >On Sat, 24 Feb 2001 17:51:07 +0100, Christian Reiniger > >([EMAIL PROTECTED]) wrote: > >>On Saturday 24 February 2001 17:1

Re: [PHP] Simple String Replace Question

2001-02-25 Thread Chris Adams
On 25 Feb 2001 10:34:27 -0800, Jeff Oien <[EMAIL PROTECTED]> wrote: >I would like to get rid of \n characters unless there >are two or more in a row. So for example if there The Perl-compatible regular expressions support lookahead and look behind: $str = 'abcdefabcaadd'; echo "$str\n"; $str = p

[PHP] PhpLib Template Not Parsing

2001-02-25 Thread Kyndig
Afternoon All, Been running through archives and posts throughout the net. Hopin ta find an answer. Looks like the questions been asked, but no public answer has been made. I'm using PhpLib's Template code. ( just pulled the file and modified it a minor bit ) The problem I'm having is when I

[PHP-CVS] cvs: php4 /ext/midgard article.c midgard.c page.c topic.c

2001-02-25 Thread David Guerizec
davidg Sun Feb 25 11:31:17 2001 EDT Modified files: /php4/ext/midgard article.c midgard.c page.c topic.c Log: optimized the mgd_is_in_xxx_tree() functions Index: php4/ext/midgard/article.c diff -u php4/ext/midgard/article.c:1.8 php4/ext/midgard/article.c:

[PHP] PHP CGI-Binary

2001-02-25 Thread Julia A . Case
Ok, I give up... how do I build PHP as a CGI-Binary? I've spent two days searching the configure file for this. Julia -- [ Julia Anne Case ] [Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for.] [ Admining Linux ] [

Re: [PHP] PHP CGI-Binary

2001-02-25 Thread Frank M. Kromann
IF you dont specify --with-apache or --with-apxs configure options you will build the CGI ! - Frank >Ok, I give up... how do I build PHP as a CGI-Binary? I've spent two days >searching the configure file for this. > >Julia > >-- >[ Julia Anne Case ] [Ships are safe inside the harb

[PHP] RE: [PHP-DB] Re: [PHP] No same username

2001-02-25 Thread Scott Bernard
There is something called constraints in the database (generally). You have to set that field in the database, to unique, or make a "unique" index on that field. regards. idsarts. -Mensaje original- De: Web Admin [mailto:[EMAIL PROTECTED]] Enviado el: Domingo, 25 de Febrero de 2001 10:2

[PHP-CVS] cvs: php4 /ext/ircg ircg.c

2001-02-25 Thread Sascha Schumann
sas Sun Feb 25 13:53:20 2001 EDT Modified files: /php4/ext/ircg ircg.c Log: Provide improved means for mass joins Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.37 php4/ext/ircg/ircg.c:1.38 --- php4/ext/ircg/ircg.c:1.37 Sun Feb 25 10:1

[PHP] sockets...

2001-02-25 Thread Julia A . Case
Ok, I'm trying to open a socket connection to port 23 (telnet)... the script just seems to hang on connect... though I can connect and talk with ports 25 (smtp), port 80 (http), port 110 (pop3) and port 443 (https) so the code isn't too bad... Is there something special about the telnet por

RE: [PHP] Simple String Replace Question

2001-02-25 Thread Jeff Oien
> On 25 Feb 2001 10:34:27 -0800, Jeff Oien <[EMAIL PROTECTED]> wrote: > >I would like to get rid of \n characters unless there > >are two or more in a row. So for example if there > > The Perl-compatible regular expressions support lookahead and look behind: > > $str = 'abcdefabcaadd'; > echo "$

Re: [PHP] Simple String Replace Question

2001-02-25 Thread Simon Garner
From: "Jeff Oien" <[EMAIL PROTECTED]> > > On 25 Feb 2001 10:34:27 -0800, Jeff Oien <[EMAIL PROTECTED]> wrote: > > >I would like to get rid of \n characters unless there > > >are two or more in a row. So for example if there > > > > The Perl-compatible regular expressions support lookahead and loo

[PHP] Removing HTML codes using regexp

2001-02-25 Thread Toke Herkild
What if I want to replace all html codes from a string ? I've tried using : $myString = preg_replace('/<*>/, '', $myString); but that deletes all string... ( or everything from first '<' ) ... Toke Herkild... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Removing HTML codes using regexp

2001-02-25 Thread Simon Garner
From: "Toke Herkild" <[EMAIL PROTECTED]> > What if I want to replace all html codes from a string ? > I've tried using : > > $myString = preg_replace('/<*>/, '', $myString); > but that deletes all string... ( or everything from first '<' ) ... > > Toke Herkild... > > Try striptags() http:

Re: [PHP] so what program?

2001-02-25 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Knasen) wrote: > What I found out in my first mail to the list was..quit working with > filmaker =). Sure, I can do that. But the question remains..what program > WILL a macuser use to forfill the needs in MySQL/PHP? Don't quit working with file

[PHP] Maximum queries from a database?

2001-02-25 Thread James, Yz
Hi all, I'm a little concerned as to how many times some of the scripts I've been working on are querying a database: Some are making up to 4 or 5 queries each. Should this give me any cause for concern? I've only ever been unable to connect to the database once (other than through script erro

Re: [PHP] Simple String Replace Question

2001-02-25 Thread Chris Adams
On 25 Feb 2001 14:37:02 -0800, Jeff Oien <[EMAIL PROTECTED]> wrote: >> On 25 Feb 2001 10:34:27 -0800, Jeff Oien <[EMAIL PROTECTED]> wrote: >> >I would like to get rid of \n characters unless there >> >are two or more in a row. So for example if there >> >> The Perl-compatible regular expressions

RE: [PHP] Simple String Replace Question

2001-02-25 Thread Jeff Oien
That almost works. The two \n in a row are on new lines. So it's \n \n intead of \n\n. If that makes any sense. Jeff Oien > Or you could just do this: > > $str = "abc\ndefg\n\nxyzpqr\njklmno"; > $str = ereg_replace("([^\n])\n([^\n])", "\\1 \\2", $str); > echo $str; > ?> > > That sh

[PHP] Script not updating

2001-02-25 Thread Peter Houchin
Could some one please have a look thru my code and tell me why it creates a new record instead of updating the record? What this script is suposed to do is show a HTML form .. then once the user fills it out it then shows another form which echo's the values inputted in the first so the user

Re: [PHP] Simple String Replace Question

2001-02-25 Thread Simon Garner
From: "Jeff Oien" <[EMAIL PROTECTED]> > That almost works. The two \n in a row are on new lines. > So it's > \n > \n > intead of \n\n. If that makes any sense. > Jeff Oien No, that doesn't make any sense whatsoever :) A \n *is* a new line. I can only guess you're getting confused because there

Re: [PHP] Script not updating

2001-02-25 Thread Simon Garner
From: "Peter Houchin" <[EMAIL PROTECTED]> > Could some one please have a look thru my code and tell me why it creates a new record instead of updating the record? > [snip] > > if ($submit){ > > $result = mysql_query("INSERT INTO app (name,company,address,suburb,state,post,areacode,phone,faxar

Re: [PHP] Can't connect php to mysql on linux

2001-02-25 Thread David Robley
On Sat, 24 Feb 2001 16:10, George Alexander wrote: > Hi, > > I working on Redhat Linux 6.1 and I've installed > MySQL-3.23.33-1.i386.rpm and MySQL-client-3.23.33-1.i386.rpm. MySql is > working fine. I've even created a database also using MySqlAdmin. > Regarding Php I've installed php-3.0.18-1.6.

RE: [PHP] Script not updating

2001-02-25 Thread Peter Houchin
but that's why i've got the if($name){ if($submit) ... clause in it .. thinking that if there was a name then update the record.. otherwise create a new one -Original Message- From: Simon Garner [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 10:36 AM To: Peter Houchin;

Re: [PHP] Can't connect php to mysql on linux

2001-02-25 Thread eschmid+sic
On Mon, Feb 26, 2001 at 10:11:02AM +1030, David Robley wrote: > On Sat, 24 Feb 2001 16:10, George Alexander wrote: > > Hi, > > > > I working on Redhat Linux 6.1 and I've installed > > MySQL-3.23.33-1.i386.rpm and MySQL-client-3.23.33-1.i386.rpm. MySql is > > working fine. I've even created a data

[PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-25 Thread David Guerizec
davidg Sun Feb 25 15:34:48 2001 EDT Modified files: /php4/ext/midgard midgard.c Log: force user to pass $xparam by reference (from mgd_walk_xxx_tree() functions) Index: php4/ext/midgard/midgard.c diff -u php4/ext/midgard/midgard.c:1.18 php4/ext/midgard/mi

RE: [PHP] Script not updating

2001-02-25 Thread Miles Thompson
The query flagged by if ($submit) will always fire first, and it appears you will always have a $name value as well. I believe it's actually firing twice in some scenarios - runs the insert and then immediately updates. Will $submit contain different values? Then switch ( $submit ) { cas

Re: [PHP] Script not updating

2001-02-25 Thread Miles Thompson
Peter, In case "AAA" When $submit is set, you will always get an an insert; you have a mysql_query executing. In case "BBB" you are only assigning the SQL statement to $result, I didn't look further to see where it executes. It really doesn't matter because case "AAA" will always fire first.

[PHP] Using one invocation of PHP executable to generate multiple pages?

2001-02-25 Thread Jim Lum
Hi, I have PHP installed on a Win95 machine. What I'd like to do is to use a PHP page that will create multiple HTML pages. I guess that I can execute PHP.EXE multiple times, but was thinking that this means that it's going thru the overhead of starting up PHP.EXE each time. Is there any way t

[PHP] Dynamic Corners GD Image library

2001-02-25 Thread sam1600
Hi, This is probably a no brainer for the math wizards out there. Can anyone see how the folowing code ( originally posted on phpbuilder titled "RE: dynamic corners" as a responce to Rasmus's article on image creation with php & GD : http://www.phpbuilder.com/annotate/message.php3?id=1003041 ) c

Re: [PHP] Can't connect php to mysql on linux

2001-02-25 Thread Miles Thompson
George, 1. Is this a brand new project, or were you connecting before, on your web pages? If the latter, what changed? 2. **IMPORTANT** Have you also run phpinfo() and confirmed that you have mysql support installed? **IMPORTANT** 3. Did you stop and restart Apache? 4. Have you tried a minimal

[PHP-CVS] cvs: CVSROOT / avail cvsusers gen_acl_file.m4

2001-02-25 Thread Sascha Schumann
sas Sun Feb 25 16:25:36 2001 EDT Modified files: /CVSROOTgen_acl_file.m4 avail cvsusers Log: Give wez karma for php_dev and update email address Index: CVSROOT/gen_acl_file.m4 diff -u CVSROOT/gen_acl_file.m4:1.106 CVSROOT/gen_acl_file.m4:1.107 --- C

Re: [PHP] Using one invocation of PHP executable to generate multiple pages?

2001-02-25 Thread Miles Thompson
Jim, PHP works with your server to generate the HTML output, so PHP is "running" all the time, it's not like a CGI script. PHP code is embedded in your HTML pages, so you can use it to control the generated HTML. You can turn it on and off within the page. Carefully look at Chapter 1 Page 1 of

Re: [PHP] php.ini

2001-02-25 Thread David Robley
On Sun, 25 Feb 2001 18:21, Brandon Feldhahn wrote: > what do i put in the "Sendmail_from" section of php.ini? Did you check the documentation, or the sample ini file? According to the docs, sendmail_from string Which "From:" mail address should be used in mail sent from PHP under Windows. --

Re: [PHP] php.ini

2001-02-25 Thread John Monfort
__John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___+- On Mon, 26 Feb 2001, David Robley wrote: > On Sun, 25 Feb 2001 18:21, Brandon

[PHP] Printing long strings

2001-02-25 Thread Clayton Dukes
How can I get php to print a long string and ignore any of the characters in the string?   ie: $string = "so print $string;   isn't there some kind of command to use that keeps the string exactly as it is?       Clayton DukesCCNA, CCDA, CCDP, CCNPInternetwork Solutions EngineerInternetwork Ma

Re: [PHP] php.ini

2001-02-25 Thread eschmid+sic
On Mon, Feb 26, 2001 at 11:22:20AM +1030, David Robley wrote: > On Sun, 25 Feb 2001 18:21, Brandon Feldhahn wrote: > > what do i put in the "Sendmail_from" section of php.ini? > > Did you check the documentation, or the sample ini file? According to the > docs, > > sendmail_from string > > Whi

Re: [PHP] Printing long strings

2001-02-25 Thread Miles Thompson
Clayton, Have a look at http://www.php.net/manual/en/function.addslashes.php I've not used them, there are also references to stripslashes, you may need to experiment a bit. Miles At 07:56 PM 2/25/01 -0500, Clayton Dukes wrote: >How can I get php to print a long string and ignore any of the c

Re: [PHP-CVS] cvs: php4 /ext/imap config.m4 php_imap.c php_imap.h

2001-02-25 Thread Sascha Schumann
On Sun, 25 Feb 2001, Dan Kalowsky wrote: > kalowsky Sat Feb 24 20:41:19 2001 EDT > [..] > Changes the config.m4 to support the client.h include > # This should include all the approriate headers for c-client (as defined by > # c-client maintainers) such as mail.h, and rfc822.h.

[PHP] switch statement

2001-02-25 Thread Peter Houchin
Does any one know where there are some tutorials for the switch statement? Peter Houchin Sun Rentals [EMAIL PROTECTED]

Re: [PHP] switch statement

2001-02-25 Thread Jon Rosenberg
Here is a basic example. switch ($option) { case "optiona": statements; statements; break; case "optionb": statements; break; } - Original Message - From: "Peter Houchin" <[EMAIL PROTECTED]> To: "PHP MAIL GROUP" <[EMAIL PROTECTED]> Sent: Sunday, February 25, 2001 9:03 PM Subject: [

Re: [PHP] switch statement

2001-02-25 Thread David Robley
On Mon, 26 Feb 2001 12:33, Peter Houchin wrote: > > Does any one know where there are some tutorials for the switch > statement? > Peter Houchin > Sun Rentals > [EMAIL PROTECTED] > Have a quick look at http://www.php.net/manual/en/control-structures.switch.php which has some user notes which

RE: [PHP] switch statement

2001-02-25 Thread Peter Houchin
I'm playing aruond with the switch statement trying to get one to work for $submit I have 2 forms on the one page (only one displays at a time) 1 is for creating a new record in my data base the other is for updating/changing values from the first form should there be any. So i want it to switch

[PHP] include file

2001-02-25 Thread JW
I have created a config.php3 to store the connection of the database and some constant variable. Then, I created the other file functions.php3 and inculde config.php3 into this file for function.phps3 should use some variables inside the file config.php3. However, I don't know why all the variable

Re: [PHP] switch statement

2001-02-25 Thread David Robley
On Mon, 26 Feb 2001 13:20, Peter Houchin wrote: > I'm playing aruond with the switch statement trying to get one to work > for $submit > I have 2 forms on the one page (only one displays at a time) 1 is for > creating a new record in my data base the other is for > updating/changing values from th

Re: [PHP] include file

2001-02-25 Thread David Robley
On Mon, 26 Feb 2001 13:29, JW wrote: > I have created a config.php3 to store the connection of the database > and some constant variable. Then, I created the other file > functions.php3 and inculde config.php3 into this file for > function.phps3 should use some variables inside the file config.php

[PHP] mysql_info()

2001-02-25 Thread Gustavo Vieira Goncalves Coelho Rios
Am i wrong or php does not support mysql_info() function ? Is there plans to support it? thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail:

[PHP] Logging out a user

2001-02-25 Thread Chris Aitken
Okay, I got a bit of a curley one that I havent been able to solve by looking at the archives and in the manual. Its kind of a PHP/Apache question. I have a system where a user logs in through .htaccess, it queries my mysql database, sets a cookie which logs their username and access level numb

[PHP] Regular expression problems

2001-02-25 Thread Dan Watt
Im trying to build a user login system, and when there is a new user, I need to validate that they are usign using word characters ([0-9A-Za-z_] or \w)... I have TRIED MANY different regular expressions to test this, but none work. This seems so simple but I am missing something. I need a expressi

Re: [PHP] Regular expression problems

2001-02-25 Thread Simon Garner
From: "Dan Watt" <[EMAIL PROTECTED]> > Im trying to build a user login system, and when there is a new user, I need > to validate that they are usign using word characters ([0-9A-Za-z_] or > \w)... I have TRIED MANY different regular expressions to test this, but > none work. This seems so simple

Re: [PHP] Regular expression problems

2001-02-25 Thread Dan Watt
ok, that was my problem Was using ereg... All the places I read about how to do regular expressions (book, online...) did NOT clarify that \w and such would need preg.. Thanks! ""Simon Garner"" <[EMAIL PROTECTED]> wrote in message 022d01c09fa6$a2bbd460$[EMAIL PROTECTED]">news:022d01c09fa6$a2b

Re: [PHP] Regular expression problems

2001-02-25 Thread Simon Garner
From: "Dan Watt" <[EMAIL PROTECTED]> > ok, that was my problem Was using ereg... All the places I read about > how to do regular expressions (book, online...) did NOT clarify that \w and > such would need preg.. Thanks! > No prob - yeah, \w is a Perl feature :) (preg = PCRE = Perl Compatib

RE: [PHP] Simple String Replace Question

2001-02-25 Thread Jeff Oien
> No, that doesn't make any sense whatsoever :) > > A \n *is* a new line. I can only guess you're getting confused because > there's \r's as well as \n's in the string. Try this: > > > $str = "abc\r\ndefg\r\n\r\nxyzpqr\r\njklmno"; > $str = ereg_replace("([^\r\n])\r\n([^\r\n])", "\\1 \\2",

Re: [PHP] Simple String Replace Question

2001-02-25 Thread Simon Garner
From: "Jeff Oien" <[EMAIL PROTECTED]> > Ok now I'm really being a pest. Your code works on your > example but not on mine. I can't figure out why. But I really > appreciate the help so far from Chris and Simon so thanks. > > Here is my example and what happens when I use your > code. I tried it b

[PHP] JavaScript

2001-02-25 Thread Deependra B. Tandukar
Greetings! Is there any equivalent code for (JavaScript) Back Button in php? This works as back button on the menu bar. Looking forward to hearing from you. regards, DT -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: [PHP] JavaScript

2001-02-25 Thread Robert Gormley
The problem with this (the javascript history) is it bites on frames. One thing you could do is print("Go back"); or some such. At least then you could do referer sanity checking to make sure you didn't dump the user somewhere nonsensical (if they've bookmarked something in the middle of your

Re: [PHP] JavaScript

2001-02-25 Thread Simon Garner
From: "Deependra B. Tandukar" <[EMAIL PROTECTED]> > Greetings! > > Is there any equivalent code for (JavaScript) href=JavaScript:history-back(1)>Back Button in php? > > This works as back button on the menu bar. > > Looking forward to hearing from you. > > regards, > DT > > Yes, but it works d

[PHP] PHP4 directives in httpd.conf not working

2001-02-25 Thread Brian White
I have php4 running under Apache. Under that apache I have several s. I want to set to some of the PHP.INI values under one of those hosts. So far I have tried the following values in my httpd.conf file: 1) include_path "/my/phpinc/path" 2) php_include_path "/my/phpinc/path" 3

php-general Digest 26 Feb 2001 05:00:42 -0000 Issue 534

2001-02-25 Thread php-general-digest-help
php-general Digest 26 Feb 2001 05:00:42 - Issue 534 Topics (messages 41593 through 41649): Re: Temporarily turning off magic quotes? 41593 by: Philip Olson 41596 by: Chris Adams Re: incrementing a date! 41594 by: Philip Olson Simple String Replace Question

RE: [PHP] Simple String Replace Question

2001-02-25 Thread Jeff Oien
> > > > > > > > > > $str = ereg_replace("([^\r\n])\r\n([^\r\n])", "\\1 \\2", $str); > echo $str; > ?> > > > > Got it now. I didn't didn't have tags in mine. With the tags it works as prescribed. Thanks! The other troubleshooting examples were helpful too to know what's go

Re: [PHP] PHP4 directives in httpd.conf not working

2001-02-25 Thread David Robley
On Mon, 26 Feb 2001 15:30, Brian White wrote: > I have php4 running under Apache. Under that apache I have several > s. I want to set to some of the PHP.INI values under > one of those hosts. So far I have tried the following values in > my httpd.conf file: > > 1) include_path "/my/phpin

  1   2   >