php-general Digest 9 Jan 2003 23:44:09 -0000 Issue 1813 Topics (messages 130923 through 131015):
Re: Adding HTTP URL Code 130923 by: Sean Burlington 130931 by: Robert Fisher Can you insert into $_POST manually? 130924 by: Noel Wade 130927 by: Scott Houseman 130928 by: Noel Wade 130935 by: Philippe Saladin 130943 by: Marek Kilimajer 131001 by: Chris Shiflett 131011 by: Noel Wade Re: session not set, server configuration? 130925 by: Noel Wade Unable to load dynamic library ... php_gd.dll 130926 by: Even Thorbergsen Re: how to make server response to emails 130929 by: See kok Boon 130961 by: Michael Sims Re: PHP 4.3.0 with Oracle 130930 by: Thies C. Arntzen 130963 by: José Manuel Valente 130966 by: José Manuel Valente Re: Databases vs. File Access 130932 by: David Eisenhart grgrgrgr other problem with location?????? 130933 by: Ysrael Guzmán 130941 by: Marek Kilimajer session problem 130934 by: Supra how to passing two dimension array 130936 by: Rizki Salamun 130940 by: Marek Kilimajer 130945 by: Rizki Salamun 130949 by: Marek Kilimajer I have a problem while installing... 130937 by: Terry Lau 130944 by: Marek Kilimajer Re: graph libs 130938 by: Marek Kilimajer Re: Double entry into MySQL.. 130939 by: Marek Kilimajer Re: PHP / GnuPG problem with Fopen 130942 by: Clint Fern i want to send 2 variables???? 130946 by: Ysrael Guzmán 130947 by: Joshua Pierre 130952 by: rw.xend.net calculate the traffic size with php(like the apache access_log) 130948 by: Torsten Rosenberger 130950 by: Marek Kilimajer Having / not posted to MySQL Database 130951 by: Vernon 130955 by: Adam Voigt Informing a User of an Illegal Character in a post 130953 by: Vernon problem with forms and sessions 130954 by: scott forms and sessions ? 130956 by: scott 130973 by: Munir php and asp 130957 by: Jerry M. Howell II 130959 by: Adam Voigt 130960 by: Clint Tredway 131005 by: Khalid El-Kary Re: XML File does not reflect changes upon reopen - HELP 130958 by: Marek Kilimajer undefined variable notice - how to furn of 130962 by: Borut Kovacec 130975 by: Joseph W. Goff 131002 by: Gurvinder Singh flash and php (using the varibles) 130964 by: - \[ Paul Ferrie \] - 130968 by: Philipp Hartmann Reading Registry 130965 by: Christopher Ditty 130967 by: Kansu Dinçer Re: undefined variable notice - how to furn of[Scanned] 130969 by: Michael Egan Re: apache and php 130970 by: Gareth Thomas newbee 130971 by: Hendrik van Niekerk 130976 by: Joseph W. Goff 130980 by: Hendrik van Niekerk 130992 by: Joseph W. Goff 131009 by: Hendrik van Niekerk mail submission... from flash 130972 by: travis 130981 by: Jason Wong 130982 by: travis 131007 by: travis Newbee observation 130974 by: Hendrik van Niekerk 130977 by: Tom Ray 130979 by: Larry Brown Interesting timeout issue 130978 by: Ben Vaughn 131004 by: Ben Vaughn another 4.3.0 issue? 130983 by: john Dynamic menu from DB 130984 by: Cesar Aracena 130991 by: Marek Kilimajer checkboxes, radio buttons and $_POST['<name>'] 130985 by: John-Erik Omland 130986 by: Tim Ward 130988 by: Marek Kilimajer Sessions and Frames... 130987 by: Dale Schell Re: fletcher's checksum 130989 by: Ford, Mike [LSS] 131006 by: Dave Gervais Re: float precision 130990 by: Ford, Mike [LSS] Re: [PHP-DEV] Terminal text objects (PHP CDK NCURSES) 130993 by: Dave Mertens Re: ftp_put: permission denied 130994 by: Oliver Witt building web album - design questions 130995 by: Anders Thoresson 130997 by: bbonkosk.tampabay.rr.com 130998 by: Rick Emery 131000 by: Kevin Stone 131003 by: Chris Wesley Re: session_destroy problem 130996 by: Ken Nagorski "re-throw" from custom error handler? error patterns? 130999 by: kellan PHP/Oracle Command line Segmentation Fault 131008 by: Christopher Ditty Auto Include a Function 131010 by: Brian T. Allen php stored in mysql 131012 by: Paul Roberts 131015 by: Paul Roberts Re: unlink ($files); 131013 by: Brian T. Allen php, and svg problem 131014 by: Gil Perez 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 ---ELLIOTT,KATHERINE A (HP-FtCollins,ex1) wrote:if you want to get a replyOK, so I've gotten NO responses to my query below so I thought I'd ask for something slightly different and see what I get.
1) look in the manual/ archives first
2) use a helpful subject line
eg making links clickable
3) show us the code
you have tried to get it working - and this code will help greatly in explaining what you are trying to do
4) show us the error message OR show us the output
and explain what is wrong with it
remember - you aren't paying for this - there are hundreds of messages a day - personally I only skim read most of them - and if a question makes little sense I'm not going to spend time on it.
that said
<?php
$text = "This is a test. It is only a test.
What happens when I include a URL in my results text?
http://not.a.real.url/programs
This is only a test";
$clickable_text = preg_replace("#(http://[^\s]+)#i",
"<a href=\"$1\">$1</a>", $text);
echo $clickable_text;
?>
I haven't been particularly strict with the allowed url charecters - I've just allowed everything and assumed that the url ends with whitespace (or end of file)
Sean
If I have a bunch of plain text data, how can I pull out the strings containing "http". I've tried several different things but what I end up with is more or less than what I want. Once I have this, I can add the URL code and replace the string but I haven't figured out how to do this. For example, what would I do if my text looks like this (not including the astrices): ****************************************************** This is a test. It is only a test. What happens when I include a URL in my results text? http://not.a.real.url/programs This is only a test ****************************************************** Anyone? Anyone? Thanks, Katherine -----Original Message----- From: ELLIOTT,KATHERINE A (HP-FtCollins,ex1) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 2:36 PM To: [EMAIL PROTECTED] Subject: [PHP] Adding HTTP URL Code Hello, I have a string of data that can be anywhere from one line (a single URL) to many, many lines. The data is in plain text but, as I alluded, may contain one or more URLs (or none). I then take this data and put it on a web page so I would like to make any URLs in the data live. Has anyone on the list done this? If so, can you tell me how? I'm stumped. Thanks, Katherine--- End Message ---
--- Begin Message ---I found this in the archives of this list message title: php parsing problem with chat message number: 103717 by: Deadsam // // URL PARSER FOR MESSAGE $msg = ereg_replace ("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]]", "<font color=\"#FFFF00\"><u><a href=\"\\0\"target=\"_blank\">\\0</a></u></font>", $msg); //$msg = ereg_replace("\[url\]([^\[]+)\[/url\]", "<font color=\"#FFFF00\"><u><a href=\"\\1\"target=\"_blank\">\\1</a></u></font>", $msg); Might load the file in, do line by line search for this pattern if it passes then save it or do what you want. PSEUDO CODE Get File; Foreach file_line { if contains URL { do action; } } Close File; Robert Fisher Axis Solutions, Inc. __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com--- End Message ---
--- Begin Message ---Hi all, So I have a page that processes information and then "echo"s out a redirect that looks like this: <META HTTP-EQUIV="REFRESH" CONTENT="4; URL=<? echo $url ?>;"> The thing is, there are some variables that I would love to pass in $_POST or $HTTP_POST_VARS to the page referred to in "$url". Is there any way to stuff this data into either of these globals so that the "$url" page can access 'em? Thanks a bunch! --Noel--- End Message ---
--- Begin Message ---Hi. If you add them to the $url variable as in a query string, they should be available in that page's $_GET array e.g. if $url = "http://myhost.com/mypage.php?id=$id&page=$page&user=$user" then you would have the values $_GET{'id'} $_GET{'page'} $_GET{'user'} created for you with the values as given. Cheers Scott On 2003/01/09 02:04, Noel Wade wrote:Hi all, So I have a page that processes information and then "echo"s out a redirect that looks like this: <META HTTP-EQUIV="REFRESH" CONTENT="4; URL=<? echo $url ?>;"> The thing is, there are some variables that I would love to pass in $_POST or $HTTP_POST_VARS to the page referred to in "$url". Is there any way to stuff this data into either of these globals so that the "$url" page can access 'em? Thanks a bunch! --Noel-- Scott Houseman Senior Software Developer Junk Mail Publishing (Pty) Ltd T + 27 12 342 3840 ext 2806 F +27 12 342 3876 E [EMAIL PROTECTED] | www.junkmail.co.za A 1312 Pretorius Street, Hatfield, Pretoria P O Box 6574, Pretoria, 0001, South Africa +27 82 491 8021--- End Message ---
--- Begin Message ---Thanks - I understand that method; but I'm really looking for a way to pass them without them being visible / mucking up the URL line with a buncha stuff... Take care, --Noel--- End Message ---
--- Begin Message ---"Noel Wade" <[EMAIL PROTECTED]> a écrit dans le message news: [EMAIL PROTECTED] > Thanks - I understand that method; but I'm really looking for a way to pass > them without them being visible / mucking up the URL line with a buncha > stuff... (Note that even with a post, the data aren't really hidden : they are in the http content.) >So I have a page that processes information and then "echo"s out a redirect >that looks like this: ><META HTTP-EQUIV="REFRESH" CONTENT="4; URL=<? echo $url ?>;"> If you can't call your page with a "real" post (a form submitted), it would be possible to simulate it with this function (from Rasmus Lerdorf, AFAIK) : function PostToHost($host, $path, $data_to_send) { $fp = fsockopen($host,80); fputs($fp, "POST $path HTTP/1.1\n"); fputs($fp, "Host: $host\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\n"); fputs($fp, "Content-length: ".strlen($data_to_send)."\n"); fputs($fp, "Connection: close\n\n"); fputs($fp, $data_to_send); while(!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } with $data_to_send = "formfield1=myfieldvalue1&formfield2=myfieldvalue2"; Otherwise, easier, couldn't you use sessions ? you would hide your $url into $_SESSION['url'] Regards, Philippe--- End Message ---
--- Begin Message --- You can also build a form with hidden variables and use
<body onload="document.formname.submit()"> to submit it. For javascript disabled browser put a
"Continue" submit button
Noel Wade wrote:
Thanks - I understand that method; but I'm really looking for a way to pass
them without them being visible / mucking up the URL line with a buncha
stuff...
Take care,
--Noel
--- End Message ---
--- Begin Message ------ Noel Wade <[EMAIL PROTECTED]> wrote: > Thanks - I understand that method; but I'm really > looking for a way to pass them without them being > visible / mucking up the URL line with a buncha > stuff... Noel, To answer your original question, no, you cannot force the remote Web client to submit a POST. If you think about it, this is a good thing. You can, as another person pointed out, manually perform a POST from a PHP script, so that the user can GET your PHP script, initiating a POST. However, the POST request is sent from your Web server, not the Web client. There are ways to "hide" URL variables without resorting to POST. As an example, some people use frames (not my preference). Of course, those who use frames to maintain a simple and clean URL do not (or rather, should not) rely on this for any sort of security. The real URL can be easily discovered. Another idea would be to create a portal of sorts, where you have a PHP script that fetches a verbose URL for you. For example, you could have a PHP script located at http://example.org/search.php that contains the following: <base href="http://www.google.com/"> <? readfile("http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&q=PHP&btnG=Google+Search"); ?> Thus, a user who visits http://example.org/search.php would see the results of a Google search for PHP (Note: This is just a hypothetical example, and I am not sure whether this would violate Google's terms of use). For this method to be useful to you, you must know the URL variables in advance, so you might need something more dynamic. Some people will redirect the user after setting some session variables, so that the "final destination" URL is very plain, but the Web client can still use GET to send the data. Hopefully this will give you some ideas, so that you can find a method that works for you. Chris--- End Message ---
--- Begin Message ---This will work perfectly! Actually, building a dynamic javascript function and/or hidden form will allow me to collapse a couple of other redirect systems on my site into one... Thanks a bunch! --Noel "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You can also build a form with hidden variables and use > <body onload="document.formname.submit()"> to submit it. For javascript > disabled browser put a > "Continue" submit button--- End Message ---
--- Begin Message ---James - Don't know how you're working with Cookies and sessions for sure, but the default / "easy" way to check for an established session is to put "session_start();" at the top of every page that's going to access the session variables. That will check for an established/open session and make the registered session variables accessible to the page. Then a logical check is as simple as using "session_is_registered()" like this: if (session_is_registered("registered_variable_name")) //do something here if the person has already registered their session else //session not registered! Hope this helps! Take care, --Noel--- End Message ---
--- Begin Message ---I have moved an old web to a new server (Windows-2000) with fresh versions of php (4.3.0) and GD. I get the error message "Unable to load dynamic library .../php_gd.dll. The specified procedure could not be found. This looks like a false setting of the extension_dir path in php.ini but this is correct. I have also put a copy of php_gd.dll on the c:/php directory where php.exe is located, but this does not help. I have tried to limit the number of Image* routines involved by trying the simple php script given below, but the same error message keeps popping up. Can someone give me a suggestion here? Even Thorbergsen Interconsult, Norway <?php Header ("Content-type: image/png"); $a = array( "0" => "40", // x1 "1" => "50", // y1 "2" => "20", // x2 "3" => "240", // y2 "4" => "60", // x3 "5" => "60", // y3 "6" => "240", // x4 "7" => "20", // y4 "8" => "50", // x5 "9" => "40", // y5 "10" => "10", // x6 "11" => "10", // y6 ); $im = ImageCreate (250, 250); $white = ImageColorAllocate ($im, 255, 255, 255); $blue = ImageColorAllocate ($im, 0, 0, 255); ImageFilledPolygon ($im, $a, 6, $blue ); ImagePng ($im); ImageDestroy ($im); ?>--- End Message ---
--- Begin Message ---To: Jean -Christian Imbeault Thanks for helping out... I actually do not want a mailing list right now, I already have one. What I need is to use the same concept for some other email driven tasks. After some searching using "process email" I realize I can use PHP to get the emails and parse its contents much like a webmail system. I am not sure, but I think I need and imap extension installed. From another script, the programmer attempt to include the php_imap file, which I am not sure what is it too... Does anyone by any chance know whether imap is a must for retrieval of emails or is it just like you say, extract files from the mail/username folder? Thanks in advance. -----Original Message----- From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] Sent: 09 January 2003 06:01 To: [EMAIL PROTECTED] Subject: [PHP] Re: how to make server response to emails I'm not sure how it's done exactly but I think the basic concept is to have a daemon running, or have your program run by cron, and have the program collect it's mail. On Linux I think you can get your mail simply by fetching and parsing the file /var/spool/mail/"username", where username is the name of the account unsubscribe requests are mailed to. But you want a mailing list, use major domo or some other ML spftware instead of writing your own. Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---On Thu, 9 Jan 2003 17:33:02 +0800, you wrote: >I believe >that there is a way to make the mail server, or which ever it is, to >response specifically to text within the mail. [...] >However, I have no idea how this is accomplished and what this system is >called, so I need some precious help here. Anyone please? 99% of the time scripts such as this operate in the following manner. Lets say the script responds to emails sent to [EMAIL PROTECTED] The server which handles mail for example.com has an alias for the address "foo" which actually points to an external script. Most MTA's will allow you to do this (yes, even some for Windows, believe it or not). For example, in sendmail you could place a line in /etc/aliases or /etc/mail/aliases (depending on your installation) like the following: foo: "|/usr/local/bin/myscript.php -s" This would cause sendmail to send the text of any email sent to "foo" to myscript.php's stdin via a pipe. (Be aware that some sites with sendmail use the sendmail restricted shell, so there are some extra steps involved in getting an alias like the above to work, which I won't go into here). "myscript.php" would need to be a PHP CLI script, meaning that it's chmod'ed executable and has: #!/usr/local/bin/php at the top or something similar. Then this script would have to read from stdin and parse the text it receives via regexes or some other method to determine how to handle it. The script would receive the full message, including all headers. In PHP you can read from stdin by opening a filehandle to it: $stdin = fopen('php://stdin', 'r'); Although in PHP 4.3.0 there are CLI specific constants defined which obseletes the above. For more info: http://www.php.net/manual/en/features.commandline.php I've implementing a script like this before, but unfortunately it's written in Perl. Many of the concepts are similar, though, so if you know any Perl at all and think it may help you I can send it to you off-list. HTH...--- End Message ---
--- Begin Message ---On Wed, Jan 08, 2003 at 04:38:25PM -0200, José Manuel Valente wrote: > Hy Guys, > > I´m a newby here. > > I´am trying to compile PHP 4.3.0 with Oracle support. When it > compiles oci8.c , it returns an error, like follows: > > /bin/sh libtool --silent --mode=compile > gcc -Iext/oci8/ -I/usr/src/php-4.3.0/ext/oci8/ -DPHP_ATOM_INC -I/usr/src/ph > p-4.3.0/include -I/usr/src/php-4.3.0/main -I/usr/src/php-4.3.0 -I/usr/src/ph > p-4.3.0/Zend -I/usr/include/imap -I/opt/oracle/product/8.1.5/rdbms/demo -I/o > pt/oracle/product/8.1.5/network/public -I/opt/oracle/product/8.1.5/plsql/pub > lic -I/usr/src/php-4.3.0/ext/xml/expat -DLINUX=22 -DMOD_SSL=208111 -DUSE_HS > REGEX -DEAPI -DUSE_EXPAT -I/usr/src/php-4.3.0/TSRM -g -O2 -prefer-pic -c > /usr/src/php-4.3.0/ext/oci8/oci8.c -o ext/oci8/oci8.lo > /usr/src/php-4.3.0/ext/oci8/oci8.c: In function `zif_ocierror': > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: `OCI_ATTR_STATEMENT' undeclared > (first use in this function) > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: (Each undeclared identifier is > reported only once > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: for each function it appears in.) > make: *** [ext/oci8/oci8.lo] Error 1 > > > With PHP 4.2.3 and belower, it worked fine. > Anyone has any ideas? just add #undef HAVE_OCI8_ATTR_STATEMENT in line 4329 of oci8.c and recompile re, tc PS: what version of oracle are you using?--- End Message ---
--- Begin Message ---In that server, i am running 8.1.5. Thanks for the help. i am going to try it right away. really thanks! :) Bye, Jose Manuel Valente ----- Original Message ----- From: "Thies C. Arntzen" <[EMAIL PROTECTED]> To: "José Manuel Valente" <[EMAIL PROTECTED]> Cc: "PHP" <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 10:34 AM Subject: Re: [PHP] PHP 4.3.0 with Oracle > On Wed, Jan 08, 2003 at 04:38:25PM -0200, José Manuel Valente wrote: > > Hy Guys, > > > > I´m a newby here. > > > > I´am trying to compile PHP 4.3.0 with Oracle support. When it > > compiles oci8.c , it returns an error, like follows: > > > > /bin/sh libtool --silent --mode=compile > > gcc -Iext/oci8/ -I/usr/src/php-4.3.0/ext/oci8/ -DPHP_ATOM_INC -I/usr/src/ph > > p-4.3.0/include -I/usr/src/php-4.3.0/main -I/usr/src/php-4.3.0 -I/usr/src/ph > > p-4.3.0/Zend -I/usr/include/imap -I/opt/oracle/product/8.1.5/rdbms/demo -I/o > > pt/oracle/product/8.1.5/network/public -I/opt/oracle/product/8.1.5/plsql/pub > > lic -I/usr/src/php-4.3.0/ext/xml/expat -DLINUX=22 -DMOD_SSL=208111 -DUSE_HS > > REGEX -DEAPI -DUSE_EXPAT -I/usr/src/php-4.3.0/TSRM -g -O2 -prefer-pic -c > > /usr/src/php-4.3.0/ext/oci8/oci8.c -o ext/oci8/oci8.lo > > /usr/src/php-4.3.0/ext/oci8/oci8.c: In function `zif_ocierror': > > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: `OCI_ATTR_STATEMENT' undeclared > > (first use in this function) > > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: (Each undeclared identifier is > > reported only once > > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: for each function it appears in.) > > make: *** [ext/oci8/oci8.lo] Error 1 > > > > > > With PHP 4.2.3 and belower, it worked fine. > > Anyone has any ideas? > > just add > #undef HAVE_OCI8_ATTR_STATEMENT > > in line 4329 of oci8.c and recompile > > re, > tc > > PS: what version of oracle are you using? >--- End Message ---
--- Begin Message ---Id didn´t work out. The same error message :( > On Wed, Jan 08, 2003 at 04:38:25PM -0200, José Manuel Valente wrote: > > Hy Guys, > > > > I´m a newby here. > > > > I´am trying to compile PHP 4.3.0 with Oracle support. When it > > compiles oci8.c , it returns an error, like follows: > > > > /bin/sh libtool --silent --mode=compile > > gcc -Iext/oci8/ -I/usr/src/php-4.3.0/ext/oci8/ -DPHP_ATOM_INC -I/usr/src/ph > > p-4.3.0/include -I/usr/src/php-4.3.0/main -I/usr/src/php-4.3.0 -I/usr/src/ph > > p-4.3.0/Zend -I/usr/include/imap -I/opt/oracle/product/8.1.5/rdbms/demo -I/o > > pt/oracle/product/8.1.5/network/public -I/opt/oracle/product/8.1.5/plsql/pub > > lic -I/usr/src/php-4.3.0/ext/xml/expat -DLINUX=22 -DMOD_SSL=208111 -DUSE_HS > > REGEX -DEAPI -DUSE_EXPAT -I/usr/src/php-4.3.0/TSRM -g -O2 -prefer-pic -c > > /usr/src/php-4.3.0/ext/oci8/oci8.c -o ext/oci8/oci8.lo > > /usr/src/php-4.3.0/ext/oci8/oci8.c: In function `zif_ocierror': > > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: `OCI_ATTR_STATEMENT' undeclared > > (first use in this function) > > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: (Each undeclared identifier is > > reported only once > > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: for each function it appears in.) > > make: *** [ext/oci8/oci8.lo] Error 1 > > > > > > With PHP 4.2.3 and belower, it worked fine. > > Anyone has any ideas? > > just add > #undef HAVE_OCI8_ATTR_STATEMENT > > in line 4329 of oci8.c and recompile > > re, > tc > > PS: what version of oracle are you using? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---to add another cent to Timothy's contribution ....I agree, check out Smarty (http://smarty.php.net/) for the templating. D "Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message 000801c2b7ab$837eefa0$0500a8c0@bambino">news:000801c2b7ab$837eefa0$0500a8c0@bambino... > My 2 cents would be use a database and templates then create cached > static versions of > the pages on the first request and then when you need to changes things > it is just a > simple change the template and you a whole new look without the issue of > performance. > > Make that 5 cents worth!! >--- End Message ---
--- Begin Message ---I want to send two variables: this is correct??? location.href="page.php?<?php echo SID . "&var1=$variable1"; "&var2=$variable2"; ?>" other form <a herf="page.php?<?php echo SID . "&var1=$variable1"; "&var2=$variable2"; ?>"> Ysrael Guzmán Meza--- End Message ---
--- Begin Message --- should be . instead of ;
location.href="page.php?<?php echo SID . "&var1=$variable1" . //here
"&var2=$variable2"; ?>"
Ysrael Guzmán wrote:
I want to send two variables:
this is correct???
location.href="page.php?<?php echo SID . "&var1=$variable1";
"&var2=$variable2"; ?>"
other form
<a herf="page.php?<?php echo SID . "&var1=$variable1";
"&var2=$variable2"; ?>">
Ysrael Guzmán Meza
--- End Message ---
--- Begin Message ---Hi, I got serious problem I need to solve a.s.a.p. Well, I've developed a database application with PHP and MySql, I used sessions. While developing I used my own computer as a web server - Windows 2000 Pro, IIS 5, PHP 4.2.3 via ISAPI. And all my code was tested successfully while my computer is the server and the client. Now after moving the sources to the server (Windows 2000 Advanced Server) and exporting the MySql database to the server, the application fail. While debugging I got to a firm conclusion that the sessions doesn't work well. I copied the php.ini to the system root on the server and it still doesn't work. Please advice me what to do in order to make the application work on the server. Thanks I advance, Supra--- End Message ---
--- Begin Message ---hi there.. I have a problem when I want to passing two dimension varible. I made this variable from html form. like this: <FORM method=post action="page2.php"> <? print "<SELECT name=\"vari[$i][$j]\">"; ?> <OPTION value="A">a <OPTION value="B">b ....... ....... </SELECT> </FORM> but when again I want to print the $vari[$i][$j, in the page2.php it seems doesnt recognize this variable. thanks -rizki---- End Message ---
--- Begin Message --- if $i=1 and $j=2, you should be able to get $_POST['vari'][1][2] in page2.php
Rizki Salamun wrote:
hi there..
I have a problem when I want to passing two dimension varible. I made this
variable from html form.
like this:
<FORM method=post action="page2.php">
<?
print "<SELECT name=\"vari[$i][$j]\">";
?> <OPTION value="A">a
<OPTION value="B">b
.......
.......
</SELECT>
</FORM>
but when again I want to print the $vari[$i][$j, in the page2.php it
seems doesnt recognize this variable.
thanks
-rizki-
--- End Message ---
--- Begin Message ---On Thu, 9 Jan 2003, Marek Kilimajer wrote: > if $i=1 and $j=2, you should be able to get $_POST['vari'][1][2] in > page2.php > I have tried with set the variable $vari[1][2]="TRY" in page1.php and send it by hidden field. and in page2.php I put script: echo $_POST['vari'][1][2]; but still not working. any sugestion? thanks -rizki---- End Message ---
--- Begin Message ---try print_r($_POST); in page2.php Rizki Salamun wrote:On Thu, 9 Jan 2003, Marek Kilimajer wrote:
if $i=1 and $j=2, you should be able to get $_POST['vari'][1][2] in page2.phpI have tried with set the variable $vari[1][2]="TRY" in page1.php and
send it by hidden field.
and in page2.php I put script:
echo $_POST['vari'][1][2];
but still not working. any sugestion?
thanks
-rizki-
--- End Message ---
--- Begin Message --- Hello,
I'm using Red Hat Linux 8.0. The Apache Server 2.0 and php 4.2.2 are installed when I install Linux. The server is installed in /var/. So, I don't know how to follow the installation instructions described in your web to set up php. Do I need to install apache and php again? Furthermore, I don't know what i need to edit the php.ini file and I have modified the httpd.conf file. Thus, could you feel free to describe the detailed instruction for me? Thanks for your help!
Terry
_________________________________________________________________
¨Ï¥Î MSN Messenger¡A»PªB¤Í¦b½u¤W²á¤Ñ: http://messenger.microsoft.com/tc
--- End Message ---
--- Begin Message ---You likely not need to do anything, just start writing php, e.g. create file /var/www/html/phpinfo.php and write <?php phpinfo(); ?> Now you should be able to access it from your browser using http://localhost/phpinfo.php If apache server is not running, run /etc/init.d/httpd start as root Terry Lau wrote: > Hello, > > I'm using Red Hat Linux 8.0. The Apache Server 2.0 and php 4.2.2 are > installed when I install Linux. The server is installed in /var/. So, > I don't know how to follow the installation instructions described in > your web to set up php. Do I need to install apache and php again? > Furthermore, I don't know what i need to edit the php.ini file and I > have modified the httpd.conf file. Thus, could you feel free to > describe the detailed instruction for me? Thanks for your help! > > Terry > > > _________________________________________________________________ > ¨Ï¥Î MSN Messenger¡A»PªB¤Í¦b½u¤W²á¤Ñ: http://messenger.microsoft.com/tc >--- End Message ---
--- Begin Message --- I used older version (1.5.3, latest at that time), there were no special requirements and was also GPL
Larry Brown wrote:
My extreme apologies to jpgraphs. They are more in line with phplot. I
might even end up using them instead. Vagarant is the more difficult
package. Again, their graph examples are pretty smooth but required a lot
of package/dependency updates to RH.
This is by no means an advertisement, just one of the results I got lookingaround for charts. The following link lists a few viable
solutions.
http://www.hotscripts.com/PHP/Scripts_and_Programs/Graphs_and_Charts/
Jpgraph renders an excellent image from the examples but the prerequisitepackages were many and ultimately the install/readme didn't work
>for compiling the package. I could have looked further and found a
solution, but with the number of prerequisites I dropped it looking for a
>faster install. The next one I came across that gave a reasonable looking
chart was phplot which only requires GD which is stock on my RH
>distro. I got it up and working without any installation (not to mention
dependencies). So I am up and running quickly and smoothly with
>phplot. It's a shame jpgraphs' dependencies aren't packaged with the
distro. The transparent option on the colors is really smooth and I
just >don't have the time. Thanks to all for suggestions, I still want to
look at one other site that was recommended here on the list.
Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388
--- End Message ---
--- Begin Message --- $_SERVER['REQUEST_METHOD'] contains the method used to retrieve the page (POST, GET etc, see rfc2616). HEAD method is used to retrieve info about a resource, but I'm not sure why, as Timothy stated, it does not always work.
Altug Sahin wrote:
Is this a php.ini or apache setting?
"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
You should be able to get around it also by checking
if $_SERVER[REQUEST_METHOD]=='HEAD'
Timothy Hitchens (HiTCHO) wrote:
--- End Message ---
--- Begin Message ---Hi, Many apologies if this has been covered before - but I haven't tracked it down in the archive and it's been annoying me for weeks. I'm using a script to send an order number & encrypted cc number by GnuPG. Unfortunately the temporary files don't seem to be created causing error messages. Can anyone point me in the right direction - many thanks. Script lines are; $message = 'Order #' . $insert_id . "\n\n" . 'Number: ' . $GLOBALS['cc_toencrypt'] . "\n\n"; // I've tried this variable putenv ("GNUPGHOME=/home/www/.gnupg"); // I've tried this variable putenv ("GNUPGHOME=/home/.gnupg"); //set the environment variable for GPGPATH putenv ("GNUPGHOME=/usr/local/psa/home/ahosts/ppppp.com/home/.gnupg"); //generate token for unique filenames $tmpToken = md5(uniqid(rand())); //create vars to hold paths and filenames $plainTxt = "/usr/local/psa/home/ahosts/ppppp.com/httpsdocs/tmp/" . "$tmpToken" . "data"; $crypted = "/usr/local/psa/home/ahosts/ppppp.com/httpsdocs/tmp/" . "$tmpToken" . "gpgdata"; //open file and dump in plaintext contents $fp = fopen($plainTxt, "w+"); fputs($fp, $message); fclose($fp); //invoke GPG to encrypt file contents system("/usr/local/php_safe/bin --encrypt -ao $crypted -r 'Ralph Brookes <[EMAIL PROTECTED]>' $plainTxt"); //open file and read encrypted contents into var 251 $fd = fopen($crypted, "a+"); 252 $mail_cont = fread($fd, filesize($crypted)); 253 fclose($fd); //delete files! unlink($plainTxt); 255 Unlink($crypted); tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, 'Extra Order Info', $mail_cont, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, ''); Error messages are; Warning: fopen("/usr/local/psa/home/ahosts/ppppp.com/httpsdocs/tmp/21fc09f4a3e129b04ae38984613ece46pgpdata", "r+") - No such file or directory in /usr/local/psa/home/ahosts/ppppp.com/httpsdocs/catalog2/catalog/includes/modules/payment/ccgpg.php on line 251 Warning: stat failed for /usr/local/psa/home/ahosts/ppppp.com/httpsdocs/tmp/21fc09f4a3e129b04ae38984613ece46pgpdata (errno=2 - No such file or directory) in /usr/local/psa/home/ahosts/ppppp.com/httpsdocs/catalog2/catalog/includes/modules/payment/ccgpg.php on line 252 Warning: fread(): supplied argument is not a valid File-Handle resource in /usr/local/psa/home/ahosts/ppppp.com/httpsdocs/catalog2/catalog/includes/modules/payment/ccgpg.php on line 252 Warning: fclose(): supplied argument is not a valid File-Handle resource in /usr/local/psa/home/ahosts/ppppp.com/httpsdocs/catalog2/catalog/includes/modules/payment/ccgpg.php on line 253 Warning: unlink() failed (No such file or directory) in /usr/local/psa/home/ahosts/ppppp.com/httpsdocs/catalog2/catalog/includes/modules/payment/ccgpg.php on line 255 Cheers Clint --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.438 / Virus Database: 246 - Release Date: 07/01/03--- End Message ---
--- Begin Message ---i like send two variables using: href="mi page.php?<?" please one idea Ysrael Guzmán Meza--- End Message ---
--- Begin Message ---On Thu, Jan 09, 2003 at 09:14:21AM -0500, Ysrael Guzm?n wrote: > > i like send two variables using: > > href="mi page.php?<?" > http://blah.com/page.php?var1=contents&var2=contents That should do it for you. Cheers, Josh--- End Message ---
--- Begin Message ---Quoting Ysrael Guzmán <[EMAIL PROTECTED]>: ### ### i like send two variables using: ### ### href="mi page.php?<?" ### ### please one idea ### ### Ysrael Guzmán Meza ### ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ### Here's one idea! <a href="mi_page.php?arg1=<?print $arg1var;?>&arg2=<? print $arg2var;?>">--- End Message ---
--- Begin Message ---Hello Is it possible to get the transfer (traffic) size from a webpage as is stands in the apache access_log file 127.0.0.1 - - [07/Jan/2003:13:01:58 +0100] "GET /~torsten/cups/pdf.php HTTP/1.1" 200 48 (size) When i work with outbut buffer i only get the html source size with ob_get_length.If there are images in the side this method faild ob_get_length ignores the images. I can get the size if i parse the apache log file but there is no way to assign it to a customers homepage because i use a CMS. Maybe there are other ways. BR/Torsten Rosenberger--- End Message ---
--- Begin Message ---Requests for images bypass php, so you need get it from apache log. Torsten Rosenberger wrote:Hello
Is it possible to get the transfer (traffic) size from a webpage
as is stands in the apache access_log file
127.0.0.1 - - [07/Jan/2003:13:01:58 +0100] "GET /~torsten/cups/pdf.php
HTTP/1.1" 200 48 (size)
When i work with outbut buffer i only get the html source size with
ob_get_length.If there are images in the side this method faild
ob_get_length ignores the images.
I can get the size if i parse the apache log file but there is no way to assign it to a customers homepage because i use a CMS.
Maybe there are other ways.
BR/Torsten Rosenberger
--- End Message ---
--- Begin Message ---When posting to a MySQL database field database record slashes are being added to the data where there is an apostrophe. How do I either, not have the apostrophe posted without the slash or have it not displayed when it is being retrieved? Thanks V--- End Message ---
--- Begin Message --- Turn off magic quotes in the php.ini to not have them go in, and you will most
likely get a bunch of error's, or pass what you select from the database through
the stripslashes function like:
$query = mysql_query("SELECT field FROM table;");
$array = mysql_fetch_array($query);
$array[field] = stripslashes($array[field]);
On Thu, 2003-01-09 at 09:41, Vernon wrote:When posting to a MySQL database field database record slashes are being
added to the data where there is an apostrophe. How do I either, not have
the apostrophe posted without the slash or have it not displayed when it is
being retrieved?
Thanks
V
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc--- End Message ---
signature.asc
Description: This is a digitally signed message part
--- Begin Message ---I'm having trouble when a user post a message to a MySQL database where if a user create a user name like 'user&user' as the & symbol is used in URLs. Does anyone have any idea how I can inform user that they have entered and illegal character and are there are illegal characters that I should let them use other than '&' and '?' Thanks V--- End Message ---
--- Begin Message ---hi I'm having problems submitting forms while using sessions :o( I'm using--- End Message ---
--- Begin Message ---hi I'm having some problems submitting forms while using sessions :o( I have a form, that will only display if the session vars exist and are not null or empty. I'm using this is the form handler--- End Message ---
--- Begin Message ---Scott wrote:hi I'm having some problems submitting forms while using sessions :o( I have a form, that will only display if the session vars exist and are not null or empty. I'm using this is the form handlerWrite some more information so that we know what u want ok :)--- End Message ---
--- Begin Message ---Hello all I seem to recall php being able to provide some suport for asp. How would I turn this feature on? is it a line in the php.ini or is it a compile time option? -- Jerry M. Howell II--- End Message ---
--- Begin Message --- No idea what your talking about, PHP can't parse ASP code and vice versa.
On Mon, 2003-01-06 at 20:34, Jerry M. Howell II wrote:Hello all I seem to recall php being able to provide some suport for
asp. How would I turn this feature on? is it a line in the php.ini or is
it a compile time option?
--
Jerry M. Howell II
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc--- End Message ---
signature.asc
Description: This is a digitally signed message part
--- Begin Message ---The only thing PHP can do that's related to asp, is use the <% like asp does. This is not recommended though.. Clint ----- Original Message ----- From: "Jerry M. Howell II" <[EMAIL PROTECTED]> To: "PHP Mailing List" <[EMAIL PROTECTED]> Sent: Monday, January 06, 2003 7:34 PM Subject: [PHP] php and asp > Hello all I seem to recall php being able to provide some suport for > asp. How would I turn this feature on? is it a line in the php.ini or is > it a compile time option? > > -- > Jerry M. Howell II > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >--- End Message ---
--- Begin Message --- Maybe you mean that PHP can use COM on windows platforms and load .NET modules
http://www.php.net/manual/en/ref.com.php (com)
http://www.php.net/manual/en/ref.dotnet.php (.NET)
Regards,
Khalid
Hello all I seem to recall php being able to provide some suport for asp. How would I turn this feature on? is it a line in the php.ini or is it a compile time option? -- Jerry M. Howell II -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE* http://join.msn.com/?page=features/virus
--- End Message ---
--- Begin Message --- There might be couple of problems:
- your php script should read from the cgi script until EOF, so it continues after the other script finishes
- your cgi script should fflush the file before closing, and then close the connection
- use clearstatcache() before opening the file if the php script accesses the file before
Phil Powell wrote:
I am making changes to an XML file (and the only way I can, unless anyone knows how in PHP I can write TO an XML file!!! is to use a TCL CGI script to write to the XML file), once changes have been made I need to reopen the file and read its contents, however, every time I do I am getting OLD file information and NOT my changes, every single time, unless I refresh my page...
Does anyone know what I can do about this? I can't redirect them, that would be horribly inefficient.. what can I do?
Thanx
Phil
--- End Message ---
--- Begin Message ---Hi I just installed new php 4.2.3 on Win XP, Apache 1.3.24.. Everything works fine, just now I'm getting "Notice" messages for every undefined variable or undefined index in arrays.. So now I have to use issset() everytime to avoid this messages... ..is there any way to turn this messages off, because if prior versions I never got them..?? Borut--- End Message ---
--- Begin Message ---In the php.ini file set error reporting to E_ALL & ~E_NOTICE ----- Original Message ----- From: "Borut Kovacec" <[EMAIL PROTECTED]> To: "PHP Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 9:57 AM Subject: [PHP] undefined variable notice - how to furn of Hi I just installed new php 4.2.3 on Win XP, Apache 1.3.24.. Everything works fine, just now I'm getting "Notice" messages for every undefined variable or undefined index in arrays.. So now I have to use issset() everytime to avoid this messages... ..is there any way to turn this messages off, because if prior versions I never got them..?? Borut--- End Message ---
--- Begin Message ---or give error_reporting(0); in the start of the file "Joseph W. Goff" <[EMAIL PROTECTED]> wrote in message 002601c2b803$26a67110$bdcaa8c0@jg42000">news:002601c2b803$26a67110$bdcaa8c0@jg42000... > In the php.ini file set error reporting to E_ALL & ~E_NOTICE > > ----- Original Message ----- > From: "Borut Kovacec" <[EMAIL PROTECTED]> > To: "PHP Mailing List" <[EMAIL PROTECTED]> > Sent: Thursday, January 09, 2003 9:57 AM > Subject: [PHP] undefined variable notice - how to furn of > > > Hi > > I just installed new php 4.2.3 on Win XP, Apache 1.3.24.. > Everything works fine, just now I'm getting "Notice" messages for every > undefined variable or undefined index in arrays.. > > So now I have to use issset() everytime to avoid this messages... > > ..is there any way to turn this messages off, because if prior versions I > never got them..?? > > Borut > >--- End Message ---
--- Begin Message ---Hi guys i hope there is someone in here that use flsah along with php to help with this :) Anyway i will make it simple. mysql returns a number say 123 i want flash to take this number to animate a progress bar, but here the problem it does work but the progress bar dosn't animate it just sets to the hieght of the numbers sent back from mysql. How can i slow down the animation of the progress bar Anyone--- End Message ---
--- Begin Message ---I didnt test this, but something along the line should work [ActionScript] onEnterFrame = function{ i = dataYougetFromMySQL; if (i < max){ this._width = this._width * (i*factor) // factor can slow down or accelerate your animation } } [/ActionScript] hth, Philipp "- [ Paul Ferrie ] -" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi guys i hope there is someone in here that use flsah along with php to > help with this :) > > Anyway i will make it simple. > > mysql returns a number say 123 i want flash to take this number to animate a > progress bar, but here the problem it does work but the progress bar dosn't > animate it just sets to the hieght of the numbers sent back from mysql. How > can i slow down the animation of the progress bar > > Anyone > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---Hello all. I don't think this is possible, but I wanted to ask to be sure. Is it possible to read and write to a web user's registry with php? I believe this can be done with CF and ASP, but I was not sure about PHP. A search turned up nothing usefull. Thanks CDitty--- End Message ---
--- Begin Message ---Hi, CD> Hello all. I don't think this is possible, but I wanted to ask to be CD> sure. Is it possible to read and write to a web user's registry with CD> php? I believe this can be done with CF and ASP, but I was not sure CD> about PHP. A search turned up nothing usefull. I don't think so.. Clientside is client's business... -- Regards, Kansu mailto:[EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Borut, I had this problem myself just before Christmas. The following solution was proposed: >> All of the PHP scripts hosted on a Linux server >> I'm working with have suddenly begun producing >> an error message: >> >> undefined variable 'variablename' > Looks like someone's tweaked the error reporting level so it's on E_ALL, > which can be a somewhat alarmist setting :-) > Read all about it at http://php.net/manual/en/ref.errorfunc.php Michael Egan -----Original Message----- From: Borut Kovacec [mailto:[EMAIL PROTECTED]] Sent: 09 January 2003 15:57 To: PHP Mailing List Subject: [PHP] undefined variable notice - how to furn of[Scanned] Hi I just installed new php 4.2.3 on Win XP, Apache 1.3.24.. Everything works fine, just now I'm getting "Notice" messages for every undefined variable or undefined index in arrays.. So now I have to use issset() everytime to avoid this messages... ..is there any way to turn this messages off, because if prior versions I never got them..?? Borut--- End Message ---
--- Begin Message ---Tim, thanks but it still doesn't work. What puzzles me is that last night I reinstalled a 'vanilla' install of RedHat 8 from the distribution where I selected PHP and Apache. So now I am running PHP 4.2.2 and Apache 2.0.40, I make the change you recommened to httpd.conf, stop and restart the service and it still simply ignores the PHP code...this is driving me insane. Gareth "Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message 007101c2b784$652736b0$0500a8c0@bambino">news:007101c2b784$652736b0$0500a8c0@bambino... > Your settings should be something similar to this: > > <IfModule mod_php4.c> > AddType application/x-httpd-php .php .html > AddType application/x-httpd-php-source .phps > </IfModule> > > Do you have the page remotely available to see what is happening for > you?? > > > > Timothy Hitchens (HiTCHO) > Open Platform Consulting > e-mail: [EMAIL PROTECTED] > > > -----Original Message----- > > From: Gareth Thomas [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, 9 January 2003 12:03 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] apache and php > > > > > > I am trying to run a PHP page from my browser (Mozilla) and > > each time I load the page it is attempting to force a dowload > > of the page instead, based on the mime-type. I had been > > developing a command line PHP application which works fine > > and then had just started on a web interface and realised > > that Apache may not be configured correctly. So I edited > > httpd.conf and added the Add Type line for x-type-httpd .php. > > I am running Apache 2.0.40 on RedHat 8 and PHP 4.3.0pre2. Can > > anyone tell me what I am doing wrong? What should the > > modifications be to httpd.conf for PHP? > > > > Thanks in advance > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >--- End Message ---
--- Begin Message ---Hi I'm very new to PHP. (have just bought the book "PHP and MySQL Web Deelopment") SAMS authors Luke Welling and Laura Thompson I working with the examples in the book. I have loaded MySQL, Apache and PHP onto a NT server. All the test passed as per the examples in the book. Working with the the first example in chapter one. I have the HTML document that when the quantities are entered the "processorder.php" should be called to show the results and do some calcs. what happens is that the php file is called but I get an error message: "Warning: Undefined variable typeqty in C:\apache group\apache\htdocs\processorder.php on line 23" this varialbe is defined in the html document exactly as in the php document. now this warning is repeated for all the variables that should have been passed to the php for processing. What am I missing ? thank you in advance Hendrik van Niekerk--- End Message ---
--- Begin Message ---This is because of the default error reporting setting in the newer version of php. This was not the case when your book was written. In your php.ini file set error reporting = E_ALL & ~E_NOTICE and you will quit getting the 'Undefined Variable' notices. ----- Original Message ----- From: "Hendrik van Niekerk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 10:50 AM Subject: [PHP] newbee > Hi > > I'm very new to PHP. (have just bought the book "PHP and MySQL Web > Deelopment") SAMS authors Luke Welling and Laura Thompson > > I working with the examples in the book. > > I have loaded MySQL, Apache and PHP onto a NT server. All the test passed as > per the examples in the book. > > Working with the the first example in chapter one. > > I have the HTML document that when the quantities are entered the > "processorder.php" should be called to show the results and do some calcs. > > what happens is that the php file is called but I get an error message: > > "Warning: Undefined variable typeqty in C:\apache > group\apache\htdocs\processorder.php on line 23" > > this varialbe is defined in the html document exactly as in the php > document. > > now this warning is repeated for all the variables that should have been > passed to the php for processing. > > What am I missing ? > > > thank you in advance > > > Hendrik van Niekerk > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---Joseph I can get the errors to go away but then my example just shows a blank page! The variable are not being passed through to the .php doc hendrik "Joseph W. Goff" <[EMAIL PROTECTED]> wrote in message 003201c2b803$ada54f60$bdcaa8c0@jg42000">news:003201c2b803$ada54f60$bdcaa8c0@jg42000... > This is because of the default error reporting setting in the newer version > of php. This was not the case when your book was written. > In your php.ini file set error reporting = E_ALL & ~E_NOTICE and you will > quit getting the 'Undefined Variable' notices. > ----- Original Message ----- > From: "Hendrik van Niekerk" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, January 09, 2003 10:50 AM > Subject: [PHP] newbee > > > > Hi > > > > I'm very new to PHP. (have just bought the book "PHP and MySQL Web > > Deelopment") SAMS authors Luke Welling and Laura Thompson > > > > I working with the examples in the book. > > > > I have loaded MySQL, Apache and PHP onto a NT server. All the test passed > as > > per the examples in the book. > > > > Working with the the first example in chapter one. > > > > I have the HTML document that when the quantities are entered the > > "processorder.php" should be called to show the results and do some calcs. > > > > what happens is that the php file is called but I get an error message: > > > > "Warning: Undefined variable typeqty in C:\apache > > group\apache\htdocs\processorder.php on line 23" > > > > this varialbe is defined in the html document exactly as in the php > > document. > > > > now this warning is repeated for all the variables that should have been > > passed to the php for processing. > > > > What am I missing ? > > > > > > thank you in advance > > > > > > Hendrik van Niekerk > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >--- End Message ---
--- Begin Message ---Without seeing some code I would guess that it is register globals issue. It falls into the same explanation as the previous problem. You can fix this in one of two ways. 1) use the super globals instead of $typeqty use $_POST['typeqty'] or $_GET['typeqty'] depending on how it is passed. 2) turn register globals on in the php.ini file. ----- Original Message ----- From: "Hendrik van Niekerk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 11:58 AM Subject: Re: [PHP] newbee > Joseph > > I can get the errors to go away but then my example just shows a blank page! > The variable are not being passed through to the .php doc > > hendrik > > "Joseph W. Goff" <[EMAIL PROTECTED]> wrote in message > 003201c2b803$ada54f60$bdcaa8c0@jg42000">news:003201c2b803$ada54f60$bdcaa8c0@jg42000... > > This is because of the default error reporting setting in the newer > version > > of php. This was not the case when your book was written. > > In your php.ini file set error reporting = E_ALL & ~E_NOTICE and you will > > quit getting the 'Undefined Variable' notices. > > ----- Original Message ----- > > From: "Hendrik van Niekerk" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Thursday, January 09, 2003 10:50 AM > > Subject: [PHP] newbee > > > > > > > Hi > > > > > > I'm very new to PHP. (have just bought the book "PHP and MySQL Web > > > Deelopment") SAMS authors Luke Welling and Laura Thompson > > > > > > I working with the examples in the book. > > > > > > I have loaded MySQL, Apache and PHP onto a NT server. All the test > passed > > as > > > per the examples in the book. > > > > > > Working with the the first example in chapter one. > > > > > > I have the HTML document that when the quantities are entered the > > > "processorder.php" should be called to show the results and do some > calcs. > > > > > > what happens is that the php file is called but I get an error message: > > > > > > "Warning: Undefined variable typeqty in C:\apache > > > group\apache\htdocs\processorder.php on line 23" > > > > > > this varialbe is defined in the html document exactly as in the php > > > document. > > > > > > now this warning is repeated for all the variables that should have been > > > passed to the php for processing. > > > > > > What am I missing ? > > > > > > > > > thank you in advance > > > > > > > > > Hendrik van Niekerk > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---Prolem solved. Thanks to all those that assisted me. Hendrik "Joseph W. Goff" <[EMAIL PROTECTED]> wrote in message 004c01c2b813$33f181b0$bdcaa8c0@jg42000">news:004c01c2b813$33f181b0$bdcaa8c0@jg42000... > Without seeing some code I would guess that it is register globals issue. > It falls into the same explanation as the previous problem. You can fix > this in one of two ways. > 1) use the super globals > instead of $typeqty use $_POST['typeqty'] or $_GET['typeqty'] depending on > how it is passed. > 2) turn register globals on in the php.ini file. > > ----- Original Message ----- > From: "Hendrik van Niekerk" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, January 09, 2003 11:58 AM > Subject: Re: [PHP] newbee > > > > Joseph > > > > I can get the errors to go away but then my example just shows a blank > page! > > The variable are not being passed through to the .php doc > > > > hendrik > > > > "Joseph W. Goff" <[EMAIL PROTECTED]> wrote in message > > 003201c2b803$ada54f60$bdcaa8c0@jg42000">news:003201c2b803$ada54f60$bdcaa8c0@jg42000... > > > This is because of the default error reporting setting in the newer > > version > > > of php. This was not the case when your book was written. > > > In your php.ini file set error reporting = E_ALL & ~E_NOTICE and you > will > > > quit getting the 'Undefined Variable' notices. > > > ----- Original Message ----- > > > From: "Hendrik van Niekerk" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Thursday, January 09, 2003 10:50 AM > > > Subject: [PHP] newbee > > > > > > > > > > Hi > > > > > > > > I'm very new to PHP. (have just bought the book "PHP and MySQL Web > > > > Deelopment") SAMS authors Luke Welling and Laura Thompson > > > > > > > > I working with the examples in the book. > > > > > > > > I have loaded MySQL, Apache and PHP onto a NT server. All the test > > passed > > > as > > > > per the examples in the book. > > > > > > > > Working with the the first example in chapter one. > > > > > > > > I have the HTML document that when the quantities are entered the > > > > "processorder.php" should be called to show the results and do some > > calcs. > > > > > > > > what happens is that the php file is called but I get an error > message: > > > > > > > > "Warning: Undefined variable typeqty in C:\apache > > > > group\apache\htdocs\processorder.php on line 23" > > > > > > > > this varialbe is defined in the html document exactly as in the php > > > > document. > > > > > > > > now this warning is repeated for all the variables that should have > been > > > > passed to the php for processing. > > > > > > > > What am I missing ? > > > > > > > > > > > > thank you in advance > > > > > > > > > > > > Hendrik van Niekerk > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >--- End Message ---
--- Begin Message ---any one see why this wouldnt work? <?php $to = "test name <[EMAIL PROTECTED]>"; $subject = "*www.test.com*"; $date = getdate(time()); $date = sprintf("%s %s %s %s:%s:%s", $date["mday"],$date["month"],$date["year"],$date["hours"],$date["minutes"],$date["seconds"]); $from = sprintf("s s", $HTTP_POST_VARS["Name"], <$HTTP_POST_VARS["MailFrom"]>); $header = "From:$from\n"; $header .= "Reply-To:$from\n"; $body = "The following comment was submitted by: \n"; $body .= "$name on $date\n\n"; $body .= "---------------------------------------------------------------\n\n"; $body .= sprintf("s s", $HTTP_POST_VARS["Body"], \n\n); $body .= "---------------------------------------------------------------\n\n"; $body .= "<REMOTE HOST> $REMOTE_HOST\n"; $body .= "<REMOTE ADDRESS> $REMOTE_ADDR\n"; $body .= "<USER AGENT> $HTTP_USER_AGENT\n"; mail($to,$subject, $header, $body) or die (echo "&result=failure";); echo "&result=success"; ?>--- End Message ---
--- Begin Message ---On Friday 10 January 2003 00:57, travis wrote: > any one see why this wouldnt work? Why don't you tell us _how_ it doesn't work? [snip] -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* static buildup */--- End Message ---
--- Begin Message ---well... it returns nothing when using loadVars.sendAndLoad in flash and sends no mail... while.... this script on the same server called from the same flash file works <?php $MailTo = "[EMAIL PROTECTED]"; mail($MailTo,$HTTP_POST_VARS["Name"], $HTTP_POST_VARS["MailFrom"], $HTTP_POST_VARS["Message"]); ?> "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Friday 10 January 2003 00:57, travis wrote: > > any one see why this wouldnt work? > > Why don't you tell us _how_ it doesn't work? > > [snip] > > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > static buildup > */ >--- End Message ---
--- Begin Message ---GOT IT :) <?php $To = "test <[EMAIL PROTECTED]>"; $Subject = "www.test.com"; $N = $HTTP_POST_VARS['Name']; $M = $HTTP_POST_VARS['Mess']; $F = $HTTP_POST_VARS['MailFrom']; $H = $HTTP_SERVER_VARS['HTTP_HOST']; $A = $HTTP_SERVER_VARS['REMOTE_ADDR']; $UA = $HTTP_SERVER_VARS['HTTP_USER_AGENT']; $Date = getdate(time()); $Date = sprintf("%s %s %s %s:%s:%s", $Date["mday"],$Date["month"],$Date["year"],$Date["hours"],$Date["minutes"],$ Date["seconds"]); $From = "$N <$F>"; $Header = "From: $From\n"; $Header .= "Reply-To: $From\n\n"; $Body = "The following comment was submitted by: $N\n"; $Body .= "on $Date\n\n\n"; $Body .= "---------------------------------------------------------------\n\n"; $Body .= "$M\n\n"; $Body .= "---------------------------------------------------------------\n\n"; $Body .= "<REMOTE HOST> $H\n"; $Body .= "<REMOTE ADDRESS> $A\n"; $Body .= "<USER AGENT> $UA\n"; mail($To, $Subject, $Header, $Body); //echo "&result=success"; ?> "Travis" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > well... > it returns nothing when using loadVars.sendAndLoad in flash and sends no > mail... > > while.... > this script on the same server called from the same flash file works > > > <?php > > $MailTo = "[EMAIL PROTECTED]"; > > mail($MailTo,$HTTP_POST_VARS["Name"], $HTTP_POST_VARS["MailFrom"], > $HTTP_POST_VARS["Message"]); > > ?> > > > > "Jason Wong" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > On Friday 10 January 2003 00:57, travis wrote: > > > any one see why this wouldnt work? > > > > Why don't you tell us _how_ it doesn't work? > > > > [snip] > > > > > > -- > > Jason Wong -> Gremlins Associates -> www.gremlins.biz > > Open Source Software Systems Integrators > > * Web Design & Hosting * Internet & Intranet Applications Development * > > > > /* > > static buildup > > */ > > > >--- End Message ---
--- Begin Message ---Why does the webmaster not reject messages that are dates > today's date eq there are numerous messages that have dates with year 2010 and up. A moron who does not have the correct computer date on his machine should pack it up and send it back to the company that sold it to them. JMHO--- End Message ---
--- Begin Message ---Mail servers play a part in this too. Maybe the admins should pack up their servers and send them back too :) -----Original Message----- From: "Hendrik van Niekerk" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date: Thu, 9 Jan 2003 11:11:30 -0600 Subject: [PHP] Newbee observation > Why does the webmaster not reject messages that are dates > today's > date eq > there are numerous messages that have dates with year 2010 and up. A > moron > who does not have the correct computer date on his machine should pack > it up > and send it back to the company that sold it to them. > > JMHO > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---Better yet a script should be run to have all the e-mails listed by the time they were received at the server instead of what time the e-mail was submitted. That should take care of it I would think. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -----Original Message----- From: Tom Ray [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 12:07 PM To: Hendrik van Niekerk; [EMAIL PROTECTED] Subject: Re: [PHP] Newbee observation Mail servers play a part in this too. Maybe the admins should pack up their servers and send them back too :) -----Original Message----- From: "Hendrik van Niekerk" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date: Thu, 9 Jan 2003 11:11:30 -0600 Subject: [PHP] Newbee observation > Why does the webmaster not reject messages that are dates > today's > date eq > there are numerous messages that have dates with year 2010 and up. A > moron > who does not have the correct computer date on his machine should pack > it up > and send it back to the company that sold it to them. > > JMHO > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---Hello, I just recently upgraded from 4.2.3 to 4.3.0 and a script of mine has begun behaving erratically. The code is included at the bottom of this message. I am essentially updating a large (1.94m row) table to include a new field...the queries needed to do this updating are somewhat time consuming, so I have been updating all of this for about fifteen months now. However, since my 4.3.0 upgrade, this script can get through maybe 110 lines before halting. I get no errors posted with regards to the script, and no HTTP errors or timeout messages, it's as if the script thinks it's completed. If anyone could give me a clue-in as to what's up, I would be much obliged. Cheers, Ben <?php include("functions.inc.php"); $db = mysql_connect("localhost", "user", "pw"); mysql_select_db("db", $db); $sql = "SELECT ID,a FROM b.c WHERE d = '' LIMIT 200;"; $result = mysql_query($sql); $numrows = mysql_num_rows($result); echo "Performing op on $numrows rows<br>"; $qstart = sn_Msecs(); while ($row = mysql_fetch_row($result)) { $owner = getcache($row[1]); $id = $row[0]; $sqlu = "UPDATE b.c SET d = '$owner' WHERE ID = '$id';"; $resultu = mysql_query($sqlu); } $qstop = sn_Msecs(); $qtime = round($qstop-$qstart,2); echo "the update took $qtime secs"; ?> ------ Ben Vaughn Security Analyst Blackbird Technologies 703-796-1438 W / 703-868-5258 C [EMAIL PROTECTED] ------BEGIN:VCARD VERSION:2.1 N:Vaughn;Ben FN:Ben Vaughn TEL;WORK;VOICE:703.796.1438 TEL;HOME;VOICE:703.205.9719 TEL;CELL;VOICE:703.868.5258 ADR;WORK:;217-C LABEL;WORK:217-C EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20020607T194757Z END:VCARD--- End Message ---
smime.p7s
Description: application/pkcs7-signature
--- Begin Message ---Running my code directly from console (/usr/local/bin/php ./code.php) allows the code to complete properly. It must be an HTTP issue. Cheers, Ben ------ Ben Vaughn Security Analyst Blackbird Technologies 703-796-1438 W / 703-868-5258 C [EMAIL PROTECTED] ------ -----Original Message----- From: Ben Vaughn Sent: Thursday, January 09, 2003 12:25 PM To: [EMAIL PROTECTED] Subject: [PHP] Interesting timeout issue Hello, I just recently upgraded from 4.2.3 to 4.3.0 and a script of mine has begun behaving erratically. The code is included at the bottom of this message. I am essentially updating a large (1.94m row) table to include a new field...the queries needed to do this updating are somewhat time consuming, so I have been updating all of this for about fifteen months now. However, since my 4.3.0 upgrade, this script can get through maybe 110 lines before halting. I get no errors posted with regards to the script, and no HTTP errors or timeout messages, it's as if the script thinks it's completed. If anyone could give me a clue-in as to what's up, I would be much obliged. Cheers, Ben <?php include("functions.inc.php"); $db = mysql_connect("localhost", "user", "pw"); mysql_select_db("db", $db); $sql = "SELECT ID,a FROM b.c WHERE d = '' LIMIT 200;"; $result = mysql_query($sql); $numrows = mysql_num_rows($result); echo "Performing op on $numrows rows<br>"; $qstart = sn_Msecs(); while ($row = mysql_fetch_row($result)) { $owner = getcache($row[1]); $id = $row[0]; $sqlu = "UPDATE b.c SET d = '$owner' WHERE ID = '$id';"; $resultu = mysql_query($sqlu); } $qstop = sn_Msecs(); $qtime = round($qstop-$qstart,2); echo "the update took $qtime secs"; ?> ------ Ben Vaughn Security Analyst Blackbird Technologies 703-796-1438 W / 703-868-5258 C [EMAIL PROTECTED] ------BEGIN:VCARD VERSION:2.1 N:Vaughn;Ben FN:Ben Vaughn TEL;WORK;VOICE:703.796.1438 TEL;HOME;VOICE:703.205.9719 TEL;CELL;VOICE:703.868.5258 ADR;WORK:;217-C LABEL;WORK:217-C EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20020607T194757Z END:VCARD--- End Message ---
smime.p7s
Description: application/pkcs7-signature
--- Begin Message ---ive recently started experiencing a problem from broadcasts made over a mailing list i wrote some time ago. up until now its been functioning fine, however recently it started sending out raw html unformatted (tags etc appearing in email), instead of the usual interpreted results. this coincided, as best i can tell, with my isp upgrading their server to php 4.3.0. the only change is in the subject line as follows; this is the subject line from a working email; -Subject: update 10:32pm Dec 6 this is the subject line im getting now since the change (incorrect!); -Subject: update 9:54am Jan 9 MIME-Version: 1.0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: base64 From: [ ******** ] < ******** > Reply-To: ******** as you can see its now putting EVERYTHING within the header on that one line and ignoring the \n after each row (see relevant section of my code below) .. $br_subjectc = "$br_subjectbox\n"; $br_subjectc .= "MIME-Version: 1.0\n"; $br_subjectc .= "Content-Type: text/html;\n\tcharset=\"iso-8859-1\"\n"; $br_subjectc .= "Content-Transfer-Encoding: base64\n\n"; $br_subjectc .= "From: [$title] < $br_return >\n"; $br_subjectc .= "Reply-To: $br_return\n"; any idea what is causing that? ive looked on php.net and i cant see anything that catches my eye mentioned about this in the changelog. im not aware of any alteration to email structure standards either. tia john--- End Message ---
--- Begin Message ---Hi all, I'm making a new site for a client and he needs to put several different menus under a static FLASH menu. The bad part is that every item in the flash menu leads to different categories and these need different number of sub menus. I use MySQL & PHP 4. The categories and sub categories are something like this: * Products <-- Flash static menu - Item 1 <-- MySQL fetched menu - Item 2 <-- MySQL fetched menu - Item 3 <-- MySQL fetched menu - Item 3-1 <-- MySQL fetched menu - Item 3-2 <-- MySQL fetched menu * Services <-- Flash static menu - Item 1 <-- MySQL fetched menu - Item 1-1 <-- MySQL fetched menu - Item 1-2 <-- MySQL fetched menu - Item 2 <-- MySQL fetched menu - Item 3 <-- MySQL fetched menu What would be the best solution for this? Another problem to solve is the creation of new children into the menu... sub categories AND items dynamically. Thanks in advance, Cesar L. Aracena [EMAIL PROTECTED] [EMAIL PROTECTED] (0299) 156-356688 Neuquén (8300) Capital Argentina--- End Message ---
--- Begin Message --- I don't know about the flash part, but submenus are simple. Your menu items table needs a "parent" column, where the id of the parent menu item, but for top level menus (Flash static menu) it will be 0. Then first select all menu items with parent=0 and as you loop throught the result result, recursively get all child elements.
This function will get you started:
get_childs($menu_id) {
$resp=array();
$res=mysql_query("SELECT * FROM menu_items WHERE menu_parent_id='$menu_id'");
if(mysql_num_rows($res)) {
for($i=0;$tmp=mysql_fetch_array($res); $i++) {
$resp[$i]['menu']=$tmp; // ['menu'] will contain info about particular menu item
$resp[$i]['childs']=get_childs($tmp['menu_id']); // ['menu'] will contain all childs of this menu items, each child will again contain ['menu'] and ['childs'] etc.
}
}
return $resp;
}
$menu_tree = get_childs(0);
echo '<pre>';
print_r($menu_tree);
echo '</pre>';
Cesar Aracena wrote:
Hi all,
I'm making a new site for a client and he needs to put several different
menus under a static FLASH menu. The bad part is that every item in the
flash menu leads to different categories and these need different number
of sub menus. I use MySQL & PHP 4. The categories and sub categories are
something like this:
* Products <-- Flash static menu
- Item 1 <-- MySQL fetched menu
- Item 2 <-- MySQL fetched menu
- Item 3 <-- MySQL fetched menu
- Item 3-1 <-- MySQL fetched menu
- Item 3-2 <-- MySQL fetched menu
* Services <-- Flash static menu
- Item 1 <-- MySQL fetched menu
- Item 1-1 <-- MySQL fetched menu
- Item 1-2 <-- MySQL fetched menu
- Item 2 <-- MySQL fetched menu
- Item 3 <-- MySQL fetched menu
What would be the best solution for this? Another problem to solve is
the creation of new children into the menu... sub categories AND items
dynamically.
Thanks in advance,
Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina
--- End Message ---
--- Begin Message --- Hi
HELP!!!
I have read through the manual about using $_POST['<name>'] to retrieve data from forms, but what happens when a form element is not filled in or checked?
If I have a checkbox on a form called "chk1" I get an error from PHP when I try this:
$chk1 = $_POST['chk1']; // error if user did not chech the checkbox on the form!!!
How do ya usefully retrieve the fact that a form element has not been filled in/checked?
Be Well,
John-Erik Omland
====================================
"Rhythm is the basis of life,
not steady forward progress.
The forces of creation, destruction, and preservation
have a whirling, dynamic interaction."
- Kabbalah
--- End Message ---
--- Begin Message ---isset($_POST["chk1"]) will only be true if the checkbox is checked. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] ----- Original Message ----- From: John-Erik Omland <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 6:25 PM Subject: [PHP] checkboxes, radio buttons and $_POST['<name>'] Hi HELP!!! I have read through the manual about using $_POST['<name>'] to retrieve data from forms, but what happens when a form element is not filled in or checked? If I have a checkbox on a form called "chk1" I get an error from PHP when I try this: $chk1 = $_POST['chk1']; // error if user did not chech the checkbox on the form!!! How do ya usefully retrieve the fact that a form element has not been filled in/checked? Be Well, John-Erik Omland ==================================== "Rhythm is the basis of life, not steady forward progress. The forces of creation, destruction, and preservation have a whirling, dynamic interaction." - Kabbalah--- End Message ---
--- Begin Message ---In the php.ini file set error reporting to E_ALL & ~E_NOTICE -- Joseph W. Goff Seems like register_globals issue has been replaced by error_reporting ;-) John-Erik Omland wrote:Hi
HELP!!!
I have read through the manual about using $_POST['<name>'] to retrieve data from forms, but what happens when a form element is not filled in or checked?
If I have a checkbox on a form called "chk1" I get an error from PHP when I try this:
$chk1 = $_POST['chk1']; // error if user did not chech the checkbox on the form!!!
How do ya usefully retrieve the fact that a form element has not been filled in/checked?
Be Well,
John-Erik Omland
====================================
"Rhythm is the basis of life,
not steady forward progress.
The forces of creation, destruction, and preservation
have a whirling, dynamic interaction."
- Kabbalah
--- End Message ---
--- Begin Message ---List, I have a website that uses (too) many frames. At its most ugly, it will load 8 frames at once. All of the pages in these frames activate the session, and some of them modify session variables. Can this cause the pages to load slowly? Can a page have the session file write locked and make other pages wait? Thanks for your help, Dale [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---> -----Original Message----- > From: Dave Gervais [mailto:[EMAIL PROTECTED]] > Sent: 08 January 2003 19:11 > > Does anybody know how to implement the 8 and 16 bit versions of > Fletcher's checksum using PHP? I hit google and came up dry. > It's easy > enough to find how to do it in C, but PHP if a different story. Well, I have no idea what Fletcher's checksum is, but if you have a version in C that's not too long (<20 lines of code, say), it shouldn't be too difficult to convert it into PHP. There should be enough people here sufficiently proficient in both C and PHP to at least give you a pointer in the right direction! Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211--- End Message ---
--- Begin Message --- Thanks for the reply.
I do have the C code that does this. If anybody can easily translate it to PHP, it would be very apriciated.
Here is the C code. There is a decode function, but I don't need it in PHP because I have a C program listening to serial port on the other end that will validate the checksum.
/*
* operator fletcher_encode
*/
fletcher_encode( buffer, count )
unsigned char* buffer;
long count;
{
int i;
unsigned char c0 = 0;
unsigned char c1 = 0;
* ( buffer + count - 1 ) = 0;
* ( buffer + count - 2 ) = 0;
for( i = 0; i < count; i++)
{
c0 = c0 + * ( buffer + i );
c1 =c1 +c0;
}
* ( buffer + count - 2 ) = c0 - c1;
* ( buffer + count - 1 ) = c1 - 2*c0;
}
My problem with PHP was with the unsigned char.
Thanks again,
Dave Gervais
Ford, Mike [LSS] wrote:
-----Original Message-----
From: Dave Gervais [mailto:[EMAIL PROTECTED]]
Sent: 08 January 2003 19:11
Does anybody know how to implement the 8 and 16 bit versions of Fletcher's checksum using PHP? I hit google and came up dry. It's easy enough to find how to do it in C, but PHP if a different story.
Well, I have no idea what Fletcher's checksum is, but if you have a version
in C that's not too long (<20 lines of code, say), it shouldn't be too
difficult to convert it into PHP. There should be enough people here
sufficiently proficient in both C and PHP to at least give you a pointer in
the right direction!
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--- End Message ---
--- Begin Message ---> -----Original Message----- > From: Kevin Avila [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2003 04:33 > > I'm having a weird issue with float precision. I am > decrementing the > value of a float by 0.1. The problem is when the float I am working > with reaches 0.1 and I decrement it again I get 1.e09 instead of the > expected 0.0. This was also confirmed by a user in #php. Anyone have > any ideas? Since, mathematically, the binary representations of floats used on computers in general is only an approximation to the real value (albeit a very close approximation), you can never rely on repeated subtraction of one float from another value to end up exactly where you thought it would. When I were a lad, learning about these new-fangled computer thingies at university, it was drummed into us never to do this: for ($x=0; $x<10.0; $x+=0.1) { ... stuff involving $x ... } but either this: for ($x=0; abs($x-10.0)<a_very_small_value; $x+=0.1) {... stuff ...} or, better yet: for ($i=0; $i<100; $i++) { $x=$i*0.1; .... stuff .... } The first version tests for an end value that's *close enough* to the desired one, but errors in the approximation of 0.1 will still get magnified along the way. The second version is better because you're dealing with exact integer quantities, and calculating the closest representation of the desired float each time round the loop -- no magnification of approximation errors, and a well-defined termination condition. (Well, actually, since C hadn't been invented yet (nor even B, and no that's not a joke!), the syntax we used was a lot uglier than that, but the principle's the same! ;) Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211--- End Message ---
--- Begin Message ---On Wed, Jan 08, 2003 at 03:55:51AM +0000, Nikolai Vladychevski wrote: > I want to share the code (php-extension) I have included into php-4.2.2 to > support CDK widgets > (http://gd.tuwien.ac.at/hci/cdk/?file=cdk.tar.gz&type=listing) to enable > PHP to use text based "GUI" in terminal environment. > > CDK supports: > -Alphalist (list with alphanumeric search) > -Calendar dialog box > -Dialog > -Entry field with type masking > -Scale field > -2 dimension graphics (text mode) > -Histogram display > -Item list field > -Label > -Marque (text box in movement) > -Matrix field > -Menu > -Scroll > -Selection field > -Slider field > -Radio button > -Template field > +10 ;-) This extension would allow me to drop my own text-base objects using the php ncursus extension. But has has some bugs which are hard to fix. So yes, please commit. I guess you should put it into PECL.. -- With best regards, Dave Mertens - Senior Development Manager [EMAIL PROTECTED] Innovative Solutions in Media Schiekade 101 3033 BG Rotterdam, Netherlands T +31-10-2436060 F +31-10-2436066 http://www.ism.nl Quality Solutions - Reliable Partner--- End Message ---
--- Begin Message ---Well, how to I get access to where I'm trying to put it? The rights already are 777. Olli Thomas Seifert schrieb: > it may be, that destiny is wrong. > the error-message tells that you don't have access to where you are trying to upload >the file to. > > Thomas > > On Wed, 08 Jan 2003 20:59:02 +0100 [EMAIL PROTECTED] (Oliver Witt) wrote: > > > I uploaded that script with a common ftp program on my server in the > > internet. > > FOr the host, user and pw, I use the same data as I use to log in with > > my ftp program. So the mistake can't be there. > > This is how that script basically works: > > > > <?php > > if(isset($destiny)){ > > $ftp_server = "host"; > > $benutzername = "user"; > > $passwort = "pw"; > > $connection_id = ftp_connect("$ftp_server"); > > $login_result = ftp_login($connection_id, "$benutzername", "$passwort"); > > > > $upload = ftp_put($connection_id, $destiny, $local_file, FTP_ASCII); > > if (!$upload) { > > echo "<p>It didn't work</p>";} > > else { > > echo "<p>It did work</p>";} > > ftp_quit($connection_id);} > > ?> > > > > <html> > > <head> > > <title></title> > > </head> > > <body bgcolor="#FFFFFF" text="#000000"> > > <form action="upload.php" enctype="multipart/form-data" method="POST"> > > <input name="local_file" type="file" size="50"> > > <br> > > <input type="text" name="destiny"> > > <br> > > <input type="submit" value="Submit"> > > </form> > > </body> > > </html> > > > > > > > > "Timothy Hitchens )" schrieb: > > > > > Using ftp_login() ?? > > > > > > Timothy Hitchens (HiTCHO) > > > Open Platform Consulting > > > e-mail: [EMAIL PROTECTED] > > > > > > > -----Original Message----- > > > > From: Oliver Witt [mailto:[EMAIL PROTECTED]] > > > > Sent: Thursday, 9 January 2003 5:30 AM > > > > To: [EMAIL PROTECTED]; Timothy Hitchens ) > > > > Subject: Re: [PHP] ftp_put: permission denied > > > > > > > > > > > > "Timothy Hitchens )" schrieb: > > > > > > > > > I am assuming you have testing from a desktop client. > > > > > > > > > > Are you sure that the PHP script has been logged in?? > > > > > > > > > > Can you see via a log file of the successful authentication?? > > > > > > > > > > > > > I logged in using the same information as I used to upload > > > > that script. > > > > > > > > if ((!$conn_id) || (!$login_result)) { > > > > echo "Not logged in"; > > > > die; > > > > } else { > > > > echo "Logged in"; > > > > } > > > > > > > > That script returned Logged in. > > > > Olli > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > >--- End Message ---
--- Begin Message --- Hi,
I'm planning to build a web album for my digital photographs, and have some questions regarding the design:
1) Is it better to store the images within the database, or just store pointers to the images which is put outside, in the filesystem?
2) At log in, I want to show to which albums new pictures have been added since last visit. For performance reasons, should information about last added pictures be added to the database, or is it ok to make a MySQL-query each time, comparing the add-date for every picture in every album with the users last log in date?
3) If I've understood things right, there is functions within PHP that can handle picture resizing? Is that correct?
Best regards,
Anders Thoresson
--- End Message ---
--- Begin Message ---> Hi, > > I'm planning to build a web album for my digital photographs, and have > some questions regarding the design: > > 1) Is it better to store the images within the database, or just store > pointers to the images which is put outside, in the filesystem? > IMHO, store a link of "pointer" to the images > 2) At log in, I want to show to which albums new pictures have been added > since last visit. For performance reasons, should information about last > added pictures be added to the database, or is it ok to make a MySQL-query > each time, comparing the add-date for every picture in every album with the > users last log in date? > How often will this get hit? If often you could also update a string in a test file the same time you do your database/album updates. But a huge traffic is not a cause for concern you should be able to safely execute a query every time to find out the lastest pictures/albums updated. > 3) If I've understood things right, there is functions within PHP that > can handle picture resizing? Is that correct? > Yes, some good tutorials out there. I don't know about internal PHP functions, I often just call ImageMagik from inside my php script to re-size my images, but I'm sure there are plenty of ways... HTH -brad > Best regards, > > Anders Thoresson > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---1. Store images separately with pointers in the database. It permits faster database queries. 2. 3. int imagecopyresized ( resource dst_im, resource src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH) ----- Original Message ----- From: "Anders Thoresson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 2:20 PM Subject: [PHP] building web album - design questions Hi, I'm planning to build a web album for my digital photographs, and have some questions regarding the design: 1) Is it better to store the images within the database, or just store pointers to the images which is put outside, in the filesystem? 2) At log in, I want to show to which albums new pictures have been added since last visit. For performance reasons, should information about last added pictures be added to the database, or is it ok to make a MySQL-query each time, comparing the add-date for every picture in every album with the users last log in date? 3) If I've understood things right, there is functions within PHP that can handle picture resizing? Is that correct? Best regards, Anders Thoresson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message -------- Original Message ----- From: "Anders Thoresson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 1:20 PM Subject: [PHP] building web album - design questions > Hi, > > I'm planning to build a web album for my digital photographs, and have > some questions regarding the design: > > 1) Is it better to store the images within the database, or just store > pointers to the images which is put outside, in the filesystem? Unless the images are small and easily managed I would recommend to store the images in the filesystem. You'll find this method is faster and more versitile. A simple script can be written to reconsile the database with the filesystem should you need to tamper with it. > 2) At log in, I want to show to which albums new pictures have been added > since last visit. For performance reasons, should information about last > added pictures be added to the database, or is it ok to make a MySQL-query > each time, comparing the add-date for every picture in every album with the > users last log in date? I don't foresee any bottlenecks here. Just store the timestamp of the last login and the timestamp of each upload. If you're clever you can perform the comparison with one db query. Define the timestamp as the index for the album table and I guarentee speed will not be an issue even with a heavy traffic load and tens of thousands of entries. > 3) If I've understood things right, there is functions within PHP that > can handle picture resizing? Is that correct? http://www.php.net/manual/en/ref.image.php Or if you need to get more sophisticated such as adding water-marks and stuff I recommend you install (or have your ISP install) imagemagick. Sounds like a fun project. Good luck! -Kevin--- End Message ---
--- Begin Message ---On Thu, 9 Jan 2003, Anders Thoresson wrote: > I'm planning to build a web album for my digital photographs, and have > some questions regarding the design: I don't want to discourage you from hacking your own code ... that's phat, so plz take this just as some heads-up info: IMHO, Gallery can't be beat for a web photo album. It's got some of its own problems and lacking features, but it's a solid idea with a lot of code for doing, well, just about everything you'd want to do with a web photo album. I didn't write it nor know the people who do. However, I do use it, and have hacked at it for my own albums: http://gallery.menalto.com/index.php If for no other use, it's probably a valuable project to study. Check it out, and dive into its code for features you like. You may find ways to implement some things well, and, like I, find ways to NOT implement things poorly. (BTW, it doesn't use a database for anything!) That said .... > 1) Is it better to store the images within the database, or just store > pointers to the images which is put outside, in the filesystem? Keep files in the filesystem :) > 2) At log in, I want to show to which albums new pictures have been added > since last visit. For performance reasons, should information about last > added pictures be added to the database, or is it ok to make a MySQL-query > each time, comparing the add-date for every picture in every album with the > users last log in date? Personal photo albums tend to be low-traffic. And you're aiming for a very specific functionality ... a repeating query is probably a safe solution (seems like the only one, too). > 3) If I've understood things right, there is functions within PHP that > can handle picture resizing? Is that correct? Yes. http://www.php.net/manual/en/ref.image.php g.luck, ~Chris--- End Message ---
--- Begin Message ---Hi there, So it is the browsers problem. I tested what you said and Mozilla acts as you stated and IE does as well. I guess my question is. Is there no way to close clear out the session when the user logs out? The way I set things up the class that I wrote just gets the current sessionid and does a select from the database to see if it has been logged. The problem this creates is that someone could sit down and reopen a browser and have access to the site as if they where logged because the session is not gone. Hmm - Like a said I have never used sessions before so I am learning about them. Thank you for your input... Ken > What browser are you running? I find that IE drops the session when > you close the browser window actively working the site. On Mozilla I > have to close every instance of Mozilla regardless of the site before > it drops the session. Pretty aggravating so I'm going to have to start > working on a method based on responses to your post. > > Larry S. Brown > Dimension Networks, Inc. > (727) 723-8388 > > -----Original Message----- > From: Ken Nagorski [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 09, 2003 1:35 AM > To: [EMAIL PROTECTED] > Subject: [PHP] session_destroy problem > > Hi there, > > I have written a class that manages sessions. I have never used > sessions before so all this is new to me. Everything works fine as far > as starting the session and logging in however when I call sessoin > destroy it doesn't seem to work the function returns 1 as it should if > all goes well however if I go to another page and do some other > browsing even if I close the browser the session still hangs around. Is > there something I don't know about sessions? I have read the > documentation on the session_destroy function, I don't think that I am > missing anything... > > Anyone have any suggestions? I am totally confused. > > Thanks > Ken > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---I was wondering is it possible to "re-throw" an error that one has caught with a custom error handler if, for example, I only wanted to deal with the errors generated by the library I was working on? Or perhaps some way to only catch a custom defined error type? I suppose I'm trying to overload the trigger_error method to work like exceptions and perhap that isn't the appropiate thing to do. Is there a consensed upon pattern for dealing with error conditions in PHP? I'm finding that using trigger_error was very natural for me as the author of a tool/library (Magpie an RSS parser) but it makes it very difficult for my users to cope with the errors. Thanks, Kellan--- End Message ---
--- Begin Message ---I have successfully installed oracle 8.1.7 w/ php and have it configured to run from the command line. When I run a simple script that connects, and selects records from the database, the last line is a segmentation fault error. This does not seem to happen when the same script is run through the browser. Can anyone offer any help or advice? The code is listed below. CDitty #!/usr/bin/php <? function oci8Connect(){ $db_conn = ocilogon("usrname","pwd", "dbase"); if (!$db_conn){ echo "Help<br>"; exit (); } echo "Connected<br>"; return ($db_conn); } $conn = oci8Connect(); $stmt = ociparse($conn,"select * from US_MSTR"); ociexecute($stmt); $i=0; $row = array(); while(OCIFetchInto($stmt, &$row, OCI_ASSOC)){ # do stuff with $row... echo $row['US_ID'] . " $i<br>"; $i++; } ocifreestatement($stmt); ocilogoff($conn); ?>--- End Message ---
--- Begin Message ---Hi, This may exist, but I haven't been able to find it, and I think it would be REALLY helpful and convenient. The idea is this: When you write a script and call a function: <?php $whatever = previously_uncalled_function("one","two"); ?> PHP would automatically look for a file named "previously_uncalled_function" in your /include/functions/ directory. This would eliminate a LOT of include() and require() calls (or at least make them automatic) in a script. The function would only get read in if it was used. This would be very convenient. When you create a new function you drop it in that directory (with a very specific, unique name, of course), and it can immediately be called anywhere in the site. And, you only incur the disk IO to read it when its used for the first time in a script. The 3 things I want to avoid are: 1) Explicitly including every function, every time it's needed. 2) Disk IO of including a function when it's not needed. 3) Taking the easy route and including a file with a bunch of functions when most won't get called. Does this already exist, or is this a good idea (if not, any reasons why)? I personally would love to see it implemented if it isn't already. Thanks, Brian Allen [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Hi I want to store some discount codes in mysql, i was thinking of putting $price = $price - ($price *.i); in a mysql field that can be looked up via the coupon number what's the best way to do this and return $price with the discount applied. Thanks Best Wishes & Happy New Year Paul Roberts [EMAIL PROTECTED] ++++++++++++++++++++++++--- End Message ---
--- Begin Message ---I should have used return($price = $price - ($price *.1)); in the db and eval($str); Best Wishes & Happy New Year Paul Roberts [EMAIL PROTECTED] ++++++++++++++++++++++++ ----- Original Message ----- From: "Paul Roberts" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 10:29 PM Subject: [PHP] php stored in mysql Hi I want to store some discount codes in mysql, i was thinking of putting $price = $price - ($price *.i); in a mysql field that can be looked up via the coupon number what's the best way to do this and return $price with the discount applied. Thanks Best Wishes & Happy New Year Paul Roberts [EMAIL PROTECTED] ++++++++++++++++++++++++--- End Message ---
--- Begin Message ---Hi, You can use the backtick operator to delete whatever you have permissions to delete: $directory = "path/*.*"; `rm -rf $directory`; They aren't quotes, they are backticks (to the left of the 1 key on most keyboards). It is very useful for any command line stuff you have permissions to do. Brian Allen [EMAIL PROTECTED] "Paul Nicholson" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hey, > You can't delete the files all at once....you have to delete them one by one > or use this function that will remove full directories. > - ----- > function force_rmdirs($dir) { > $dh = opendir($dir); > while(false !== ($file = readdir($dh))) { > if($file != '.' && $file != '..') { > $path = $dir .'/'. $file; > if(is_dir($path)) { > force_rmdirs($path); > } else { > unlink($path); > } > } > } > closedir($dh ); > return rmdir($dir); > } > - ----- > HTH! > ~Paul > > On Wednesday 08 January 2003 12:29 am, [EMAIL PROTECTED] wrote: > > Ok, Jason, here's another one! > > > > I think I've read how to delete a file. > > I need to delete 25 files, then do a rmdir(blah); > > > > Line 16: $directory = "path/*.*"; > > Warning: Unlink failed (No such file or directory) in > > /mnt/ls6/17/169/00000000/htdocs/2003/_admin/del_listing_action.php on line > > 16 > > > > Warning: RmDir failed (File exists) in > > /mnt/ls6/17/169/00000000/htdocs/2003/_admin/del_listing_action.php on line > > 17 > > > > Thanks > > - -- > ~Paul Nicholson > Design Specialist @ WebPower Design > [EMAIL PROTECTED] > www.webpowerdesign.net > "The web....the way you want it!" > > > "It said uses Windows 98 or better, so I loaded Linux!" > Registered Linux User #183202 using Register Linux System # 81891 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE+G8/JDyXNIUN3+UQRAmd/AJ42CW5HDYEQ1dvf/m5CLynoqGekwgCdE5T2 > rxlRjVBaFNIhQGFQc38ylks= > =mJq1 > -----END PGP SIGNATURE-------- End Message ---
--- Begin Message ---Hello, I have a big problem with reading a value in SVG through a PHP file. The value i want to draw is "$large". There are 3 little files restricted to the minimum. I would be so happy if someone could find the mistake here. Thanks a lot. Gil --------- data.php --------- <?php $large = 750; $haut = 450; ?> ---------- index.php ---------- <HTML> <BODY> <?php include("data.php"); // ok echo("$large"); // ok echo("<embed width=$large height=$haut src='svg.php'>"); ?> </BODY> </HTML> -------- svg.php -------- <?php include("data.php"); // OK ?????? function writeSVG() { global $large, $haut; echo "<?xml version='1.0' encoding='iso-8859-1'?>\n"; echo "<svg id='root' xml:space='preserve' width='$large' height='$haut'>\n"; echo "<text x='40' y='40'>$large</text>\n"; echo "</svg>"; } header("Content-Type: image/svg+xml"); writeSVG(); ?>--- End Message ---