[PHP] Advantages of php
Hi, Is there somewhere on the PHP site that give a list of advantages, speed, etc in comparsion with other similar programs. I have a client that is in ASP and would like to move to PHP and need this info. Thanks Adrian -- 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] alzheimers and confused
It depends on how you exactly formulated the test // if((!strpos($yourimage, ".jpg")) or (!strpos($yourimage, ".jpeg"))) if((!strpos($yourimage, ".jpg")) and (!strpos($yourimage, ".jpeg"))) THe first is if !jpg or !jpeg while the second if statement tests for if !jpg and !jpeg another way to test this is if !(jpg or jpeg) basicly the first one doesn't work because when the filename is jpg it isn't jpeg so the code executes and when it's jpeg it isn't jpg, and again the code will execute. the two other tests will correctly test if it's either jpg or jpeg. Robert Klinkenberg -Oorspronkelijk bericht- Van: jtjohnston [mailto:[EMAIL PROTECTED]] Verzonden: Saturday, November 17, 2001 3:45 AM Aan: [EMAIL PROTECTED] Onderwerp: [PHP] alzheimers and confused OK kids, I'm not 19 ... my old brain gets tired easily and my wife is complaining that I stay up too late PHPing :) Putting the rest aside, why does AND work and not OR. OR was what I meant? I meant ... if the string doesn't contain .jpg or the string doesn't contain .jpeg ... > ERROR! John -- 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] Question on variable variables
It seems to me that the use of a temp variable may be the clearest solution, and I doubt any overhead would matter really. $a = "dog"; $tmp = "MY".$a; //$tmp = "MYdog"; So the following two would be the same: $$tmp = "Spot"; $MYdog = "Spot"; Good Luck, Jason Garber IonZoft.com At 09:47 PM 11/16/2001 -0500, Jeff Lewis wrote: >I've a question regarding variable variable I was hoping someone could >help me with: > >All the examples in the manual have the entire variable name being >variable e.g. >$a = "hello" and >$$a being the same as $hello > >What I need to do, however, is append a variable portion to a constant >prefix. So I have a set of variables that are named $MYdog, $MYcat etc. >and I need to do > >$a = "dog" >${"MY$a"} being the same as $MYdog > >Can this be done, and if so - how? I can't get it to work. > >Jeff -- 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] Advantages of php
You could check the list archives... This question flys by every week or two... -Jason Garber IonZoft.com At 01:41 PM 11/17/2001 +0530, Adrian D'Costa wrote: >Hi, > >Is there somewhere on the PHP site that give a list of advantages, speed, >etc in comparsion with other similar programs. I have a client that is in >ASP and would like to move to PHP and need this info. > >Thanks > >Adrian > > >-- >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] -- 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] Question on variable variables
Thanks Jason and Christoper for replying, here is the solution I came up with. It takes into account that there could be multiple instances of what I'm looking for on the same line - got it working late last night: while (preg_match ("//",$curline,$tags)) $curline = preg_replace("//",${$tags[1]},$curline); Jeff - Original Message - From: "Jason G." <[EMAIL PROTECTED]> To: "Jeff Lewis" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, November 17, 2001 7:02 AM Subject: Re: [PHP] Question on variable variables > It seems to me that the use of a temp variable may be the clearest > solution, and I doubt any overhead would matter really. > > $a = "dog"; > $tmp = "MY".$a; //$tmp = "MYdog"; > > So the following two would be the same: > $$tmp = "Spot"; > $MYdog = "Spot"; > > Good Luck, > > Jason Garber > IonZoft.com > > At 09:47 PM 11/16/2001 -0500, Jeff Lewis wrote: > >I've a question regarding variable variable I was hoping someone could > >help me with: > > > >All the examples in the manual have the entire variable name being > >variable e.g. > >$a = "hello" and > >$$a being the same as $hello > > > >What I need to do, however, is append a variable portion to a constant > >prefix. So I have a set of variables that are named $MYdog, $MYcat etc. > >and I need to do > > > >$a = "dog" > >${"MY$a"} being the same as $MYdog > > > >Can this be done, and if so - how? I can't get it to work. > > > >Jeff > > > -- 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]
[PHP] installing php on apache
Hi, I'm a newbie to php having been working with coldfusion for years. Recently decided to test it out and have configured a box with Red Hat Linux 7.1, kde, apache and mysql. These all seem to be running fine but I can't seem to get a php page to translate. Im assuming that the web root is var/www/html and I've placed a file called index.php under that with a simple call. However it just displays the full file rather than translating the call. What am I doing wrong? All help appreciated. TIA Doug -- 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]
[PHP] Re: installing php on apache
There are a number of things that could be wrong. It is difficult to tell without knowing any details. I am drawn to the fact that you are just assuming the web root. I don't know if you installed from RPMs or source, but if var/www/html is not set as Apache's document root when you point Konqueror at that file it is not using Apache to render it, it is just treating it as a text file to view. Check Apache's httpd.conf file to see what the document root is set to and either change it to var/www/html or move your file to the directory that it is set to. Fred Douglas McKenzie <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > I'm a newbie to php having been working with coldfusion for years. > > Recently decided to test it out and have configured a box with Red Hat > Linux 7.1, kde, apache and mysql. These all seem to be running fine but > I can't seem to get a php page to translate. > > Im assuming that the web root is var/www/html and I've placed a file > called index.php under that with a simple call. However it > just displays the full file rather than translating the call. What am I > doing wrong? > > All help appreciated. > > TIA > > Doug > -- 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]
[PHP] problem with image
when i want to put an image like this (echo "";), my php is not able to show the image? is there something wrong with my php.ini?? greetings wolf.dietrich von loeffelholz -- 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] problem with image
I would think it's an HTML problem, try: echo ""; or echo ''; Jeff - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 17, 2001 11:20 AM Subject: [PHP] problem with image > when i want to put an image like this (echo "";), my > php is not able to show the image? > > is there something wrong with my php.ini?? > > greetings > wolf.dietrich von loeffelholz > > > -- > 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] > > > -- 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] relative paths
On Sat, 17 Nov 2001, Mitja Pagon wrote: > I want to know if there is a way to include(require) a file using a path > relative to web server root. I think you'll find the $DOCUMENT_ROOT environment variable handy :) ~Chris /"\ \ / September 11, 2001 X We Are All New Yorkers -- 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]
php-general Digest 17 Nov 2001 17:29:19 -0000 Issue 1000
php-general Digest 17 Nov 2001 17:29:19 - Issue 1000 Topics (messages 74965 through 74986): wunderground and php 74965 by: Scott Atkins 74967 by: Fred Re: alzheimers and confused 74966 by: Fred 74974 by: Robert Klinkenberg ¹Î¿ø»¡¸®´åÄÄ ÀÔ´Ï´Ù 74968 by: ¹Î¿ø»¡¸®´åÄÄ Re: Question on variable variables 74969 by: Christopher William Wesley 74975 by: Jason G. 74977 by: Jeff Lewis Proven linux install for freetype 2/tiff? 74970 by: Joelmon2001.aol.com working HEADER in PHP 74971 by: mahboobeh khossrojerdi Advantages of php 74972 by: Adrian D'Costa 74976 by: Jason G. Re: [PHP-DEV] ldap_search sort extension, patch included 74973 by: Stig Venaas xslt function documentation 74978 by: Papp Gyozo 74980 by: Papp Gyozo installing php on apache 74979 by: Douglas McKenzie 74982 by: Fred Re: Apache 2.0.28 74981 by: Vincent Stoessel relative paths 74983 by: Mitja Pagon 74986 by: Christopher William Wesley problem with image 74984 by: wloeffelholz.xh9.net 74985 by: Jeff Lewis Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- I would like to use something like the weather script that came with my linux on my webserver. However, I do not know where to start with sockets and such. The actual linux script takes too long to run and output. Any help would be great Scott --- End Message --- --- Begin Message --- Try doing a Google search: http://www.google.com/search?q=weather+php+script There are plenty of PHP weather scripts already out there. Find one that does most of what you want and change it to fit your needs. Scott Atkins <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I would like to use something like the weather script that came with my > linux on my webserver. However, I do not know where to start with > sockets and such. The actual linux script takes too long to run and > output. Any help would be great > Scott > --- End Message --- --- Begin Message --- AND seems correct to me. If you want to generate an error when the file is not a jpeg file then the file name must not contain jpg AND must not contain jpeg. If either jpg OR jpeg is present then no error should occur. Be careful when using the !not operator with logical condition operators, the logic becomes more complex. Fred Jtjohnston <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > OK kids, I'm not 19 ... my old brain gets tired easily and my wife is > complaining that I stay up too late PHPing :) > Putting the rest aside, why does AND work and not OR. OR was what I > meant? > I meant ... if the string doesn't contain .jpg or the string doesn't > contain .jpeg ... > ERROR! > > John > > $errorfound = 0; > $yourimage = > "http://callisto.si.usherb.ca/~ang96m04/cgi-bin/postcards/e.jpegstrie/sap_bu cket.jpg"; > > // if((!strpos($yourimage, ".jpg")) or (!strpos($yourimage, ".jpeg"))) > if((!strpos($yourimage, ".jpg")) and (!strpos($yourimage, ".jpeg"))) > { > $errorfound++; > echo"Your image \"$yourimage\" did > not contain .jpg or .jpeg"; > }else{ > echo"Your image \"$yourimage\" contains > .jpg or .jpeg"; > } > > ?> > > --- End Message --- --- Begin Message --- It depends on how you exactly formulated the test // if((!strpos($yourimage, ".jpg")) or (!strpos($yourimage, ".jpeg"))) if((!strpos($yourimage, ".jpg")) and (!strpos($yourimage, ".jpeg"))) THe first is if !jpg or !jpeg while the second if statement tests for if !jpg and !jpeg another way to test this is if !(jpg or jpeg) basicly the first one doesn't work because when the filename is jpg it isn't jpeg so the code executes and when it's jpeg it isn't jpg, and again the code will execute. the two other tests will correctly test if it's either jpg or jpeg. Robert Klinkenberg -Oorspronkelijk bericht- Van: jtjohnston [mailto:[EMAIL PROTECTED]] Verzonden: Saturday, November 17, 2001 3:45 AM Aan: [EMAIL PROTECTED] Onderwerp: [PHP] alzheimers and confused OK kids, I'm not 19 ... my old brain gets tired easily and my wife is complaining that I stay up too late PHPing :) Putting the rest aside, why does AND work and not OR. OR was what I meant? I meant ... if the string doesn't contain .jpg or the string doesn't contain .jpeg ... > ERROR! John --- End Message --- --- Begin Message --- http://minwon82.com php-general´Ô ¾È³çÇϽʴϱî? ¹Î¿ø»¡¸®´åÄÄ ¿¡¼ ÀÎ»ç µå¸³´Ï´Ù. À̰÷¿¡¼´Â µî±âºÎµîº», ÅäÁö´ëÀå, Á¹¾÷Áõ¸í¼, ¼ºÀûÁõ¸í¼, °æ·ÂÁõ¸í¼, µî °¢Á¾ ¹Î¿ø 34Á¾À» ¹Ù»Ú½Å Çö´ëÀεéÀ» ´ë½ÅÇÏ¿© ¹ß±Þ´ëÇà ¼ºñ½º Çϰí ÀÖ½À´Ï´Ù. ½ÅûÀ» ÇϽøé ÀÔ±Ý È®ÀÎÈÄ
Re: [PHP] Multiviews and GET requests no longer working?
On Fri, 2001-11-16 at 17:49, James Green wrote: > If I call foo?id=1, not only is the id variable not set, > _SERVER[QUERY_STRING] isn't either. Cookies and session variables work > fine, it's just variables passed via GET. If I turn off Multiviews, the > variables come through fine, but it means calling foo.php. Solved. There's a bug in Apache-1.3.22 which causes this. I'm downgrading to 1.3.20 now. jg -- 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] Multiviews and GET requests no longer working?
On Fri, 2001-11-16 at 17:49, James Green wrote: > If I call foo?id=1, not only is the id variable not set, > _SERVER[QUERY_STRING] isn't either. Cookies and session variables work > fine, it's just variables passed via GET. If I turn off Multiviews, the > variables come through fine, but it means calling foo.php. Solved. There's a bug in Apache-1.3.22 which causes this. I'm downgrading to 1.3.20 now. jg -- 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]
[PHP] Transfer variable to next web-page
I just started.. How do you transfer a variable from one web-page to another I try to use a form like this: text for button "); ?> and catch it injoin2.phpby: $phpVariableName=htmlVariableName; echo"$phpVariableName"; This do not work. Can anyone tel me what should be done Neither books, php-manual nor HTML-specification does tel me. Olav -- 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] Transfer variable to next web-page
Use $phpVariableName = $htmlVariableName; Remember to use the $ in front of the variable that you toss from the HTML form. At 10:00 AM 11/17/2001, Olav Drageset wrote: >I just started.. > >How do you transfer a variable from one web-page to another >I try to use a form like this: >echo(" > >text for button > > > >"); >?> > >and catch it injoin2.phpby: > >$phpVariableName=htmlVariableName; > >echo"$phpVariableName"; > >This do not work. >Can anyone tel me what should be done >Neither books, php-manual nor HTML-specification does tel me. > >Olav > > > > >-- >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] Sliante, Richard S. Crawford http://www.mossroot.com mailto:[EMAIL PROTECTED] AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford "It is only with the heart that we see rightly; what is essential is invisible to the eye." --Antoine de Saint Exupéry "Push the button, Max!" -- 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]
[PHP] free online PHP books ?
hi, Does anyone know where the Online Free PHP Books are ? I cannot buy a book with Amazon.com in my country. There're a lot of free tutorials on the net, but they 're not enough for me to understand PHP clearly. Please let me know the URLs like that thanks so much... (I love PHP) -- 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]
[PHP] How to get mysql-result into a php variable
This is perhaps elementary, but I cannot find solution in the documentation I want to transfer to a php variable wheter I find a matching firstname in a group from mysql db function lookupFirstname ($fname, $gr, $conection) { $sql = "SELECT firstname AS matches "; $sql .= "FROM persons "; $sql .= "WHERE firstname = '$fname' AND group='$gr';"; if (!$sql_result = mysql_query($sql,$connection) ) {echo "query: "; echo mysql_error(); } $store = mysql_store_result($conn); $result = mysql_num_rows($store); IF ($result > 0) {return 'match' ;} ELSE {return 'nomatch';} } I get error message that funcion mysql_stor_result() is not defined How shall I use thees two funcions? Thank you Olav -- 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]
[PHP] Difference of queries in PHP/mySQL?
I am wondering if there are any difference between using PHP and using the command line for mySQL. Entering this at the comman line returns all the membergroups properly. When I use this in my PHP program, it doesn't continue past this line: $request = mysql_query("SELECT membergroup FROM membergroups WHERE 1 ORDER BY ID_GROUP"); Jeff -- 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]
[PHP] Re: alzheimers and confused
de Morgan and Boole, not Alzheimer nor Confusius !(A OR B) = (!A) AND (!B) -- 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] Difference of queries in PHP/mySQL?
are you actually doing anything with $request? that just gets a mysql result back in a variable, you then have to extract the data from it... Jeff Lewis wrote: > I am wondering if there are any difference between using PHP and using the > command line for mySQL. Entering this at the comman line returns all the > membergroups properly. When I use this in my PHP program, it doesn't > continue past this line: > > $request = mysql_query("SELECT membergroup FROM membergroups WHERE 1 ORDER > BY ID_GROUP"); > > Jeff > > -- > 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] -- 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]
[PHP] words in a string
hey .. i want php to do an IF, when he founds a special word in a string (ex: text_-_write_-_text ) .. i m not able to manage it .. thnx for helping in foward greetings wolf.dietrich von loeffelholz -- 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] Form's : making me sick!
Thats sounds right becasuse anything between ... can only will be passeed only to one script. Steve On Tue, 13 Nov 2001, George Pitcher wrote: > I don't think that you can nest forms. > > George > > - Original Message - > From: "De Necker Henri" <[EMAIL PROTECTED]> > To: "PHP-General (E-mail)" <[EMAIL PROTECTED]> > Sent: Tuesday, November 13, 2001 1:09 PM > Subject: [PHP] Form's : making me sick! > > > > I just want to know how to make a inside a get to respond or > > dont make any browser errors? > > > > It looks someting like this : > > > > > > > > > > > >//This must > > change the next values ! > > > > > > > > //this values must be cahnge > > > > > > > > Everthing is working fine but i just cant get the two forms to work > > together.If i only can get some ideas on what action,or onchange values to > > change it will be greatfull! > > > > > > -- > > 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] > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > 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] > > Thank you, Steve Maroney -- 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]
[PHP] Re: free online PHP books ?
You may not be able to get an entire free book, but Amazon has lots of sample chapters from several PHP books here http://www.amazon.com/exec/obidos/search-handle-form/103-3308426-8753433 Trongduc <[EMAIL PROTECTED]> wrote in message 004d01c16f94$3ddcd490$190b10ac@d">news:004d01c16f94$3ddcd490$190b10ac@d... > hi, > Does anyone know where the Online Free PHP Books are ? > I cannot buy a book with Amazon.com in my country. > There're a lot of free tutorials on the net, but they 're not enough for me > to understand PHP clearly. > Please let me know the URLs like that > > thanks so much... > (I love PHP) > -- 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] Transfer variable to next web-page
Richard already answered the variable part, but I thought I'd point out that you need to use double quotes in your HTML tags... Single quotes are incorrect... text for button "); ?> Or... text for button "); ?> Or... Better yet, why not just: text for button See the PHP manual for escaping HTML and string literals if you're confused by any of this.. http://www.php.net/manual/en/language.basic-syntax.php#language.basic-sy ntax.phpmode http://www.php.net/manual/en/language.types.string.php -Original Message- From: Olav Drageset [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 17, 2001 1:01 PM To: [EMAIL PROTECTED] Subject: [PHP] Transfer variable to next web-page I just started.. How do you transfer a variable from one web-page to another I try to use a form like this: text for button "); ?> and catch it injoin2.phpby: $phpVariableName=htmlVariableName; echo"$phpVariableName"; This do not work. Can anyone tel me what should be done Neither books, php-manual nor HTML-specification does tel me. Olav -- 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] -- 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] Re: alzheimers and confused
I was waiting for someone to meantion de Morgan! 10 points for Mr. Elab. Ha ha... -Original Message- From: jimmy elab [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 17, 2001 1:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: alzheimers and confused de Morgan and Boole, not Alzheimer nor Confusius !(A OR B) = (!A) AND (!B) -- 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] -- 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]
[PHP] Re: How to get mysql-result into a php variable
I'm not sure where you found the function mysql_store_result, but it is not a built-in PHP function and that is why you are getting an error. If you just want to return Match if one or more rows in the group match the first name use something like this: function LookupFirstname ($FName, $Group, $Conn) { $SQL = "SELECT ."; $Result = mysql_query($SQL,$Conn) or die (mysql_error()); if (mysql_num_rows($Result) > 0) { $Match = "Match"; } else {$Match = "NoMatch";} return $Match; } Olav Drageset <[EMAIL PROTECTED]> wrote in message 1104_1006021222@alfa">news:1104_1006021222@alfa... > This is perhaps elementary, but I cannot find solution in the documentation > > I want to transfer to a php variable wheter I find a matching firstname in a group from mysql db > > function lookupFirstname ($fname, $gr, $conection) > { $sql = "SELECT firstname AS matches "; > $sql .= "FROM persons "; > $sql .= "WHERE firstname = '$fname' AND group='$gr';"; > > if (!$sql_result = mysql_query($sql,$connection) ) > {echo "query: "; echo mysql_error(); } > > $store = mysql_store_result($conn); > $result = mysql_num_rows($store); > > IF ($result > 0) {return 'match' ;} ELSE {return 'nomatch';} > } > > I get error message that funcion mysql_stor_result() is not defined > How shall I use thees two funcions? > > Thank you > Olav > -- 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]
[PHP] Re: alzheimers and confused
Brilliant. For those of us unfamiliar with the laws of de Morgan: http://www.unc.edu/~rowlett/Math81/notes/DeMorgan.html Fred Jimmy Elab <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > de Morgan and Boole, not Alzheimer nor Confusius > > !(A OR B) = (!A) AND (!B) -- 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] words in a string
> i want php to do an IF, when he founds a special word in a string (ex: > text_-_write_-_text ) .. i m not able to manage it .. Could you use this example? Regards, Johan -- 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] words in a string
if (ereg('special word', $string)) { echo 'Found'; } else { echo 'Not Found'; } -- Julio Nobrega No matter where you go, &this. <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hey .. > > i want php to do an IF, when he founds a special word in a string (ex: > text_-_write_-_text ) .. i m not able to manage it .. > > thnx for helping in foward > > greetings > > wolf.dietrich von loeffelholz > -- 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]
[PHP] Converting dates?
I am storing a birthdate in my database as a Unix timestamp but when I display it I want to calculate the different between that date and todays date and display the persons age. How can I do that with PHP? I also want to know if it is currently their birthday. So trying to set $isbday to yes if todays month and day are the same as their birthdate in the database. Jeff -- 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] Converting dates?
search the archives there are tons of messages dealing with date manipulation. basically take the timestamps find the difference in seconds, convert to days, etc jack -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 17, 2001 3:17 PM To: PHP is not a drug. Subject: [PHP] Converting dates? I am storing a birthdate in my database as a Unix timestamp but when I display it I want to calculate the different between that date and todays date and display the persons age. How can I do that with PHP? I also want to know if it is currently their birthday. So trying to set $isbday to yes if todays month and day are the same as their birthdate in the database. Jeff -- 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] -- 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] Converting dates?
Yes thanks for that, I already have this but am having a brain cramp on how to obtain years. function datediff($now, $old) { / $DIS = $now - $old; // Diff In Secs $secs = $DIS % 60; // modulo $DIS -= $secs; $days = floor($DIS / (24*60*60)); $DIS -= $days * (24*60*60); $hours = floor($DIS / (60*60)); $DIS -= $hours * (60*60); $mins = floor($DIS / 60); $DIS -= $mins * 60; $diffstr= "$days Days, $hours Hours, $mins Minutes, $secs Seconds"; return $days; } - Original Message - From: "Jack Dempsey" <[EMAIL PROTECTED]> To: "Jeff Lewis" <[EMAIL PROTECTED]>; "PHP is not a drug." <[EMAIL PROTECTED]> Sent: Saturday, November 17, 2001 3:30 PM Subject: RE: [PHP] Converting dates? > search the archives there are tons of messages dealing with date > manipulation. > basically take the timestamps find the difference in seconds, convert to > days, etc > > jack > > -Original Message- > From: Jeff Lewis [mailto:[EMAIL PROTECTED]] > Sent: Saturday, November 17, 2001 3:17 PM > To: PHP is not a drug. > Subject: [PHP] Converting dates? > > > I am storing a birthdate in my database as a Unix timestamp but when I > display it I want to calculate the different between that date and todays > date and display the persons age. > > How can I do that with PHP? > > I also want to know if it is currently their birthday. So trying to set > $isbday to yes if todays month and day are the same as their birthdate in > the database. > > Jeff > > > -- > 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] > > > > -- 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]
[PHP] comma-formatting numbers
i'm new to php and am having difficulty translating this tiny awk function that i use to comma format numbers. can someone assist? my stumbling block thus far have been the fact the the php regex matching functions don't return the byte offset within the haystack and the regex replace functions don't support the awk and perl-like ampersand "&" in the replacement pattern. please help and thanks. function commas(num) { while (num ~ /[0-9][0-9][0-9][0-9]/) sub (/[0-9][0-9][0-9]$|[0-9][0-9][0-9][,]/, ",&", num) return num } -- 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] comma-formatting numbers
You can do this using the number_format function or probably sprintf. /Paul On Saturday, November 17, 2001, at 01:36 PM, Scott Dudley wrote: > > i'm new to php and am having difficulty translating this tiny awk > function that i use to comma format numbers. can someone assist? my > stumbling block thus far have been the fact the the php regex matching > functions don't return the byte offset within the haystack and the regex > replace functions don't support the awk and perl-like ampersand "&" in > the replacement pattern. please help and thanks. > > function commas(num) { > while (num ~ /[0-9][0-9][0-9][0-9]/) > sub (/[0-9][0-9][0-9]$|[0-9][0-9][0-9][,]/, ",&", num) > > return num > } > > > -- > 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] > -- 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]
[PHP] Standalone PHP Application
Hello Everyone ! I'm looking for information on using PHP for standalone applications. Specifically, I need to create a PHP-based application that can be runned from a CD-ROM. Have any of you done this? Any suggestions? On another note: I need to develop a CD-ROM based Survey, where the result will be saved in an external file. What software, would you recommend, to use for this? I'm currently using Multimedia Builder, and was wondering if there is something better. I need something that allows customization(via scripting) and more interaction with external files/commands. Any help would be appreciated. Thanks! -John __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___+- -- 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]
[PHP] PHP Backing up a Database?
Hi, Say I'm not really confident in the prowess of my server, and I want to download my database onto my computer. Can that be done? What can I look (FTP access) in the directory structure. I guess, where is it usually located? Thanks. Cosmin Laslau _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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]
[PHP] Setting up PHP and ODBC on Linux
Hello, as you may remember, some day ago, I asked how to develop on linux PHP pages accessing Mysql via ODBC (The reasons why I *have* to cope with this exact sub optimal set up are in the original message, no reason to repeat them here). I have installed all the UnixODBC rpms I could find ( I have RH 7.1); the iodbc packages on the openlinksw were not accessible. Now I have the following packages installed: [root@ari mweb] rpm -qa|egrep -i 'php|odbc|sql' php-4.0.4pl1-9 php-manual-4.0.4pl1-9 mysql-server-3.23.36-1 MyODBC-2.50.39-1 unixODBC-devel-2.0.7-1 asp2php-0.75.11-1 mysql-3.23.36-1 mysql-devel-3.23.36-1 php-mysql-4.0.4pl1-9 unixODBC-2.0.7-1 unixODBC-generic-2.0.7-1 mysqlclient9-3.23.22-4 unixODBC-mysql-2.0.7-1 However, I currently have PHP set up as pasted below (from phpinfo): that means I have to recompile it from scratch, doesn't it? If so, with which options? Is it enough to change --without-mysql to --with-mysql and add --with-odbc? Also, is it safer/worst/irrelevant/mandatory to erase the php rpm package before building it again from source? TIA, mweb './configure' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--enable-pic' '--enable-shared' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib' '--with-db2' '--with-db3' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp' '--enable-wddx' '--without-mysql' '--without-oracle' '--without-oci8' '--with-xml' -- If you have the right attitude, interesting problems will find you Eric S. Raymond, "The Cathedral and the bazaar", chapter 2 -- 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] PHP Backing up a Database?
mysqldump check it out, either man or google then ftp that file down, load it wherever, and mysql database < dump.sql jack -Original Message- From: cosmin laslau [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 17, 2001 5:25 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP Backing up a Database? Hi, Say I'm not really confident in the prowess of my server, and I want to download my database onto my computer. Can that be done? What can I look (FTP access) in the directory structure. I guess, where is it usually located? Thanks. Cosmin Laslau _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] -- 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] Apache 2.0.28
Hello, I tried compiling apache 2.0.28 w/ php 4.0.6. Here's how I did it: Install apache: ./configure --prefix=/usr/local/apache2 --enable-module=so make make install Install PHP: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-xml --disable-debug --enable-track-vars make PHP fails on the make command. Here's the error message: make[3]: Entering directory `/root/packages/devel/php-4.0.6/sapi/apache' /bin/sh /root/packages/devel/php-4.0.6/libtool --silent --mode=compile cc -I. -I/root/packages/devel/php-4.0.6/sapi/apache -I/root/packages/devel/ php-4.0.6/main -I/root/packages/devel/php-4.0.6 -I/usr/local/apache2/include -I/root/packages/devel/php-4.0.6/Zend -I/root/packages/devel/php-4.0.6/ext/ mysql/libmysql -I/root/packages/devel/php-4.0.6/ext/xml/expat/xmltok -I/root /packages/devel/php-4.0.6/ext/xml/expat/xmlparse -I/root/packages/devel/php- 4.0.6/TSRM -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -c sapi_apache.c sapi_apache.c: In function `apache_php_module_main': sapi_apache.c:80: `NOT_FOUND' undeclared (first use in this function) sapi_apache.c:80: (Each undeclared identifier is reported only once sapi_apache.c:80: for each function it appears in.) make[3]: *** [sapi_apache.lo] Error 1 make[3]: Leaving directory `/root/packages/devel/php-4.0.6/sapi/apache' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/root/packages/devel/php-4.0.6/sapi/apache' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/packages/devel/php-4.0.6/sapi' make: *** [all-recursive] Error 1 Know how to fix/why that happens? Thanks, Tyler Longren - Original Message - From: "Vincent Stoessel" <[EMAIL PROTECTED]> To: "Jobarr" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, November 17, 2001 9:51 AM Subject: Re: [PHP] Apache 2.0.28 > The current php will work with apache 2.x > use:--with-apxs2 > when you configure php > > Jobarr wrote: > > > I need a build of PHP that can be used as a module with Apache 2.0.28 beta. > > Anyone know where I could find one? > > > > thanks > > -Jobarr > > > > > > > > > > > -- > Vincent Stoessel [EMAIL PROTECTED] > Java Linux Apache Mysql Php (JLAMP) Engineer > (301) 362-1750 Mobile (410) 419-8588 > AIM, MSN: xaymaca2020 , Yahoo Messenger: vks_jamaica > > > -- > 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] > > -- 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]
[PHP] Mortgage Leads Available!
Are you a Mortgage Office in need of leads? We receive refinance requests direct from borrowers throughout the United States daily! Whether your office services one state or multiple states, our leads will meet your needs! A few features of our program: *Leads are exclusive---sold ONLY to you! *Leads contain 30 pieces of information regarding each borrower! *Leads delivered within 24-48 hours from borrower's original request! *Leads are sent daily--depending on your needs! *And best of allpricing to meet your marketing budget! Dont forget to ask about our volume discount! TO ORDER YOUR LEADS, CALL (888) 725-9246! ** To be removed from this mailing please mail [EMAIL PROTECTED] with remove in the subject line. Thank you ** -- 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] Advantages of php
See http://php.weblogs.com/php_vs_asp and http://php.weblogs.com/php_asp_7_reasons The articles need to be updated for Microsoft.Net though. Jason G. <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You could check the list archives... This question flys by every week or > two... > > -Jason Garber > IonZoft.com > > At 01:41 PM 11/17/2001 +0530, Adrian D'Costa wrote: > >Hi, > > > >Is there somewhere on the PHP site that give a list of advantages, speed, > >etc in comparsion with other similar programs. I have a client that is in > >ASP and would like to move to PHP and need this info. > > > >Thanks > > > >Adrian > > > > > >-- > >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] > -- 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]
[PHP] What's wrong with this date ?
hi there, I try to save a record (in the "date" type in MySQL) from the by : $query = "INSERT INTO $table VALUES ($post_id, 0, '$topic', '$uname', '$body', $date, '$newdate', 0) "; But it couldn't work (I used $date or '$date' on above, but they got the same results) ! It showed me the wrong value, as : 1970-0-0 (always this, although I try to input different values in the text box with the date format is -MM-DD) I don't understand the way MySQL saves my date field in his data (is it -MM-DD ?) Can anyone help me in this case ? Thanks much... ps : I used the $date field in "varchar(20) type" instead. BWT, what's different beween the Varchar(length) type with the Char(length) type ? -- 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]
php-general Digest 18 Nov 2001 06:02:16 -0000 Issue 1001
php-general Digest 18 Nov 2001 06:02:16 - Issue 1001 Topics (messages 74987 through 75023): Re: relative paths 74987 by: Gaylen Fraley Re: Multiviews and GET requests no longer working? 74988 by: James Green 74989 by: James Green Transfer variable to next web-page 74990 by: Olav Drageset 74991 by: Richard S. Crawford 75000 by: Matthew Loff free online PHP books ? 74992 by: trongduc 74999 by: Fred How to get mysql-result into a php variable 74993 by: Olav Drageset 75002 by: Fred Difference of queries in PHP/mySQL? 74994 by: Jeff Lewis 74996 by: Jack Dempsey Re: alzheimers and confused 74995 by: jimmy elab 75001 by: Matthew Loff 75003 by: Fred words in a string 74997 by: wloeffelholz.xh9.net 75004 by: Johan Holst Nielsen 75005 by: Julio Nobrega Trabalhando Re: Form's : making me sick! 74998 by: Steve Maroney Converting dates? 75006 by: Jeff Lewis 75007 by: Jack Dempsey 75008 by: Jeff Lewis Re: Apache 2.0.28 75009 by: Jobarr 75017 by: Tyler Longren comma-formatting numbers 75010 by: Scott Dudley 75011 by: Paul Wolstenholme Standalone PHP Application 75012 by: John Monfort Re: [PHP-DEV] ldap_search sort extension, patch included 75013 by: Andre Oppermann PHP Backing up a Database? 75014 by: cosmin laslau 75016 by: Jack Dempsey Setting up PHP and ODBC on Linux 75015 by: mweb Re: Question on variable variables 75018 by: Papp Gyozo 75019 by: Papp Gyozo Re: working HEADER in PHP 75020 by: Papp Gyozo Mortgage Leads Available! 75021 by: masscash2002.yahoo.com Re: Advantages of php 75022 by: John Lim What's wrong with this date ? 75023 by: trongduc Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- You've answered your own question. If document-root is set to /usr/web/htdocs then require("/somefile") will expect to find "somefile" in document-root. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.22 Guestbook http://www.gaylenandmargie.com/phpwebsite "Mitja Pagon" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi! > > I want to know if there is a way to include(require) a file using a path > relative to web server root. > > I'm aware of the fact that you can specify include path, but I believe that > this is not the best solution, since applications written that way aren't > easily portable. > > What I'm looking for is something similar to what "/" does in HTML paths and > SSI include directives. > > Thanks, > > Mitja Pagon > > --- End Message --- --- Begin Message --- On Fri, 2001-11-16 at 17:49, James Green wrote: > If I call foo?id=1, not only is the id variable not set, > _SERVER[QUERY_STRING] isn't either. Cookies and session variables work > fine, it's just variables passed via GET. If I turn off Multiviews, the > variables come through fine, but it means calling foo.php. Solved. There's a bug in Apache-1.3.22 which causes this. I'm downgrading to 1.3.20 now. jg --- End Message --- --- Begin Message --- On Fri, 2001-11-16 at 17:49, James Green wrote: > If I call foo?id=1, not only is the id variable not set, > _SERVER[QUERY_STRING] isn't either. Cookies and session variables work > fine, it's just variables passed via GET. If I turn off Multiviews, the > variables come through fine, but it means calling foo.php. Solved. There's a bug in Apache-1.3.22 which causes this. I'm downgrading to 1.3.20 now. jg --- End Message --- --- Begin Message --- I just started.. How do you transfer a variable from one web-page to another I try to use a form like this: text for button "); ?> and catch it injoin2.phpby: $phpVariableName=htmlVariableName; echo"$phpVariableName"; This do not work. Can anyone tel me what should be done Neither books, php-manual nor HTML-specification does tel me. Olav --- End Message --- --- Begin Message --- Use $phpVariableName = $htmlVariableName; Remember to use the $ in front of the variable that you toss from the HTML form. At 10:00 AM 11/17/2001, Olav Drageset wrote: >I just started.. > >How do you transfer a variable from one web-page to another >I try to use a form like this: >echo(" > >text for button > > > >"); >?> > >and catch it injoin2.phpby: > >$phpVariableName=htmlVariableName; > >echo"$phpVariableName"; > >This do not work. >Can anyone tel me what should be done >Neither books, php-manual nor HTML-specification does tel me. > >Olav > > > > >-- >PHP General Mailing List (http://www.php.net/) >To
RE: [PHP] What's wrong with this date ?
Well it should be '$date', Also.. If the column type is date and you are entering it for a form, check to make sure you are typing it in ok and you trim() the variable if It still doest work... do a before the mysql_query() and see exactly what its inserting... -Original Message- From: trongduc [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 17, 2001 8:17 PM To: [EMAIL PROTECTED] Subject: [PHP] What's wrong with this date ? hi there, I try to save a record (in the "date" type in MySQL) from the by : $query = "INSERT INTO $table VALUES ($post_id, 0, '$topic', '$uname', '$body', $date, '$newdate', 0) "; But it couldn't work (I used $date or '$date' on above, but they got the same results) ! It showed me the wrong value, as : 1970-0-0 (always this, although I try to input different values in the text box with the date format is -MM-DD) I don't understand the way MySQL saves my date field in his data (is it -MM-DD ?) Can anyone help me in this case ? Thanks much... ps : I used the $date field in "varchar(20) type" instead. BWT, what's different beween the Varchar(length) type with the Char(length) type ? -- 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] -- 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]
[PHP] Changing var value from int to string
Is there any inherit danger or taboos against changing the value of a variable from an integer to a string? example: if ($Msg==1) $Msg = "You have foobar'ed your entire server."; Thanks. -- 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]
[PHP] Re: What's wrong with this date ?
Do yourself a favor and read the mysql manual. It explicitly answers your questions and many more you are likely to have. Furthermore, there is a searchable manual online at mysql.com that makes it rather easy to find answers about mysql. To get you started, here is a link to a description of all of the column types includeing date, varchar and char. Good Luck Fred Trongduc <[EMAIL PROTECTED]> wrote in message 000201c16ff6$ff36e470$1b0b10ac@d">news:000201c16ff6$ff36e470$1b0b10ac@d... > hi there, > I try to save a record (in the "date" type in MySQL) from the type=text> by : > > $query = "INSERT INTO $table VALUES ($post_id, 0, '$topic', '$uname', > '$body', $date, '$newdate', 0) "; > > But it couldn't work (I used $date or '$date' on above, but they got the > same results) ! > > It showed me the wrong value, as : 1970-0-0 (always this, although I try to > input different values in the text box with the date format is -MM-DD) > I don't understand the way MySQL saves my date field in his data (is it > -MM-DD ?) > > Can anyone help me in this case ? > Thanks much... > > ps : I used the $date field in "varchar(20) type" instead. BWT, what's > different beween the Varchar(length) type with the Char(length) type ? > -- 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]
[PHP] xslt function documentation
Hi, I'd like to know if someone out there knows a good tutorial or some simple examples about how to use xslt functions. The manual says the xslt ext is in experimental phase and so the documentation lacks of even good examples or description of the function arguments. I've already read Sablotron's documentation, but some help will be appriciated, especially for xslt_transform(). Papp Gyozo - [EMAIL PROTECTED]
Re: [PHP] xslt function documentation
OK, I found some hints in the annotated manual. BTW, I'm looking for hearing any comments on this ... - Original Message - From: "Papp Gyozo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 17, 2001 11:19 AM Subject: [PHP] xslt function documentation > Hi, > > I'd like to know if someone out there knows a good tutorial or > some simple examples about how to use xslt functions. > > The manual says the xslt ext is in experimental phase and so > the documentation lacks of even good examples or description > of the function arguments. > > I've already read Sablotron's documentation, but some help > will be appriciated, especially for xslt_transform(). > > Papp Gyozo > - [EMAIL PROTECTED] > >
Re: [PHP] Question on variable variables
have you tried /e modifier? preg_replace("//e",'${$1}', $curline); it's just a tip. - Original Message - From: "Jeff Lewis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 17, 2001 2:25 PM Subject: Re: [PHP] Question on variable variables > Thanks Jason and Christoper for replying, here is the solution I came up > with. It takes into account that there could be multiple instances of what > I'm looking for on the same line - got it working late last night: > > while (preg_match ("//",$curline,$tags)) >$curline = preg_replace("//",${$tags[1]},$curline); > > Jeff > - Original Message - > From: "Jason G." <[EMAIL PROTECTED]> > To: "Jeff Lewis" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Saturday, November 17, 2001 7:02 AM > Subject: Re: [PHP] Question on variable variables > > > > It seems to me that the use of a temp variable may be the clearest > > solution, and I doubt any overhead would matter really. > > > > $a = "dog"; > > $tmp = "MY".$a; //$tmp = "MYdog"; > > > > So the following two would be the same: > > $$tmp = "Spot"; > > $MYdog = "Spot"; > > > > Good Luck, > > > > Jason Garber > > IonZoft.com > > > > At 09:47 PM 11/16/2001 -0500, Jeff Lewis wrote: > > >I've a question regarding variable variable I was hoping someone could > > >help me with: > > > > > >All the examples in the manual have the entire variable name being > > >variable e.g. > > >$a = "hello" and > > >$$a being the same as $hello > > > > > >What I need to do, however, is append a variable portion to a constant > > >prefix. So I have a set of variables that are named $MYdog, $MYcat etc. > > >and I need to do > > > > > >$a = "dog" > > >${"MY$a"} being the same as $MYdog > > > > > >Can this be done, and if so - how? I can't get it to work. > > > > > >Jeff > > > > > > > > > -- > 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] Question on variable variables
Oops... > have you tried /e modifier? > > preg_replace("//e",'${$1}', $curline); preg_replace("//e",'${$1}', $curline); > > it's just a tip. > > > - Original Message - > From: "Jeff Lewis" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, November 17, 2001 2:25 PM > Subject: Re: [PHP] Question on variable variables > > > > Thanks Jason and Christoper for replying, here is the solution I came up > > with. It takes into account that there could be multiple instances of what > > I'm looking for on the same line - got it working late last night: > > > > while (preg_match ("//",$curline,$tags)) > >$curline = preg_replace("//",${$tags[1]},$curline); > > > > Jeff > > - Original Message - > > From: "Jason G." <[EMAIL PROTECTED]> > > To: "Jeff Lewis" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Saturday, November 17, 2001 7:02 AM > > Subject: Re: [PHP] Question on variable variables > > > > > > > It seems to me that the use of a temp variable may be the clearest > > > solution, and I doubt any overhead would matter really. > > > > > > $a = "dog"; > > > $tmp = "MY".$a; //$tmp = "MYdog"; > > > > > > So the following two would be the same: > > > $$tmp = "Spot"; > > > $MYdog = "Spot"; > > > > > > Good Luck, > > > > > > Jason Garber > > > IonZoft.com > > > > > > At 09:47 PM 11/16/2001 -0500, Jeff Lewis wrote: > > > >I've a question regarding variable variable I was hoping someone could > > > >help me with: > > > > > > > >All the examples in the manual have the entire variable name being > > > >variable e.g. > > > >$a = "hello" and > > > >$$a being the same as $hello > > > > > > > >What I need to do, however, is append a variable portion to a constant > > > >prefix. So I have a set of variables that are named $MYdog, $MYcat etc. > > > >and I need to do > > > > > > > >$a = "dog" > > > >${"MY$a"} being the same as $MYdog > > > > > > > >Can this be done, and if so - how? I can't get it to work. > > > > > > > >Jeff > > > > > > > > > > > > > > > -- > > 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] working HEADER in PHP
> Hi, > > I used > header("content-type:text/html;charset='windows-1256'"); > and header("content-language:'fa'"); I suggest to try "Content-Type" "Content-Language" with initial capitals rather than all lowercase and simply fa, without qoutes. header("Content-Type: text/html; charset=windows-1256"); header("Content-Language: fa"); > for showing my Farsi messages, in PHP, on browser > but these could not work. > > Please help me! > Thanks. > > > __ > Do You Yahoo!? > Find the one for you at Yahoo! Personals > http://personals.yahoo.com > > -- > 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] Apache 2.0.28
The current php will work with apache 2.x use:--with-apxs2 when you configure php Jobarr wrote: > I need a build of PHP that can be used as a module with Apache 2.0.28 beta. > Anyone know where I could find one? > > thanks > -Jobarr > > > > -- Vincent Stoessel [EMAIL PROTECTED] Java Linux Apache Mysql Php (JLAMP) Engineer (301) 362-1750 Mobile (410) 419-8588 AIM, MSN: xaymaca2020 , Yahoo Messenger: vks_jamaica -- 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]
[PHP] relative paths
Hi! I want to know if there is a way to include(require) a file using a path relative to web server root. I'm aware of the fact that you can specify include path, but I believe that this is not the best solution, since applications written that way aren't easily portable. What I'm looking for is something similar to what "/" does in HTML paths and SSI include directives. Thanks, Mitja Pagon -- 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]
[PHP] Re: relative paths
You've answered your own question. If document-root is set to /usr/web/htdocs then require("/somefile") will expect to find "somefile" in document-root. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.22 Guestbook http://www.gaylenandmargie.com/phpwebsite "Mitja Pagon" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi! > > I want to know if there is a way to include(require) a file using a path > relative to web server root. > > I'm aware of the fact that you can specify include path, but I believe that > this is not the best solution, since applications written that way aren't > easily portable. > > What I'm looking for is something similar to what "/" does in HTML paths and > SSI include directives. > > Thanks, > > Mitja Pagon > > -- 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] Apache 2.0.28
I read something saying that the API changed from 2.026 to 2.0.28 and when I tried using a Apache2 php module, it said it was not compatible with this version of Apache. -Jobarr "Vincent Stoessel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > The current php will work with apache 2.x > use:--with-apxs2 > when you configure php -- 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]