Re: [PHP] Strings and php.ini
hi, infact i'm un able to obtain a copy of my hosting company's php.ini thanx _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I'm in need of a PHP web host recommendation
I suggest paying a visit to www.webhostingtalk.com and search the forums... theres tons of information on the large, and small hosts that might help. Jason Reid [EMAIL PROTECTED] -- AC Host Canada www.achost.ca "OrangeHairedBoy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Seems a bit expensive though...$7.95/month for 5megs and 1 email. > > You could try your-site.com which is $5.00/month for 50megs and 25 email, > etc... > > Or, look at CIHOST.com - the folks I use. Their cheapest unix deal is ~ > $15/month for 100megs, 25+email, mysql, etc...mega fast connection too... > One thing I like about them is their policy is to never use more than 33% of > their bandwidth...just in case...site never goes down...i'm on a trip... > > Lewis > > > "Edward Peloke" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > http://www.ht-tech.net is who I use, VERY GOOD! Just tell them I sent > you. > > > > Eddie > > > > -Original Message- > > From: Jon Haworth [mailto:[EMAIL PROTECTED]] > > Sent: Friday, November 15, 2002 11:49 AM > > To: 'Phil Schwarzmann'; [EMAIL PROTECTED] > > Subject: RE: [PHP] I'm in need of a PHP web host recommendation > > > > > > Hi Phil, > > > > > would like to hear some recommendations of some > > > good companies that host PHP/MySQL and also JSP. > > > > http://34sp.com/ are great if you don't mind .uk-based hosting. I've heard > > good things about http://oneandone.co.uk/ but haven't used them myself. > > > > At the other end of the scale, you should stay *well* away from > > http://zenithtech.com/ - they're without a doubt the worst host I've ever > > used. > > > > Cheers > > Jon > > > > -- > > 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 >
[PHP] Re: POSIX and PCRE help
Lewis, First I would look at breaking out the tags: // User: JohnDoe; age=32; nickname="Billy 'the' Kid"; haircolor=orange; $string = 'User: JohnDoe; age=32; nickname="Billy \'the\' Kid"; haircolor=orange;'; $stringArray = preg_split('/;/', $string, -1, PREG_SPLIT_NO_EMPTY); Then split by the = or : // split by = or : foreach ($stringArray as $item) { list($tag, $element) = preg_split('/\:|\=/', $item, 1, PREG_SPLIT_NO_EMPTY); echo "$tag => $element"; } -aaron "Orangehairedboy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am trying to learn more about regular expressions as I haven't used them > much in the past. I am working with email, and I'm looking for a way to > split the following expression up: > > Content-Type: text/plain; boundary="whatever"; > > Using "/^(\S+)\:\s*(.+)$/iU" I can split it into: > > [Content-Type] and [text/plain; boundary="whatever";] > > Problem is, it might have different tags. Here's a sketch of the whole > thing: > > [Header Name a-zA-Z0-9] [\s*] [:] [\s*] [ Header value a-zA-Z0-9/_ ] [\s*] > [;] [ unlimited repeating pattern of ( [Property Name a-zA-Z0-9] [\s*] [=] > [\s*] ( string optionally surrounded by quotes - but necessary if value has > spaces - but can't include quotes ) [\s*] [;] ) ] > > So, if I had: > > User: JohnDoe; age=32; nickname="Billy 'the' Kid"; haircolor=orange; > > I would need: > > User - "JohnDoe" - age - "32" - nickname - "Billy 'the' Kid" - haircolor - > "orange" > > in the outputted array. I have no idea how to do repeating patterns like > this...maybe I'm making this too complex? > > Thanks for your help! > > Lewis > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strings and php.ini
(B"Khalid El-Kary" <[EMAIL PROTECTED]> wrote: (B> hi, (B> infact i'm un (B> able to obtain a copy of my hosting company's php.ini (B (BThen, perhaps, try running phpinfo() and compare. (B (BI think it might even have something to do with "register_globals". (B (B- E (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php, frames
Hello, I could use some help. I have two framed pages, upperframe.html and lowerframe.html. In upper frame.html: echo ""; echo "IDSubjectOpenClose"; while($row = MySQL_fetch_array($result)) { echo ""; echo "{$row['id']}"; ?? echo "{$row['subject']}"; echo "{$row['open']}"; echo "{$row['close']}"; } echo ""; I display the content of the main table, which has an autoincrement index. For every index I have another table, something like tableID. What I want is to press on the id from a row in upperframe table and to display in lowerframe the tableID. How can I do that? Thanks a lot, Adrian
[PHP] Re: php, frames
Adrian, one thing you can do is point the tag to a target of the lower frame and in the lower frame you can look for the tableID and get the information from the database. echo "{$row['id']}"; then you could do something like: if ($tableID) { $query = mysql_query("SELECT......WHERE tableID = '$tableID'"); while ($row = mysql_fetch_array($query)){ ... display something ... } } --aaron "Adrian Partenie" <[EMAIL PROTECTED]> wrote in message 004b01c28d67$52fe9880$0bc46150@olimp">news:004b01c28d67$52fe9880$0bc46150@olimp... Hello, I could use some help. I have two framed pages, upperframe.html and lowerframe.html. In upper frame.html: echo ""; echo "IDSubjectOpenClose"; while($row = MySQL_fetch_array($result)) { echo ""; echo "{$row['id']}"; ?? echo "{$row['subject']}"; echo "{$row['open']}"; echo "{$row['close']}"; } echo ""; I display the content of the main table, which has an autoincrement index. For every index I have another table, something like tableID. What I want is to press on the id from a row in upperframe table and to display in lowerframe the tableID. How can I do that? Thanks a lot, Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache 2 and PHP 4.2.3.
Hi! When I am laoding php as module: LoadModule php4_module c:/php/sapi/php4apache2.dll I get the following error: Apache.exe: module "c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" is not compatible with this version of Apache (found 20020628, need 20020903). Please contact the vendor for the correct version. What I am doing wrong? Thanx in advance Horst -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] InstallShield
Hello People! I am still struggling to get PHP up and running. I have used Installshield and all the defaults suggested. I am using Dreamweaver which in turn uses IIS at LocalHost. I use the suggested code :- Running under win2000 and IIS. PHP Test 3 "; ?> I receive the following error :- "Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive." I went to my PHP.INI file (Despite the InstallShield saying I needn't) and this is what I found:- ; The root of the PHP pages, used only if nonempty. ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root ; if you are running php as a CGI under any web server (other than IIS) ; see documentation for security issues. The alternate is to use the ; cgi.force_redirect configuration below doc_root = ; The directory under which PHP opens the script using /~usernamem used only ; if nonempty. user_dir = ; Directory in which the loadable extensions (modules) reside. extension_dir = ./ ; Whether or not to enable the dl() function. The dl() function does NOT work ; properly in multithreaded servers, such as IIS or Zeus, and is automatically ; disabled on them. enable_dl = On ; cgi.force_redirect is necessary to provide security running PHP as a CGI under ; most web servers. Left undefined, PHP turns this on by default. You can ; turn it off here AT YOUR OWN RISK ; **You CAN safely turn this off for IIS, in fact, you MUST.** ; cgi.force_redirect = 1 cgi.force_redirect = 0 As we can see I MUST turn cgi.force_redirect to off and indeed it is. I therefore don't understand the security alert. The doc_root = is as InstallShield installed it. I have tried C:/PHP with no change in results. Could someone please explain what I am doing wrong and suggest a solution. Many thanks Bob G. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache 2 and PHP 4.2.3.
In short - looks as if your version of Apache 2 is out of date. You're using a version from 28th June, the PHP dll was built against a version from 3rd September. Danny. - Original Message - From: "Horst Gassner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 16, 2002 12:06 PM Subject: [PHP] Apache 2 and PHP 4.2.3. > Hi! > > When I am laoding php as module: > LoadModule php4_module c:/php/sapi/php4apache2.dll > > I get the following error: > Apache.exe: module "c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" is not > compatible with this version of Apache (found 20020628, need 20020903). > Please contact the vendor for the correct version. > > What I am doing wrong? > > Thanx in advance > Horst > > > -- > 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
Re: [PHP] Re: GD 1.5
Actually, GD2 can be compiled (after a patch) to read/write GIFs with LZW compression (the LZW algorithm is the root of the legal iffyness), but (AFAIK) you're only legally allowed to enable it if you live outside the US & Canada. AFAIK only FreeBSD's ports system does this atm. - Original Message - From: "Mako Shark" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 15, 2002 7:18 PM Subject: [PHP] Re: GD 1.5 > < he/she should not be using GIF at all!>> > > This is leading me to believe that I can't use GIFs > because of these issues. Is this true? I know now that > Unisys (Unisys?) made a fuss about some compression or > whatever, but someone told me it was still okay to use > old GDs (am I naive? maybe). Is it now considered > piracy to use GIFs at all? Does this mean I have to > switch over to JPGs, even those images that compress > better with GIFs? I just assumed we were still > permitted, what with Jasc and everybody still allowing > it in their products. Is JPEG (or PNG) the way to go? > I hesitate using PNGs since they seem to be the > least-supported out of the 'big three'. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strings and php.ini
hi, the script infact never used register_globals because it's a class that has nothing to do with the direct script input, but there's an idea that came to my mind, maybe the company compiled its own PHP? may this change anything? generally is Linux different from windows in String functions? encoding for example? thanx edwin, and sorry for writing so unpercise questions khalid _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: POSIX and PCRE help
Aaron, Thanks for the advise, but I'm got a problem. If I first split it up by /;/, how do I catch it if there's a semi-colon inside a string? Lewis "Aaron" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Lewis, > > First I would look at breaking out the tags: > > // User: JohnDoe; age=32; nickname="Billy 'the' Kid"; haircolor=orange; > > $string = 'User: JohnDoe; age=32; nickname="Billy \'the\' Kid"; > haircolor=orange;'; > $stringArray = preg_split('/;/', $string, -1, PREG_SPLIT_NO_EMPTY); > > Then split by the = or : > > // split by = or : > > foreach ($stringArray as $item) { > list($tag, $element) = preg_split('/\:|\=/', $item, 1, > PREG_SPLIT_NO_EMPTY); > echo "$tag => $element"; > } > > -aaron > > "Orangehairedboy" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I am trying to learn more about regular expressions as I haven't used them > > much in the past. I am working with email, and I'm looking for a way to > > split the following expression up: > > > > Content-Type: text/plain; boundary="whatever"; > > > > Using "/^(\S+)\:\s*(.+)$/iU" I can split it into: > > > > [Content-Type] and [text/plain; boundary="whatever";] > > > > Problem is, it might have different tags. Here's a sketch of the whole > > thing: > > > > [Header Name a-zA-Z0-9] [\s*] [:] [\s*] [ Header value a-zA-Z0-9/_ ] [\s*] > > [;] [ unlimited repeating pattern of ( [Property Name a-zA-Z0-9] [\s*] [=] > > [\s*] ( string optionally surrounded by quotes - but necessary if value > has > > spaces - but can't include quotes ) [\s*] [;] ) ] > > > > So, if I had: > > > > User: JohnDoe; age=32; nickname="Billy 'the' Kid"; haircolor=orange; > > > > I would need: > > > > User - "JohnDoe" - age - "32" - nickname - "Billy 'the' Kid" - haircolor - > > "orange" > > > > in the outputted array. I have no idea how to do repeating patterns like > > this...maybe I'm making this too complex? > > > > Thanks for your help! > > > > Lewis > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strings and php.ini
Hello, (B (B"Khalid El-Kary" <[EMAIL PROTECTED]> wrote: (B (B> hi, (B> the script infact never used register_globals because it's a (B> class that has nothing to do with the direct script input, but (B> there's an idea that came to my mind, maybe the company (B> compiled its own PHP? may this change anything? (B (BIt's not impossible but I don't think they would really do that. Maybe you (Bshould ask them. Or, run phpinfo() and check. Did you check? What did you (Bfind out? (B (B> generally is Linux different from windows in String functions? (B (BGenerally no, I don't think so. (B (B> encoding for example? (B (BIt's possible that they are different but you can check phpinfo(). (B (BAlso, if you're using multi-byte functions there's a possibility that your (Bthe company you're using did not compile php with this feature enabled. (B (B> thanx edwin, and sorry for writing so unpercise questions (B (BWell, later when you are ready to ask precise or specific questions, I'm (Bsure a lot more people will help you :-) (B (BAnyway, as I have mentioned earlier, run phpinfo() in Windows and in Linux (Bthen compare them. THEN, you might just find out what's causing the (Bproblem... (B (B- E (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] longitude/latitude function
Just a note to keep in the back of your mind. Unless I'm mistaken MapQuest prints out road miles to a location. The formula prints out direct (or as the crow flies) miles. There will almost always be differences between the two. Fred Steinkopf - Original Message - From: "Aaron Gould" <[EMAIL PROTECTED]> To: "Edward Peloke" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, November 15, 2002 11:49 AM Subject: Re: [PHP] longitude/latitude function > I got that from http://freshmeat.net/projects/zipdy/?topic_id=66. It's a > program called Zipdy that does these calculations. There's also a similar > function on the US government census site (can't remember where though), but > I liked Zipdy's better. > > -- > Aaron Gould > [EMAIL PROTECTED] > Web Developer > Parts Canada > > > - Original Message - > From: "Edward Peloke" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, November 15, 2002 11:55 AM > Subject: RE: [PHP] longitude/latitude function > > > > Thanks Aaron, > > > > If you don't mind me asking, where did you get it? It seems to give a > > better answer than my function. > > > > Thanks! > > Eddie > > > > -Original Message- > > From: Aaron Gould [mailto:[EMAIL PROTECTED]] > > Sent: Friday, November 15, 2002 11:04 AM > > To: Edward Peloke; [EMAIL PROTECTED] > > Subject: Re: [PHP] longitude/latitude function > > > > > > Try this snippet... I can't vouch for its accuracy since I am not a > > mathematician: > > > > > // Function takes latitude and longitude of two places as input > > // and prints the distance in miles and kms. > > function calculateDistance($lat1, $lon1, $lat2, $lon2) > > // Convert all the degrees to radians > > $lat1 = deg2rad($lat1); > > $lon1 = deg2rad($lon1); > > $lat2 = deg2rad($lat2); > > $lon2 = deg2rad($lon2); > > > > // Find the deltas > > $delta_lat = $lat2 - $lat1; > > $delta_lon = $lon2 - $lon1; > > > > // Find the Great Circle distance > > $temp = pow(sin($delta_lat / 2.0), 2) + cos($lat1) * cos($lat2) * > > pow(sin($delta_lon / 2.0), 2); > > > > $EARTH_RADIUS = 3956; > > > > $distance = ($EARTH_RADIUS * 2 * atan2(sqrt($temp), sqrt(1 - $temp)) * > > 1.6093); > > > > return $distance; > > } > > ?> > > > > > > -- > > Aaron Gould > > [EMAIL PROTECTED] > > Web Developer > > Parts Canada > > > > > > - Original Message - > > From: "Edward Peloke" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Friday, November 15, 2002 11:20 AM > > Subject: [PHP] longitude/latitude function > > > > > > > Has anyone ever written a php function to take the longitude and > latitude > > of > > > two destinations and calculate the distance? > > > > > > I am working on one but the output is just a little off. > > > > > > Thanks, > > > Eddie > > > > > > > > > -- > > > 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 > > > > > > -- > > 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 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Form variables not working
I am havein troubles gettin my form variables to work. The "register_globals" in php.ini is set to its default of "off". code: Form Series - Example One asdasdasddassad the dosent print anything in the action of the form and the echo $_POST["answered"]; on the first run gives an error that says that "answered" is an undefined variable. but on the second submit this error is gone with the submitted data displaying correctly. Im an experianced ASP developer and im getting frustrated with PHP. why is it so dificult to do the simplest things in php? please help with simple forms in php that is configured by default to have "register_globals" set to off. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form variables not working
Because it isn't? Instead of echoing $PHP_SELF, echo $_SERVER['PHP_SELF']. With the $_POST problem, it's complaining that you're using a variable that isn't defined. Use? if(array_key_exists('formfieldnamegoeshere',$_POST)){ print $_POST['formfieldnamegoeshere']; } ?> Chris Jackson wrote: Im an experianced ASP developer and im getting frustrated with PHP. why is it so dificult to do the simplest things in php? thanks -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form variables not working
At 17:36 16.11.2002, Chris Jackson said: [snip] >I am havein troubles gettin my form variables to work. >The "register_globals" in php.ini is set to its default of "off". > >the dosent print anything in the action of the form That's because register_globals is off :) The PHP_SELF value is contained in the $_SERVER superglobal array and you may access it anytime, everywhere as $_SERVER['PHP_SELF']. >and the >echo $_POST["answered"]; on the first run gives an error that says that >"answered" is >an undefined variable. but on the second submit this error is gone with the >submitted data >displaying correctly. This is not an error you see but a Notice or Warning that you are using a variable (or an array index) that has not been defined yet. While this is not necessary in this siziation it might point out a possible source of problems under other circumstances, allowing you to spot why your script doesn't work as expected. You could either if (array_key_exists('answered', $_POST)) to avoid the warning, or error_reporting(E_ALL & ~(E_NOTICE|E_WARNING)) to switch off notices or warnings for this script, if you are prepared to do so... >Im an experianced ASP developer and im getting frustrated with PHP. why is >it so dificult >to do the simplest things in php? It's not difficult at all, it's just slightly different to ASP. You'll love PHP, promised... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: session handling
Session-vars won't work on my pages either. Tried your suggested code, but get the following errors in my browser: Page 1: Warning: open(/tmp\sess_22b746f8ee84cf7aadb8da0b37ce9d2a, O_RDWR) failed: m (2) in c:\apache group\apache\htdocs\system\kode\test.php on line 2 Page 2: Warning: open(/tmp\sess_22b746f8ee84cf7aadb8da0b37ce9d2a, O_RDWR) failed: m (2) in c:\apache group\apache\htdocs\system\kode\ident.php on line 2 I have no other code on my pages. I'm running Apache 1.3.26, PHP 4.0.5 on WinXPpro. Configuration problem?? Lars "Orangehairedboy" <[EMAIL PROTECTED]> skrev i melding [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Here's what you need: > > on page 1.php: > > session_start(); > $temp = 'someValue'; > session_register("temp"); > ?> > > on page 2.php: > > session_start(); > print $temp; /* PHP sets the variables back the way they were for you! */ > ?> > > You have to register the variable with the session first so it knows that > it's a variable that needs monitored and, when the script finishes, needs > saved. > > Hope this helps! > > Lewis > > "Anjali Kaur" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > i want to access some variables generated in one page > > in all the other pages, so i thought of using > > $_SESSION. > > > > what i did is : > > > > in page1.php i do: > > > >$temp = 'someValue'; > >session_start(); > >$_SESSION['abc'] = $temp; > > > > > > in page2.php : > > > > session_start(); > > echo($_SESSION['abc']); > > > > > > but i am not able to get the value of abc. > > > > please help me out. i went thru the documentation > > online but cudnt grasp much as to where i am going > > wrong. > > > > thank you. > > anjali. > > > > > > __ > > Do you Yahoo!? > > Yahoo! Web Hosting - Let the expert host your site > > http://webhosting.yahoo.com > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: How to cache PHP on Apache
My header looks just like this: HTTP/1.0 200 OK Date: Sat, 16 Nov 2002 16:45:29 GMT Server: Apache/1.3.20 (Win32) PHP/4.0.6 Cache-Control: max-age=3600 Expires: Sat, 16 Nov 2002 17:45:29 GMT X-Powered-By: PHP/4.0.6 Content-Type: text/html And yes, we use sessions. So, setting session_cache_limiter() to "public" should solve my problem? The pragma header is what is missing? Instead of changing the code, could i use Apache´s mod_header to do the job? Thank you for the help! Luanna >Do you use sessions? If so, try using session_cache_limiter() function. >Otherwise connect directly to >apache with telnet and see the headers yourself. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form variables not working
On Sunday 17 November 2002 00:36, Chris Jackson wrote: > I am havein troubles gettin my form variables to work. > The "register_globals" in php.ini is set to its default of "off". [snip] > the dosent print anything in the action of the > form and the Because register globals is disabled you have to use $_SERVER['PHP_SELF'], that's covered in the manual. > echo $_POST["answered"]; on the first run gives an error that says that > "answered" is > an undefined variable. That's because the first time you run it you have not submitted a form yet so it's undefined. Various ways to get around this, most straight forward (IMO) being: if (isset($_post['answered'])) { echo $_post['answered']; } -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* This is a test of the emergency broadcast system. Had there been an actual emergency, then you would no longer be here. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session handling
At 18:04 16.11.2002, Lars Espelid said: [snip] >Session-vars won't work on my pages either. >Tried your suggested code, but get the following errors in my browser: > >Page 1: >Warning: open(/tmp\sess_22b746f8ee84cf7aadb8da0b37ce9d2a, O_RDWR) failed: m >(2) in c:\apache group\apache\htdocs\system\kode\test.php on line 2 > > >Page 2: >Warning: open(/tmp\sess_22b746f8ee84cf7aadb8da0b37ce9d2a, O_RDWR) failed: m >(2) in c:\apache group\apache\htdocs\system\kode\ident.php on line 2 It looks as if you have either no /tmp directory (HIGHLY unlikely ;->), or the user account apache runs in doesn't have the necessary rights for the /tmp folder. Set the access mode for the session directory (here: /tmp) to rwxrwxrwx to allow anyone to read/write it. However it's better to have a dedicated directory for PHP session files, for security reasons (sensitive data may be stored there). On our servers, I have: session.save_path /tmp/session.php ls -ald /tmp/session.php gives: drwx--2 apache apache 16384 Nov 16 17:35 /tmp/session.php allowing full access only to user "apache", and no one else. >I have no other code on my pages. >I'm running Apache 1.3.26, PHP 4.0.5 on WinXPpro. > >Configuration problem?? Ups - yes, it's a config problem. On Win32 there's no directory /tmp, you need to set some other directory in php.ini file, e.g. C:/TEMP. What I said above for /tmp/session.php and the access rights holds true for Win32 as well. Create an own directory for PHP session files, and set access rights tightly, granting only the Apache user full access, denying anyone else. Also set the owner of this directory to the Apache user. Using the "Services" control panel, make sure Apache doesn't run under the "system" or "Administrator" account, create a user for the Apache service and grant the necessary rights (e.g. "allowed to run as a service", "may log on locally", etc). -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I'm in need of a PHP web host recommendation
Jason Reid wrote: I suggest paying a visit to www.webhostingtalk.com and search the forums... theres tons of information on the large, and small hosts that might help. I use www.phpwebhosting.com and have been happy with them so far. $10 a month, but they are generous (and flexible, at least so they say) about space and bandwidth. jck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 16 Nov 2002 18:12:11 -0000 Issue 1708
php-general Digest 16 Nov 2002 18:12:11 - Issue 1708 Topics (messages 124702 through 124732): Re: Javascript + PHP 124702 by: Jason Wong Forms and Sessions not working 124703 by: Chris Jackson 124707 by: Jason Wong POSIX and PCRE help 124704 by: OrangeHairedBoy 124713 by: Aaron 124722 by: OrangeHairedBoy Re: what else do i need in this upload script? 124705 by: Jason Wong Re: session handling 124706 by: OrangeHairedBoy 124728 by: Lars Espelid 124731 by: Ernest E Vogelsinger Re: I'm in need of a PHP web host recommendation 124708 by: OrangeHairedBoy 124712 by: Jason Reid 124732 by: John Kenyon Re: Reasons for error message: Warning: Failed opening '/www/servers/webGNOM/test.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0 124709 by: Jason Wong Re: Relaying variables to distant site 124710 by: Mike MacDonald Re: Strings and php.ini 124711 by: Khalid El-Kary 124714 by: . Edwin 124721 by: Khalid El-Kary 124723 by: . Edwin php, frames 124715 by: Adrian Partenie 124716 by: Aaron Apache 2 and PHP 4.2.3. 124717 by: Horst Gassner 124719 by: Danny Shepherd InstallShield 124718 by: Bob G Re: GD 1.5 124720 by: Danny Shepherd Re: longitude/latitude function 124724 by: Frederick L. Steinkopf Form variables not working 124725 by: Chris Jackson 124726 by: Leif K-Brooks 124727 by: Ernest E Vogelsinger 124730 by: Jason Wong Re: How to cache PHP on Apache 124729 by: Luanna Silva 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 --- On Saturday 16 November 2002 07:07, SED wrote: > I need to finish a project using PHP and JavaScript but the references > for JavaScript I'm using is rather old. I'm looking for a JavaScript > postlist similar to this but without any luck. I have tried Google but > it finds every site containing JavaScript where a postlist is mentioned. > Since there are many pros on this list, maybe someone can point me to a > JavaScript postlist similar to this. google for 'javascript weenie' -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The ends justify the means. -- after Matthew Prior */ --- End Message --- --- Begin Message --- Hi all: Im new to php and i have an isue. php4.2.3 windows 2000 advanced server I create a simple form page that posts back to its self and im unable to retreive the posted form data to display on the page. it seems like all my GLOBAL amd SESSION stuff isnt working. sample code: Your Name Im thinking that it may be a setting in the php.ini file but i dont know.. Please help. Thanks. --- End Message --- --- Begin Message --- On Saturday 16 November 2002 15:11, Chris Jackson wrote: > Hi all: > Im new to php and i have an isue. > > php4.2.3 windows 2000 advanced server > > > I create a simple form page that posts back to its self and im unable to > retreive the posted form data to display on the page. > > it seems like all my GLOBAL amd SESSION stuff isnt working. > sample code: > > > > Your Name > doesn't acutally do anything (that you can see), you need And if you still don't see anything then ... > Im thinking that it may be a setting in the php.ini file but i dont know.. ... enable register_globals in php.ini. But before you do, READ the notes in php.ini AND also the manual about register globals. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The proof of the pudding is in the eating. -- Miguel de Cervantes */ --- End Message --- --- Begin Message --- I am trying to learn more about regular expressions as I haven't used them much in the past. I am working with email, and I'm looking for a way to split the following expression up: Content-Type: text/plain; boundary="whatever"; Using "/^(\S+)\:\s*(.+)$/iU" I can split it into: [Content-Type] and [text/plain; boundary="whatever";] Problem is, it might have different tags. Here's a sketch of the whole thing: [Header Name a-zA-Z0-9] [\s*] [:] [\s*] [ Header value a-zA-Z0-9/_ ] [\s*] [;] [ unlimited repeating pattern of ( [Property Name a-zA-Z0-9] [\s*] [=] [\s*] ( string optionally surrounded by quotes - but necessary if value has spaces - but can't include quotes ) [\s*] [;] ) ] So, if I had: User: JohnDoe; age=32; nickname="Billy 'the' Kid"; haircolor=orange; I would need:
[PHP] Fractions
I'm wanting to make a simple PHP script that converts Celsius to Farenheit, Farenheit to Celsius, Farenheit to Kelvin, and Celsius to Kelvin. I have the formula but it requires fractions. How can I use frations in PHP to multiply or divide? If you can't, how could I substitute doing so? 5/9 (F - 32) is the forumla to get Celsius to Farenheit if you need it. Thanks,Stephen Cratonhttp://www.melchior.us "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Fractions
You gotta be kidding me, no? When did you learn decimals? I think I started by 3rd or 4th grade ... -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 1:36 PM To: PHP List Subject: [PHP] Fractions I'm wanting to make a simple PHP script that converts Celsius to Farenheit, Farenheit to Celsius, Farenheit to Kelvin, and Celsius to Kelvin. I have the formula but it requires fractions. How can I use frations in PHP to multiply or divide? If you can't, how could I substitute doing so? 5/9 (F - 32) is the forumla to get Celsius to Farenheit if you need it. Thanks, Stephen Craton http://www.melchior.us "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us
Re: [PHP] Fractions
Supposing you want to display the numbers as decimal values: $celsius = ($farenheit - 32) * 5 / 9; Unless, of course, I did not understand your question properly. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Check us out on the web at http://www.phparch.com On Sat, 2002-11-16 at 13:35, Stephen wrote: > I'm wanting to make a simple PHP script that converts Celsius to Farenheit, Farenheit to Celsius, Farenheit to Kelvin, and Celsius to Kelvin. I have the formula but it requires fractions. How can I use frations in PHP to multiply or divide? If you can't, how could I substitute doing so? 5/9 (F - 32) is the forumla to get Celsius to Farenheit if you need it. > > Thanks, > Stephen Craton > http://www.melchior.us > > "Life is a gift from God. Wasting it is like destroying a gift you got from the >person you love most." -- http://www.melchior.us > > > -- > 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
RE: [PHP] Fractions
Well, seeing as you're in the 7th or 8th grade (at least according to your Website) - my sincere apologies ... Just use 5.0/9.0 in your formula. Mark C. -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 1:36 PM To: PHP List Subject: [PHP] Fractions I'm wanting to make a simple PHP script that converts Celsius to Farenheit, Farenheit to Celsius, Farenheit to Kelvin, and Celsius to Kelvin. I have the formula but it requires fractions. How can I use frations in PHP to multiply or divide? If you can't, how could I substitute doing so? 5/9 (F - 32) is the forumla to get Celsius to Farenheit if you need it. Thanks, Stephen Craton http://www.melchior.us "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us
Re: [PHP] can I retrieve jsp varibable with get or post???
thanks - yes I do understand the code you placed. OK - can I take the JSP variable with a post or a get? are these just general http variables? Jeff "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > php => javascript > 1st way: > > var var_name= = $var_value ?> > > 2nd way: > > > javascript => php > 1st way: > location='http://server/script.php?var_name="; + js_var_name; > 2nd way: > form_name.input_name.value = js_var_name; > > hope you get the point :-) > > Jeff Bluemel wrote: > > >Can I utilize java script variables with get or post? any information on > >integrating the 2, and passing info back & forth? > > > >thanks, > > > >Jeff > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sendmail problem
anybody??? still haven't gotten this figure out. Jeff "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > OK - I got the rasmail codes from Zend.com's code library. it is working > perfectly for my application except for one problem. the email I am using > to send has a .pdf file attachment. > > I can open that PDF file up directly from the site after it is created, but > I cannot open the file attachment up. it seems the coding is wrong of > something like that so that the attachment is getting corrupted. > > I have emailed the author for assistance, but haven't receive a response. > I'm hoping somebody here can assist me. > > here is the part of code; > > function Attachment($attachedfile) { > if ($attachedfile) { > $pf=@fopen($attachedfile,"r") or die($this->ErrorOutput(9)); > $bytes=fread($pf,filesize($attachedfile)); > $file=chunk_split(base64_encode($bytes)); > fclose($pf); > } > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: GD 1.5
Only writing is an issue. PHP 4.3's bundled GD2 library supports gif-reads. And the patent actually expires in 2003 so we'll be able to roll in gif-writes next year. -Rasmus On Sat, 16 Nov 2002, Danny Shepherd wrote: > Actually, GD2 can be compiled (after a patch) to read/write GIFs with LZW > compression (the LZW algorithm is the root of the legal iffyness), but > (AFAIK) you're only legally allowed to enable it if you live outside the US > & Canada. AFAIK only FreeBSD's ports system does this atm. > > > - Original Message - > From: "Mako Shark" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, November 15, 2002 7:18 PM > Subject: [PHP] Re: GD 1.5 > > > > < > he/she should not be using GIF at all!>> > > > > This is leading me to believe that I can't use GIFs > > because of these issues. Is this true? I know now that > > Unisys (Unisys?) made a fuss about some compression or > > whatever, but someone told me it was still okay to use > > old GDs (am I naive? maybe). Is it now considered > > piracy to use GIFs at all? Does this mean I have to > > switch over to JPGs, even those images that compress > > better with GIFs? I just assumed we were still > > permitted, what with Jasc and everybody still allowing > > it in their products. Is JPEG (or PNG) the way to go? > > I hesitate using PNGs since they seem to be the > > least-supported out of the 'big three'. > > > -- > 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
[PHP] Re: session handling
Hey you may want to try in page2.php : session_start(); echo('{$_SESSION['abc']}'); Lee "Anjali Kaur" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > i want to access some variables generated in one page > in all the other pages, so i thought of using > $_SESSION. > > what i did is : > > in page1.php i do: > >$temp = 'someValue'; >session_start(); >$_SESSION['abc'] = $temp; > > > in page2.php : > > session_start(); > echo($_SESSION['abc']); > > > but i am not able to get the value of abc. > > please help me out. i went thru the documentation > online but cudnt grasp much as to where i am going > wrong. > > thank you. > anjali. > > > __ > Do you Yahoo!? > Yahoo! Web Hosting - Let the expert host your site > http://webhosting.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Forms and Sessions not working
Hi, If your register_globals is off then you will need to use $_GETand $_POST to get the data from the form. echo $_POST['Name']; Lee "Chris Jackson" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all: > Im new to php and i have an isue. > > php4.2.3 windows 2000 advanced server > > > I create a simple form page that posts back to its self and im unable to > retreive the posted form data to display on the page. > > it seems like all my GLOBAL amd SESSION stuff isnt working. > sample code: > > > > Your Name > > > > > Im thinking that it may be a setting in the php.ini file but i dont know.. > Please help. > > Thanks. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with base64_encode and windows
OK... I'm using base64_encode to encode a file on the linux side. however, outlook express does not seem to unencode the file properly. I'm wondering how to work around this problem. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] output buffering problem
webmaster [EMAIL PROTECTED] on 11/15/02 3:47 PM wrote: > I'm trying to enable output buffering to speed up the load time of some > of our php web pages. I've consulted the manual and enabled the > following: The manual lacks description for this topic. Take a look at this article at Developer Shed, it got me up and running within 10 minutes. http://www.devshed.com/Server_Side/PHP/OutputBuffering/page1.html HTH, ck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sendmail problem
Hello, On 11/16/2002 04:53 PM, Jeff Bluemel wrote: anybody??? still haven't gotten this figure out. You may want to try this class and mail me back if it does not work: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Jeff "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... OK - I got the rasmail codes from Zend.com's code library. it is working perfectly for my application except for one problem. the email I am using to send has a .pdf file attachment. I can open that PDF file up directly from the site after it is created, but I cannot open the file attachment up. it seems the coding is wrong of something like that so that the attachment is getting corrupted. I have emailed the author for assistance, but haven't receive a response. I'm hoping somebody here can assist me. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imap_fetchstructure problem
Hi, I'm using php 4.2.3 with courier-imap, when I run the function imap_fetchstructure the return for 'type' and 'subtype' variables are always text/plain even when the content type says multipart/mixed, text/html, etc... The same happends with the 'parts' array, empty all the time. I tried diferent php, from 4.1.0 to 4.2.3. I'm running apache 1.3.27. This is an example of the returning values after an imap_fetchstructure with a multipart/related content type: -- type = 0 subtype = PLAIN ifsubtype = 1 encoding = 1 parts = imap_fetchheader: CONTENT-TYPE: MULTIPART/RELATED; BOUNDARY=" =_NEXTPART_94915C5ABAF209EF376268C8" --- Any ideas ? Thanks! *** AVISO LEGAL Este mensaje es privado y confidencial y solamente para la persona a la que va dirigido. Si usted ha recibido este mensaje por error, no debe revelar, copiar, distribuir o usarlo en ningún sentido. Le rogamos lo comunique al remitente y borre dicho mensaje y cualquier documento adjunto que pudiera contener. No hay renuncia a la confidencialidad ni a ningún privilegio por causa de transmisión errónea o mal funcionamiento. Cualquier opinión expresada en este mensaje pertenece únicamente al autor remitente y no representa necesariamente la opinión de GALFIN S.A. (Galfín Sociedad de Bolsa) a no ser que expresamente se diga y el remitente esté autorizado para hacerlo. Los correos electrónicos no son seguros, no garantizan la confidencialidad ni la correcta recepción de los mismos dado que pueden ser interceptados, manipulados, destruidos, llegar con demora o incompletos o con virus. GALFIN S.A. (Galfín Sociedad de Bolsa) no se hace responsable de los cambios, alteraciones, errores u omisiones que pudieran hacerse al mensaje una vez enviado. Este mensaje sólo tiene una finalidad de información y no debe interpretarse como una oferta de venta o de compra de valores ni de instrumentos financieros relacionados. (llámese orden de pago, autorización de débito, etc).- *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Display cell if dates are between 2 dates - help
Dear all I'm trying to create a search function that can check the current day in a calendar against a mysql database where there is a startdate and enddate and if the date is there then colour code the cell in the calendar. I have tried to use the following command $eventQuery = "SELECT title FROM prestigecal WHERE '$sql_currentday' BETWEEN startdate AND enddate;"; The database has an ID - title - startdate - enddate This seems to work BUT if the date in the database is a single number i.e. 0 to 9 it cannot dispaly it and also if the startdate or endate is a 10, 20 or 30 it also thinks that it is a 1, 2or 3 Just in case it helps the full codede for this section is as follows : /snip $sql_currentday = "$year-$month-$zz"; $eventQuery = "SELECT title FROM prestigecal WHERE '$sql_currentday' BETWEEN startdate AND enddate;"; $eventExec = mysql_query($eventQuery); while($row = mysql_fetch_array($eventExec)) { if (strlen($row["title"]) > 0) { echo "$zz\n"; $result_found = 1; /snip Thanks for any advice. Ray
[PHP] Php Form Issue
Hello, I've managed to get a series of javascripts to work exactly as I wanted. They check all and uncheck all checkboxes with a single click of a control checkbox. Unfortunately, the information has to be sent to php. As soon as I add the [] brackets to an input name, the javascript no longer functions. I'll look up a javascript mailing list next, but I figured there must be some other way to get php to recieve the data and convert it to an array. Does anyone have an idea how I can make the php script gather all the multiple &browser=lynx&browser=mosaic&browser=explorer instead of only the last entry? Thanks for any help, Keith
Re: [PHP] Fractions
9/5 and 5/9 would be a repeating deicmal. I find fractions would be easier to multiply then a repeating deicmal. That's why I asked how to use fractions... - Original Message - From: Mark Charette To: Stephen ; PHP List Sent: Saturday, November 16, 2002 1:44 PM Subject: RE: [PHP] Fractions Well, seeing as you're in the 7th or 8th grade (at least according to your Website) - my sincere apologies ... Just use 5.0/9.0 in your formula. Mark C. -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 1:36 PM To: PHP List Subject: [PHP] Fractions I'm wanting to make a simple PHP script that converts Celsius to Farenheit, Farenheit to Celsius, Farenheit to Kelvin, and Celsius to Kelvin. I have the formula but it requires fractions. How can I use frations in PHP to multiply or divide? If you can't, how could I substitute doing so? 5/9 (F - 32) is the forumla to get Celsius to Farenheit if you need it. Thanks, Stephen Craton http://www.melchior.us "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us
Re: [PHP] Strings and php.ini
hi, i was asking if there should be difference in functionality of PH string functions (not mb_) between the two following configurations: the company: PHP 4.2.1, Apache 1.3.20, linux me: PHP 4.2.3, Apache 1.3.24, windows my confthe company's conf thread safety Enabled Disabled allow_call_time_pass_reference off On implicit_flush on off log_errors off on magic_qoutes_gpc off on register_globals off on thanx khalid _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Register_globals = off-compliant form class?
I'm looking for a good class for forms that will work with register_globals off. I was planning to modify Manuel Lemos's class, but it turned out to be too big of a task. Any ideas? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php Form Issue
Hi Keith: Unfortunately, the information has to be sent to php. As soon as I add the [] brackets to an input name, the javascript no longer functions. I'll look up a javascript mailing list next, but I figured there must be some other way to get php to recieve the data and convert it to an array. If your checkboxes all have the same name i.e. group, then for php to see them, you have to name them group[]. Then you can use something like this to get them out of the array: if (count($group) > 0){ for($i=0; $i < count($group); $i++) { $sql = "INSERT INTO groupImage VALUES "; $sql .= "(0, '$imageID', '$group[$i]')"; mysql_query($sql) or die(mysql_error()); //echo "linked \"$imageName\" to groupID=".$group[$i]." in gi table"; } } you might have to change the js. If you are accessing form elements in js then you can use something like: forms.elements['group[]'] to access the js checkbox array by name. Does anyone have an idea how I can make the php script gather all the multiple &browser=lynx&browser=mosaic&browser=explorer instead of only the last entry? AFAIK varName[] is the only way to go if you want the checkboxes in an array. I suppose you could just give a unique name to each checkbox. I believe that PHP will have a value for those checkboxes that are checked. Then you could loop through your set of checkbox vars and see which have a value. HTH David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display cell if dates are between 2 dates - help
This is how i deal with dates... $date = date in the database. $today = strtotime( gmdate( "Y-m-d" ) ); $spd= 60 * 60 * 24; // seconds per day $fdate = strtotime( substr( $date, 0, 10 ) ); $future = ( $fdate - $today ) / $spd; do the comparision with $future and it should work for yeah... Basically, I convert it all to seconds and do the math... On Sat, 2002-11-16 at 20:10, Ray Healy (Data Net Services) wrote: > Dear all > > I'm trying to create a search function that can check the current day in a calendar >against a mysql database where there is a startdate and enddate and if the date is >there then colour code the cell in the calendar. > > I have tried to use the following command > > $eventQuery = "SELECT title FROM prestigecal WHERE '$sql_currentday' BETWEEN >startdate AND enddate;"; > > The database has an ID - title - startdate - enddate > > This seems to work BUT if the date in the database is a single number i.e. 0 to 9 it >cannot dispaly it and also if the startdate or endate is a 10, 20 or 30 it also >thinks that it is a 1, 2or 3 > > Just in case it helps the full codede for this section is as follows : > > /snip > $sql_currentday = "$year-$month-$zz"; > $eventQuery = "SELECT title FROM prestigecal WHERE '$sql_currentday' BETWEEN >startdate AND enddate;"; > $eventExec = mysql_query($eventQuery); > while($row = mysql_fetch_array($eventExec)) { > if (strlen($row["title"]) > 0) { > echo "face=\"Verdana\">$zz\n"; > $result_found = 1; > /snip > > > Thanks for any advice. > > Ray -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Register_globals = off-compliant form class?
try using pear... On Sat, 2002-11-16 at 22:53, Leif K-Brooks wrote: > I'm looking for a good class for forms that will work with > register_globals off. I was planning to modify Manuel Lemos's class, > but it turned out to be too big of a task. Any ideas? > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt >to decrypt it will be prosecuted to the full extent of the law. -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Register_globals = off-compliant form class?
Hello, On 11/16/2002 08:53 PM, Leif K-Brooks wrote: I'm looking for a good class for forms that will work with register_globals off. I was planning to modify Manuel Lemos's class, but it turned out to be too big of a task. Any ideas? If you wait a few more days, I'll upload the new version that deals with that. It is done but I need to update the documentation as well for a new feature regarding checkbox validated that had requests for. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Java listserve?
Hi Besides the coding I've done in PHP I've been on a Java project for several weeks now. I'm wondering if anyone knows of a good listserve for Java coding related questions like this one. Thanks n Gacki [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mccrypt installation?
Hi people I have a problem installing some extensions on a windows XP machine (Apache 2.0.40 and PHP 4.2.3/MySql 3.23.52). I now have most of the extensions i need installed, although there are a few ones wich i dont get to work? Any idea`s? ;extension=php_mcrypt.dll doesnt work and stil produces a error message.. Thanks Best regards, Davy Obdam mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Insert Date problem
can someone help out a nubIe here - im trying to insert a Date into a MySql table and im having error messages - can you take a look at http://66.139.147.233/thispage.php submit a guest and comment to see error. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php Form Issue
Put the brackets for php... Now, to loop through the elements in JavaScript, you're going to have to do something like this var test = false; for ( i = 0; i < document.forms[0].elements['myname[]'].length; i++ ) //code for whatever you want to do here //if you want to check if at least one of the boxes are checked if ( document.forms[0].elements['myname[]'][i].checked ) { test = true; } } then you can just check to see if "test" is true or false...true if at least on box has been checked, false if none of the boxes have been checked. HTH Keith Spiller wrote: Hello, I've managed to get a series of javascripts to work exactly as I wanted. They check all and uncheck all checkboxes with a single click of a control checkbox. Unfortunately, the information has to be sent to php. As soon as I add the [] brackets to an input name, the javascript no longer functions. I'll look up a javascript mailing list next, but I figured there must be some other way to get php to recieve the data and convert it to an array. Does anyone have an idea how I can make the php script gather all the multiple &browser=lynx&browser=mosaic&browser=explorer instead of only the last entry? Thanks for any help, Keith -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Searching a Table
I need to make a search engine for my site. Instead of making a table with all the words of my content of my reviews, I need to make it simple. How could you search a table of articles (let's say game_reviews) by comparing keywords the user types in, to the text of the article? All the tutorials I can find make a table with a list of words of every single keyword... Thanks,Stephen Cratonhttp://www.melchior.us "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Opening a file to manipulate it
Hello, Extreme newbie here (halfway through my first book :) ). I need to open a file, read the whole file into a variable, manipulate it, and then echo it to the screen. I'm doing it right from my book and it's not working. Here's what I have now: It writes "Resource id #1" at the top of the page. What is that?! :) I have also tried using file(). That displays "Array" on the screen. What am I doing wrong? Thanks! Troy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Searching a Table
Well, if you're using a database, say MySQL, you can look at FREETEXT indexes and queries. If you want to index your web pages, you should be looking at a search engine that works with your web server. For example, ht:dig (http://www.htdig.org/) works with Apache. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Check us out on the web at http://www.phparch.com On Sat, 2002-11-16 at 22:40, Stephen wrote: > I need to make a search engine for my site. Instead of making a table with all the >words of my content of my reviews, I need to make it simple. How could you search a >table of articles (let's say game_reviews) by comparing keywords the user types in, >to the text of the article? All the tutorials I can find make a table with a list of >words of every single keyword... > > > Thanks, > Stephen Craton > http://www.melchior.us > > "Life is a gift from God. Wasting it is like destroying a gift you got from the >person you love most." -- http://www.melchior.us > > > -- > 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
Re: [PHP] Searching a Table
I don't have control of my server, it's hosted. All my content is in a MySQL database and is outputed through a php page that selects the information from an id variable passed through the URL... - Original Message - From: "Marco Tabini" <[EMAIL PROTECTED]> To: "Stephen" <[EMAIL PROTECTED]> Cc: "PHP List" <[EMAIL PROTECTED]> Sent: Saturday, November 16, 2002 10:38 PM Subject: Re: [PHP] Searching a Table > Well, if you're using a database, say MySQL, you can look at FREETEXT > indexes and queries. If you want to index your web pages, you should be > looking at a search engine that works with your web server. For example, > ht:dig (http://www.htdig.org/) works with Apache. > > > Marco > > -- > > php|architect - The magazine for PHP Professionals > The first monthly worldwide magazine dedicated to PHP programmers > Check us out on the web at http://www.phparch.com > > > > On Sat, 2002-11-16 at 22:40, Stephen wrote: > > I need to make a search engine for my site. Instead of making a table with all the words of my content of my reviews, I need to make it simple. How could you search a table of articles (let's say game_reviews) by comparing keywords the user types in, to the text of the article? All the tutorials I can find make a table with a list of words of every single keyword... > > > > > > Thanks, > > Stephen Craton > > http://www.melchior.us > > > > "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us > > > > > > > -- > > 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 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Searching a Table
Ok, then you can use FULLTEXT queries. Take a look here: http://www.mysql.com/doc/en/Fulltext_Search.html Marco On Sat, 2002-11-16 at 22:49, Stephen wrote: > I don't have control of my server, it's hosted. All my content is in a MySQL > database and is outputed through a php page that selects the information > from an id variable passed through the URL... > > > - Original Message - > From: "Marco Tabini" <[EMAIL PROTECTED]> > To: "Stephen" <[EMAIL PROTECTED]> > Cc: "PHP List" <[EMAIL PROTECTED]> > Sent: Saturday, November 16, 2002 10:38 PM > Subject: Re: [PHP] Searching a Table > > > > Well, if you're using a database, say MySQL, you can look at FREETEXT > > indexes and queries. If you want to index your web pages, you should be > > looking at a search engine that works with your web server. For example, > > ht:dig (http://www.htdig.org/) works with Apache. > > > > > > Marco > > > > -- > > > > php|architect - The magazine for PHP Professionals > > The first monthly worldwide magazine dedicated to PHP programmers > > Check us out on the web at http://www.phparch.com > > > > > > > > On Sat, 2002-11-16 at 22:40, Stephen wrote: > > > I need to make a search engine for my site. Instead of making a table > with all the words of my content of my reviews, I need to make it simple. > How could you search a table of articles (let's say game_reviews) by > comparing keywords the user types in, to the text of the article? All the > tutorials I can find make a table with a list of words of every single > keyword... > > > > > > > > > Thanks, > > > Stephen Craton > > > http://www.melchior.us > > > > > > "Life is a gift from God. Wasting it is like destroying a gift you got > from the person you love most." -- http://www.melchior.us > > > > > > > > > > > -- > > > 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 > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] storing mysql-connection data in inc-files
What is the most secure way to store mysql-username / mysql-password data in xxx.inc.php files so that only one hosting-client can read it with phps' file, include, require function? -- Jochen Kaechelin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sendmail problem
Thanks for the reply... it took me a little bit to get this worked out, but it is working perfectly now. I appreciate the assistance. Jeff "Manuel Lemos" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > On 11/16/2002 04:53 PM, Jeff Bluemel wrote: > > anybody??? still haven't gotten this figure out. > > You may want to try this class and mail me back if it does not work: > > http://www.phpclasses.org/mimemessage > > > -- > > Regards, > Manuel Lemos > > > > > Jeff > > > > "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > >>OK - I got the rasmail codes from Zend.com's code library. it is working > >>perfectly for my application except for one problem. the email I am using > >>to send has a .pdf file attachment. > >> > >>I can open that PDF file up directly from the site after it is created, > > > > but > > > >>I cannot open the file attachment up. it seems the coding is wrong of > >>something like that so that the attachment is getting corrupted. > >> > >>I have emailed the author for assistance, but haven't receive a response. > >>I'm hoping somebody here can assist me. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Opening a file to manipulate it
Hello, "Troy May" <[EMAIL PROTECTED]> wrote: > Hello, > > Extreme newbie here (halfway through my first book :) ). I need to open a > file, read the whole file into a variable, manipulate it, and then echo it > to the screen. I'm doing it right from my book and it's not working. > Here's what I have now: > > > echo $header; ?> > > It writes "Resource id #1" at the top of the page. What is that?! :) Check the manual: http://www.php.net/manual/en/function.fopen.php You're echoing the result of fopen() which is an "int"--you have to make sure that you're using the function properly ;) > I have also tried using file(). That displays "Array" on the screen. What > am I doing wrong? I think it's because you're echoing the result of file() which is an array. You cannot just "echo $the_array;" Try print_r($the_array) and you'll see a different result--though I doubt it's the one you want to see :) Check the manual again: http://www.php.net/manual/en/function.file.php Anyway, I think you're looking for something like this: http://www.php.net/manual/en/function.file-get-contents.php Esp. the "User Contributed Notes". HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Trouble with switch statements
This appears to be a register globals problem replace "switch($select)" with "switch($_GET['select'])". For information on register globals and why it has been turned off in later releases see this pagee: http://www.php.net/manual/en/security.registerglobals.php There is nothing syntactically wrong with the switch statment you are just refering to an non-existant variable... I imaginge this came from an outdated book or tutorial. -- JJ Harrison [EMAIL PROTECTED] "Edward Kehoe" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok...I just recently installed Apache1 and PHP 4.2.3 on my computer and I've > configured everything. However, I can't seem to get my switch statements to > accept variable values from the address bar. So if I type in: > > http://www.my-site.com/index.php?select=1 > > It displays the text in the default part of the switch statement. I also > seem to get the following error message every time: > > Notice: Undefined variable: select in c:\apache\apache\htdocs\index.php on > line 51 > > Here's the code for my switch statement as well: > > switch($select) > { > case 1: print "About Stuff Goes Here."; >break; > case 2: print "Music Goes Here."; >break; > default:print "Testing..."; >break; > } > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strings and php.ini
Hello, (B (B"Khalid El-Kary" <[EMAIL PROTECTED]> wrote: (B> hi, (B> i was asking if there should be difference in functionality of PH string (B> functions (not mb_) between the two following configurations: (B> (B> the company: PHP 4.2.1, Apache 1.3.20, linux (B> me: PHP 4.2.3, Apache 1.3.24, windows (B> (B> my confthe company's conf (B> thread safety Enabled Disabled (B> allow_call_time_pass_reference off On (B> implicit_flush on off (B> log_errors off on (B> magic_qoutes_gpc off on (B> register_globals off on (B (BSince I haven't seen any of your code, all I can do is guess. (B (BSo, I think it would be better if you just (B(1) Edit your php.ini. Make the setting the same as the company's. (Later, (Byou might want to look at the way they compiled their php as well.) (B(2) After you finish editing, restart your web server. Then, (B(3) Try running your php scripts again. (B (BIF you are able to run the scripts without any problem THEN the problem lies (Bsomewhere else... (B (B- E (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Insert Date problem
On Sunday 17 November 2002 10:49, Chris Jackson wrote: > can someone help out a nubIe here - im trying to insert a Date into a MySql > table and im having error messages - can you take a look at > http://66.139.147.233/thispage.php submit a guest and comment to see > error. Why don't you copy and paste the error here? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* "The fundamental principle of science, the definition almost, is this: the sole test of the validity of any idea is experiment." -- Richard P. Feynman */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strings and php.ini
On Sunday 17 November 2002 06:27, Khalid El-Kary wrote: > hi, > i was asking if there should be difference in functionality of PH string > functions (not mb_) between the two following configurations: > > the company: PHP 4.2.1, Apache 1.3.20, linux > me: PHP 4.2.3, Apache 1.3.24, windows > magic_qoutes_gpc off on This setting can potentially make a difference. BTW, where possible, please use copy and paste. "magic_qoutes_gpc" should be "magic_quotes_gpc". Introducing spurious typos into does not help in diagnosing anybody's problems. Why don't you say exactly _what_ problems you're having? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Modern man is the missing link between apes and human beings. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 17 Nov 2002 06:13:47 -0000 Issue 1709
php-general Digest 17 Nov 2002 06:13:47 - Issue 1709 Topics (messages 124733 through 124770): Fractions 124733 by: Stephen 124734 by: Mark Charette 124735 by: Marco Tabini 124736 by: Mark Charette 124748 by: Stephen Re: can I retrieve jsp varibable with get or post??? 124737 by: Jeff Bluemel Re: sendmail problem 124738 by: Jeff Bluemel 124744 by: Manuel Lemos 124765 by: Jeff Bluemel Re: GD 1.5 124739 by: Rasmus Lerdorf Re: session handling 124740 by: conbud Re: Forms and Sessions not working 124741 by: conbud problem with base64_encode and windows 124742 by: Jeff Bluemel Re: output buffering problem 124743 by: Colin Kettenacker imap_fetchstructure problem 124745 by: jorgel.galfin.com.uy Display cell if dates are between 2 dates - help 124746 by: Ray Healy \(Data Net Services\) 124752 by: BigDog Php Form Issue 124747 by: Keith Spiller 124751 by: David Rice 124758 by: John Nichel Re: Strings and php.ini 124749 by: Khalid El-Kary 124768 by: . Edwin 124770 by: Jason Wong Register_globals = off-compliant form class? 124750 by: Leif K-Brooks 124753 by: BigDog 124754 by: Manuel Lemos Java listserve? 124755 by: Nancy Gacki Mccrypt installation? 124756 by: Davy Obdam Insert Date problem 124757 by: Chris Jackson 124769 by: Jason Wong Searching a Table 124759 by: Stephen 124761 by: Marco Tabini 124762 by: Stephen 124763 by: Marco Tabini Opening a file to manipulate it 124760 by: Troy May 124766 by: . Edwin storing mysql-connection data in inc-files 124764 by: Jochen Kächelin Re: Trouble with switch statements 124767 by: Noodle Snacks Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- I'm wanting to make a simple PHP script that converts Celsius to Farenheit, Farenheit to Celsius, Farenheit to Kelvin, and Celsius to Kelvin. I have the formula but it requires fractions. How can I use frations in PHP to multiply or divide? If you can't, how could I substitute doing so? 5/9 (F - 32) is the forumla to get Celsius to Farenheit if you need it. Thanks,Stephen Cratonhttp://www.melchior.us "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us --- End Message --- --- Begin Message --- You gotta be kidding me, no? When did you learn decimals? I think I started by 3rd or 4th grade ... -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 1:36 PM To: PHP List Subject: [PHP] Fractions I'm wanting to make a simple PHP script that converts Celsius to Farenheit, Farenheit to Celsius, Farenheit to Kelvin, and Celsius to Kelvin. I have the formula but it requires fractions. How can I use frations in PHP to multiply or divide? If you can't, how could I substitute doing so? 5/9 (F - 32) is the forumla to get Celsius to Farenheit if you need it. Thanks, Stephen Craton http://www.melchior.us "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us --- End Message --- --- Begin Message --- Supposing you want to display the numbers as decimal values: $celsius = ($farenheit - 32) * 5 / 9; Unless, of course, I did not understand your question properly. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Check us out on the web at http://www.phparch.com On Sat, 2002-11-16 at 13:35, Stephen wrote: > I'm wanting to make a simple PHP script that converts Celsius to Farenheit, Farenheit to Celsius, Farenheit to Kelvin, and Celsius to Kelvin. I have the formula but it requires fractions. How can I use frations in PHP to multiply or divide? If you can't, how could I substitute doing so? 5/9 (F - 32) is the forumla to get Celsius to Farenheit if you need it. > > Thanks, > Stephen Craton > http://www.melchior.us > > "Life is a gift from God. Wasting it is like destroying a gift you got from the >person you love most." -- http://www.melchior.us > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- --- Begin Message --- Well, seeing as you're in the 7th or 8th grade (at least according to your Website) - my sincere apologies ... Just use 5.0/9.0 in your formula. Mark C. -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 1:36
Re: [PHP] Fractions
On Sunday 17 November 2002 03:09, Stephen wrote: > 9/5 and 5/9 would be a repeating deicmal. I find fractions would be easier > to multiply then a repeating deicmal. But php doesn't care one bit (and neither should you) whether you use echo ( (5/9) * (80-32) ); OR echo ( 0.6 * (80-32) ); -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* If the code and the comments disagree, then both are probably wrong. -- Norm Schryer */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display cell if dates are between 2 dates - help
On Sunday 17 November 2002 04:10, Ray Healy \(Data Net Services\) wrote: > Dear all > > I'm trying to create a search function that can check the current day in a > calendar against a mysql database where there is a startdate and enddate > and if the date is there then colour code the cell in the calendar. > > I have tried to use the following command > > $eventQuery = "SELECT title FROM prestigecal WHERE '$sql_currentday' > BETWEEN startdate AND enddate;"; > > The database has an ID - title - startdate - enddate What types are the columns 'startdate' and 'enddate'? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* You're ugly and your mother dresses you funny. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Serialization of references to objects
How is serialization of references handled? Example: class foo { var $abc; function bar() { echo $this->abc; } } $obj = array( &new foo(), &new foo() ); $baz = serialize($obj); /* ... dancing monkey for entertainment while time passes ... */ $obj = unserialize($baz); Will references be restored upon unserialization? -js -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unusual HTTP header control
Hello list, I'm hoping someone can shed some light on a problem I'm having with the header() function... I'm building a script to spool MP3 files to Winamp/xmms using the HTTP protocol. And it works fine, except I want to suppress the normal "HTTP/1.1 200 OK" header sent by PHP/Apache and instead send "ICY 200 OK", to fool the player into thinking it's listening to a ShoutCast server... Does anyone know how to do this? The docs on header() don't mention it, nor do the user notes... Any ideas? Thanks! -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Unusual HTTP header control
Not that I've ever used them but wouldn't Sockets be a good place to start? Cheers Brendon -Original Message- From: Morgan Hughes [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 17, 2002 4:40 PM To: PHP General List Subject: [PHP] Unusual HTTP header control Hello list, I'm hoping someone can shed some light on a problem I'm having with the header() function... I'm building a script to spool MP3 files to Winamp/xmms using the HTTP protocol. And it works fine, except I want to suppress the normal "HTTP/1.1 200 OK" header sent by PHP/Apache and instead send "ICY 200 OK", to fool the player into thinking it's listening to a ShoutCast server... Does anyone know how to do this? The docs on header() don't mention it, nor do the user notes... Any ideas? Thanks! -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356 -- 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
RE: [PHP] Unusual HTTP header control
On Sun, 17 Nov 2002, Brendon G wrote: > Not that I've ever used them but wouldn't Sockets be a good place to start? > Cheers > Brendon Possibly, but the rest of the script works well... And I've got more experience feeding files back with PHP, and letting PHP do the heavy lifting for me... ^_^ -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php Form Issue
Hi, on 17/11/02 7:58 AM, Keith Spiller ([EMAIL PROTECTED]) wrote: > Does anyone have an idea how I can make the php script gather all the multiple > &browser=lynx&browser=mosaic&browser=explorer > instead of only the last entry? That URL is like writing: And expecting that $foo contains both betty AND bob. It's just not the way the GET variables work. Post your JS to a JS list/forum, and tell them you need to have the checkboxes names something[] -- hopefully someone will be abel to spot the glitch with ease. Justin French http://Indent.com.au Web Developent & Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Opening a file to manipulate it
Hi, on 17/11/02 1:45 PM, Troy May ([EMAIL PROTECTED]) wrote: > > echo $header; ?> > > It writes "Resource id #1" at the top of the page. What is that?! :) You're missing some code -- instead, try this example from the fread() page in the manual: Cheers, Justin French http://Indent.com.au Web Developent & Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php