[PHP] Memory
Hello, Is there a way to know the memory that was used to execute a php page ? Thanks ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] site down have question
what is the function that takes Dan McCullough and makes it McCullough, Dan? Anyone, cant seem to get php.net to load - This mail sent through IMP: http://horde.org/imp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] string
I'm parsing some content I get back from a website, and I for most of the cases I get the infromation back and everything is formatted correctly. There is this one part where I get back a bunch of crap on the end. example: One thing I have going for me, beside my dashing good looks, is I know exactly the length of what I am supposed to get back. Name|17|5|7|12|26|8|4|0|2|0|40|12.50|3|33.30|19 it should 16 pieces. Any thoughts on how I can get it to cut off at the 19, one thing that I should say is 19 is value that can change. - This mail sent through IMP: http://horde.org/imp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] html stripping
No this is not some shaddy game or strip poker knock-off. My question has to do with a person project I have started. I have a script that grabs names and ids from a database, puts them in an array and then based on that grabs a URL and parses that URL for this name, drops all the html crap, and takes the information/stats and insert or updates the stats table. Problem is on certain names the page that it is parsing is different, and so I get loads and loads of extra HTML, and one name in particular doesnt return all the stats. More detail is: ### CODE $start=$name; $end=''; $start_position=strpos($myLine, $start); $end_position=strpos($myLine, $end)+strlen($end); $length=$end_position-$start_position; $myLine=substr($myLine, $start_position, $length); $myLine=str_replace("","",$myLine); $myLine=str_replace("","|",$myLine); $stats=explode("|", $myLine); I write all this to log what it is getting back and that is how I know that basically on some of these names its return the full page. I'm really at a loss, anyone have any ideas? ----- This mail sent through IMP: http://horde.org/imp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] what PHP really needs
There's 1 really important thing missing in PHP as I see it, and it's the ability to keep variables in memory for as long as the programmer choose. If this was possible there could be some truly great optimizations done. Some things are very slow to create but very fast to work with. I wrote a XML class a couple of days ago and while it's extremly quick to search and work with, sadly it's rendered pretty much useless since creating the tree which it uses isn't fast enough. I've heard there's a feature like this in Cold Fusion, which every Cold Fusion user seems to think of as the holy grail, and I would have to agree with them. One thing I've heard they use this for is to load an entire database into system memory. I don't know exactly how it's works but imagine having the whole database in system memory. When you change data you update it both in system memory and on the drive, but when you select (which is what you mostly do), you just query the mirror in system memory. So how cost effective could this be? 1GB of system memory is pretty much minimum on a decent server today. Assuming the site generates aprox 1 million bytes worth of data every day (storing images and other types of massive data in the tables would perhaps not be apropiate) the site could be up and runing for 1 thousand days. And if you just keep tables that gets queried a lot, but doesn't get altered often, you could most likely come up with a great compromise. I can't say for sure how much faster things would be but I'm guessing at several 1000% faster, however I might be way off. The only drawback I can see is that there might be multi threading issues, so if this would be implemented a new key word would probably have to be introduced to make data mutexed, or perhaps the other way around to avoid to many people scratching their heads. /Sebastian Karlsson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Win32 : php_gd.dll (GIF, PNG, WBMP et JPEG)
I found a dll to generate gif under windows. It work with php 4.0.6, 4,0.4 but it dosen't work with php 4.1.1 link ? tips ? thanks franck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] cookie, port <>80
How can i send a cookie and specify the server port ? (i try www.mydomain.com:2000 but don't work) franck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Assistance Wanted Time:11:58:28 AM
FROM: MARIAM ABACHA Dear friend, Following the sudden death of my husband, Late General Sanni Abacha, the former head of state of the federal Republic of Nigeria in June 1998, I have been thrown into a state of utter confusion, frustration and hopelessness by the present civilian administration. Security agents in Nigeria have subjected me to physical and psychological tortures. One of my sons is still under detention as well as arraigned before a Federal High Court of Nigeria for an offence he did not commit. As a widow, that is so traumatized, I have lost hope and confidence in anybody within the country. You must have heard over the media and the Internet on the recovery of various huge sums of money deposited by my late husband in different security firms abroad. Some willingly gave up their secrets and disclosed our money confidently lodged with them and many out-rightly declined lodgment. In fact the total sum discovered by the Government so far is to the tune of $700 million dollars. And the government has not relented in its efforts to completely bring my children and I back to square one. This is why I deemed it necessary to act fast by contacting anybody abroad for assistance. Furthermore, due to the security network placed on my daily activities I cannot afford to visit any embassy for a possible solution, hence I have decided to contact you and I do hope you will be the person God is going to use torescue my family and I. I have deposited the sum of $35 million dollars in a security firm abroad as whose name is with held for now for security reasons until we fully commence communication. I shall be grateful if you could receive this fund on my behalf for safekeeping. Adequate arrangement has been made for receiving the fund. It is totally risk free. This arrangement is known to you, my brother (who is contacting you and I only. This means that my brother will deal directly with you as surveillance is on me. My brother name is JIMOH ABU. You are entitled to 15% of the total sum. I hope to invest a proportion of the balance in your country. Please forward your private Telephone and Fax numbers so that we can fully commence communication immediately. I will quite appreciate, if you accept my proposal in good faith. I look forward to receiving your urgent reply to my plea. Yours truly, Hajia Mariam Abacha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ordering a list starting at x
This is a little bit more involved then the subject would let on. What I have is a picture page, has nothing to do with an 80's themed kids show starring Bill Cosby, but what it has to deal with is a search results like page where 5 images will appear with a next and prev link to get to more. However what I need to do extra is if someone clicks in from a link for a particular picture I need to display that pic first. So below is my psudocode. $numresults = mysql_query("SELECT * FROM images WHERE approved = 1"); $numrows = mysql_num_rows($numresults); if (empty($offset)) { $offset=0; } // end entry $sqlquery = "SELECT * FROM images WHERE approved = 1 ORDER BY imageId DESC limit $offset,$limit"; $result = mysql_query($sqlquery); while ($search_return = mysql_fetch_array($result)) { print the images here } //mysql_free_result($result); print $search_results; // entry for results $pages = intval($numrows/$limit); if ($numrows%$limit) { $pages++; } for ($i=1;$i<=$pages;$i++) { $newoffset=$limit*($i-1); print "$i \n"; } if ($offset>1) { $prevoffset=$offset-$limit; print "$Prev \n"; } if ($numrows>($offset+$limit)) { $nextoffset=$offset+$limit; print "$Next\n"; } Any thoughts? ----- This mail sent through IMP: http://horde.org/imp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ordering a list starting at x
Okay so I have a list of 20 images, I want to display 5 per page, the code I have included will do that without any problems, and the code I have included will setup the Prev, Next and page # links and they will pull up the correct results. However I need to include some functionality where if I give this code an image id say 13, that the code with then show 13 as the first one and go on to 14, 15 to the end, and then start over ending the list at 12. So that in this example you have 13, 14, 15, 16, 17 on page 1. page 2 would have the next 5 and so on back to 12. So I need to order a list starting at x, which in this case = 13, and then have it loop around and end at 12. Quoting [EMAIL PROTECTED]: > This is a little bit more involved then the subject would let on. What I > have > is a picture page, has nothing to do with an 80's themed kids show starring > > Bill Cosby, but what it has to deal with is a search results like page where > 5 > images will appear with a next and prev link to get to more. However what I > > need to do extra is if someone clicks in from a link for a particular picture > > I need to display that pic first. So below is my psudocode. > > $numresults = mysql_query("SELECT * FROM images WHERE approved = 1"); > $numrows = mysql_num_rows($numresults); > if (empty($offset)) { > $offset=0; > } > // end entry > $sqlquery = "SELECT * FROM images WHERE approved = 1 ORDER BY imageId DESC > limit $offset,$limit"; > $result = mysql_query($sqlquery); > while ($search_return = mysql_fetch_array($result)) { > print the images here > } > //mysql_free_result($result); > print $search_results; > // entry for results > $pages = intval($numrows/$limit); > if ($numrows%$limit) { > $pages++; > } > > for ($i=1;$i<=$pages;$i++) { > $newoffset=$limit*($i-1); > print "$i \n"; > > } > > > if ($offset>1) { > $prevoffset=$offset-$limit; > print "$Prev > \n"; > } > > > if ($numrows>($offset+$limit)) { > $nextoffset=$offset+$limit; > print " offset=$nextoffset&sc=searchResults\">$Next\n"; > } > > Any thoughts? > > > - > This mail sent through IMP: http://horde.org/imp/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > - This mail sent through IMP: http://horde.org/imp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Server's clock gone funny, maybe? OT
Quoting Jay Blanchard <[EMAIL PROTECTED]>: > [snip] > > > > [smartass mode to full power - nothing personl] > > [/smartass mode] > > Is that W3C HTML 4.01 compliant? > [/snip] > > Yes, ermaybe. Try XJBML strict > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Tag is invalid personl, should be personAl :) ----- This mail sent through IMP: http://horde.org/imp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Basic's Problem with a simple script.
Hi ! I am an unexperienced PHP newbie, and a have a Problem: The following script is a sample from a PHP tutorial, but it does not work on my machine. I use PHP Ver. 4.1.2 with apache 1.3.26 on a debian box. In php.ini, "safe_mode" is off, and "register_globals" is on. The script from the mentioned tutorial (http://www.galileocomputing.de/openbook/php4/kapd.htm) should be a sample for a php-file which invokes itself; This does not work on my machine; I can enter names and submit them as often I like, but the statement from the if-block is never executed, i.e. the output "You have entered the following name: ..." is never displayed. Here is the excerpt from this script: -- "; } ?> Please enter a Name and send the form: 2nd Name 1st Name I assume the reason is in global or general settings, but I don't know them. Does anybody know what to do ? best regards chrm
[PHP] Problems with variable handling !
Hi ! I have a Problem with hand over of variables; My Page consists of three files which I have enclosed to demonstrate the problem. test.php: -- test.php -- test_oben.php: -- test_oben.php test String1 String2 -- test_0.php: -- test_0.php -- In test_oben.php I want to insert two strings. pressing the "Display strings"-button will output them in the button frame. Only pressing the "Display concatenated strings"-button should output the concatenated string, but this does not work, and I do not understand why. Please give me a hint ! best regards chrm
[PHP] Re: Problems with variable handling !
phpinfo reports that register_globals=On
[PHP] Re: Problems with variable handling !
- Original Message - From: php-general To: [EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 12:36 PM Subject: Problems with variable handling ! Hi ! I have a Problem with hand over of variables; My Page consists of three files which I have enclosed to demonstrate the problem. test.php: -- test.php -- test_oben.php: -- test_oben.php test String1 String2 -- test_0.php: -- test_0.php -- In test_oben.php I want to insert two strings. pressing the "Display strings"-button will output them in the button frame. Only pressing the "Display concatenated strings"-button should output the concatenated string, but this does not work, and I do not understand why. Please give me a hint ! best regards chrm phpinfo reports that register_globals=On
[PHP] Re: Problems with variable handling !
On Tuesday 08 June 2004 18:50, php-general wrote: > Only pressing the "Display concatenated strings"-button should > output the concatenated string, but this does not work, and I do not > understand why. $var3 is not defined. -- $var3 is defined as $var3 = "$var1$var2"; in the body of the if ($button1) statement !?
[PHP] Adv. photo scripts
Not sure if I'm at the right place but here goes I'm trying to create a script that will let users upload photos. It is a high traffic site and I've been told its best to create a function that will generate a unique filename for a temp. file, put the temp file elsewhere on the server, and then use an (unlink???) function to delete the temp. file after it gets written to the d-base. How would I do that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Adv. photo scripts
Thanks for all the replys. I should have warned you in advance that I am new ;) "Casey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Nov 24, 2007 11:16 PM, Robert Cummings <[EMAIL PROTECTED]> wrote: On Sun, 2007-11-25 at 01:59 -0500, PHP-General wrote: > Not sure if I'm at the right place but here goes > > I'm trying to create a script that will let users upload photos. It is > a > high traffic site and I've been told its best to create a function that > will > generate a unique filename for a temp. file, put the temp file > elsewhere on > the server, and then use an (unlink???) function to delete the temp. > file > after it gets written to the d-base. > > How would I do that? PHP already does ALL that for you. You just need to save the file to your DB. See the $_FILES global array for uploaded files. Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php See this for examples: http://us.php.net/features.file-upload -Casey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] change php variable depending on selection
Hi, I've looked everywhere on the web (except of course the place that has the answer ;) ) but can't seem to find a solution. I'm trying to build an rss reader on a webpage. The idea is simple: there's a dropdown box where you select the name of the blog and when you select the blog you want to view a variable in the php script changes that captures the rss feed of that blog. The db is setup so that the name of the blog is stored next to the rss feed of the blog. If I'm thinking of this correctly I've developed the dropdown box so that it populates from my db the name of the blogs I have stored. I can't seem to figure out how to, when you select matt'sblog (for example), how to make it so that the php variable will be populated with the rssfeed of matt's blog and then the feed will show. For instance, selecting matt'sblog from the drop down list will make it so that $url="rss feed from matt'sblog" (which is stored in the db next to the name of the blog). Make sense? thx in advance for any help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] change php variable depending on selection
thx for the reply but i am a bit confused (i am new to php and even to javascript) Where would I put the javascript portion (the window.onLoad part), then? Here is the relevant portion of the code. My test page can be seen at http://valueinvestingplanet.com/test. The idea is to have the rss feed show up on that page after you select which feed you want. thx again! (!(strcmp($row_Recordset1['blogname'], $row_Recordset1['blogname']))) {echo "selected=\"selected\"";} ?>>$row_Recordset1['blogname']?> 0) { mysql_data_seek($Recordset1, 0); $row_Recordset1 = mysql_fetch_assoc($Recordset1); } ?> ""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Jan 20, 2008 8:51 PM, PHP-General <[EMAIL PROTECTED]> wrote: Hi, I've looked everywhere on the web (except of course the place that has the answer ;) ) but can't seem to find a solution. I'm trying to build an rss reader on a webpage. The idea is simple: there's a dropdown box where you select the name of the blog and when you select the blog you want to view a variable in the php script changes that captures the rss feed of that blog. The db is setup so that the name of the blog is stored next to the rss feed of the blog. If I'm thinking of this correctly I've developed the dropdown box so that it populates from my db the name of the blogs I have stored. I can't seem to figure out how to, when you select matt'sblog (for example), how to make it so that the php variable will be populated with the rssfeed of matt's blog and then the feed will show. For instance, selecting matt'sblog from the drop down list will make it so that $url="rss feed from matt'sblog" (which is stored in the db next to the name of the blog). Make sense? so, you just want to submit a request to the server once someone makes a selection? you need to use the onselect dom level 0 event (easiest way [w/o requiring users to press a submit button]). then you will have a javascript function to submit the form, eg. // assume the select tag has id="rssFeedSelector" // assume the form the select is in has id="rssSelectionForm // then the javascript would look (roughly) something like this (put it in the head tag of your page) window.onLoad = function() { document.getElementById('rssFeedSelector').onchange = function() { document.getElementById('rssSelectionForm').submit(); } } -nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: MensHealth 12916
Canadian Doctor Clara Best Price On Net 79% OFF http://www.beautywarm.com No virus found in this outgoing message Checked by PC Tools AntiVirus (4.0.0.26 - 10.067.006). http://www.pctools.com/free-antivirus/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dear php-general@lists.php.net April 84% 0FF
Canadian Doctor Hazel Best Price On Net http://zxa.pharmstorez.com?liyws -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best store for mans
Dont leave your nights dissatisfied http://uimeds.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions
Have a questions about sessions. In building a simple app do I have to include the session id in the url string or in a hidden tag? or does it normally track it by cookies and so I dont have to call it on every page? thoughts on best way to do this - This mail sent through IMP: http://horde.org/imp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mysql_connect error
T, You also need to load the php_mysql rpm (Assuming you loaded via rpm) Till We Meet Again... Clifford W. Hansen Operations Support Developer Aspivia (Pty) Ltd. +27 (0) 11 259-1150 (Switchboard) +27 (0) 11 259-1019 (Fax) +27 (0) 83 761-0240 (Mobile) [EMAIL PROTECTED] (EMail) http://chansen.aspivia.com (Web) Registered Linux user number 343424 on http://counter.li.org/ "We have seen strange things today!" Luke 5:26 This message contains information intended for the perusal, and/or use (if so stated), of the stated addressee(s) only. The information is confidential and privileged. If you are not an intended recipient, do not peruse, use, disseminate, distribute, copy or in any manner rely upon the information contained in this message (directly or indirectly). The sender and/or the entity represented by the sender shall not be held accountable in the event that this prohibition is disregarded. If you receive this message in error, notify the sender immediately by e-mail, fax or telephone and return and/or destroy the original message. The views or representations contained in this message, whether express or implied, are those of the sender only, unless that sender expressly states them to be the views or representations of an entity or person, who shall be named by the sender and who the sender shall state to represent. No liability shall otherwise attach to any other entity or person. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Returned mail: see transcript for details
The message was not delivered due to the following reason: Your message was not delivered because the destination server was not reachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely there is a network problem that prevented delivery, but it is also possible that the computer is turned off, or does not have a mail system running right now. Your message could not be delivered within 5 days: Host 151.227.146.62 is not responding. The following recipients could not receive this message: Please reply to [EMAIL PROTECTED] if you feel this message to be in error. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FTP not enabled in RedHat 7.x distro
Hi, Installed RPM's from RedHat (latest patches) and using PHP with Apache under RH7.1 Linux, lots of scripts, no problems. The hitch is that a user just tried ftp_connect(), and got the "unknown function" error. Okay, so I expected this to be a missing php.so loadable module. However, it appears more like an option "--enable-ftp" needs to be specified at _compile time_ to get it working. Is this really the case? Does RedHat _really_ not distribute with this feature already on? Am I even barking up the right tree?!? Many thanks in advance... -- Best regards, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] FTP not enabled in RedHat 7.x distro
Rick, In response to your mail of Monday 17 February 2003 at 17:46:49: Thanks for your swift response! RE> I also use Redhat 7.1 and use FTP successfully. Something in your RE> setup? Well, I don't think so ... it's all fairly standard (only use RPM's) and the "function not found" suggests the functionality just isn't present. Do you have an FTP extension mentioned in your PHP.ini file? The doc's aren't clear on this point ;) -- Best regards, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I have a problem with MsSQL
Jimmy, In response to your mail of Monday 17 February 2003 at 18:54:02: JH> My problem is the characters in spanish: JH> example: JH> Construcción (Data of MsSQL Server) JH> Result in web with PHP: JH> Construcci¢n Are you aware of HTML codes like the following - some are the common ones most people know, but there are some rarer characters too? ® ®© © ¡ ¡ ¢ ¢ £ £ ¤ ¤ ¥ ¥¦ ¦ § § ¨ ¨ ª ª « « ¬ ¬ ¯ ¯ ° °± ± ² ² ³ ³ ´ ´ µ µ ¶ ¶ · · ¸ ¸ ¹ ¹ º º » » ¼ ¼ ½ ½ ¾ ¾ ¿ ¿ × × Ø Ø Þ Þ ÷ ÷ ø ø þ þ € Ð Ðæ æ è è é é ç ç ü ü ö ö & & ‘ ’ " " ' ' < < > > – — Maybe you can str_replace or strtr (or some other similar function) to get your international characters in the MySQL data converted to HTML? -- Best regards, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] FTP not enabled in RedHat 7.x distro
Martin, In response to your mail of Monday 17 February 2003 at 18:10:31: MM> Use phpinfo() to know how your PHP was compiled. If it comes as a MM> module, you should see a --enable-feature=shared. Don't know it MM> ftp support can be compiled as shared, but Indeed - I think the doc's maybe (!) indicate that FTP is shared (loadable from a DLL) under MS-Windows, but only seems to be available using --enable-ftp under Unix ... but no sign of that option in the phpinfo() function. Hm. Doesn't seem to make absolute sense! I'll keep looking into it some more I guess... -- Best regards, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[4]: [PHP] FTP not enabled in RedHat 7.x distro
Martin, In response to your mail of Monday 17 February 2003 at 18:27:05: MM> My RH 7.3 php (distributed by RH) has --enable-ftp, so it was MM> compiled with the ftp support. MM> Check yor sintax. Could have a typo somewhere. Very weird - I thought RedHat would have enabled it too. I did copy-and-paste the problem command to check I was searching for the right one. Here's the error, just for clarity: - Fatal error: Call to undefined function: ftp_connect() in /home/www/script.php on line 2 ...and the line in question is like... Anyway, maybe I should check the RH distro. Can you run the following on your box for me so I can compare please? rpm -qa | grep -i php | sort ; uname -mrspv Here's what my system shows for the above... php-4.1.2-7.1.6 php-imap-4.1.2-7.1.6 php-mysql-4.1.2-7.1.6 Linux 2.4.18-19.7.x #1 Thu Dec 12 09:00:42 EST 2002 i686 unknown Maybe even try an "rpm -qi php" for more details on that package. Thanks in advance. -- Best regards, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[6]: [PHP] FTP not enabled in RedHat 7.x distro
Martin, In response to your mail of Wednesday 19 February 2003 at 11:44:52: MM> When I say RH, I mean RedHat. The diference seems to be that I'm MM> on 7.3, while you're on 7.1. MM> Still, it should be compiled with ftp support. Yes, and we're patched with recent releases too, so I'd have thought so. However, the last RPM update did mush a couple of things that normally it gets right. I wonder if the last patch was duff? I was wondering if you were able to check the exact RH release of your PHP package, to see if it matched mine? MM> When you run phpinfo() the output gives you the configure line MM> with which php was compiled, so check there if it was or wasn't MM> compiled with ftp support. Well, I am not 100% sure. The phpinfo() reports the following: "...tem' '--with-ftp' '--with-zlib..." ...but the doc's and the people sometimes talk about "--with-ftp" and sometimes talk about "--enable-ftp". It's really not quite clear. Certainly looks like it's _behaving_ as though it has no FTP, and I'm increasingly getting the impression that RH released an RPM patch that wasn't exactly right... I'll poke them too perhaps. Thanks for your comments so far. Let me know if you can find your PHP version and release details - ta. -- Best regards, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[8]: [PHP] FTP not enabled in RedHat 7.x distro
Martin, In response to your mail of Wednesday 19 February 2003 at 12:07:01: ==>> rpm -q php MM> php-4.1.2-7.3.6 Hm.. Same version here, and also a .6 release, but for 7.1 instead of 7.3, which leads me to suspect someone at RH fudged the build last time they released a patch. I'm sure I can resolve this at RH now, but will be sure to let you & the list know the outcome when I do... MM> I have '--enable-ftp' on my phpinfo(). Aha, that's that cleared-up! MM> Also, send a bug report to bugzilla (http://bugzilla.redhat.com). On my way as I speak :) Thanks for confirming your findings etc. -- Best regards, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Need Feedback
Hi all, Thanks for the feedback and based on what I read, I will be keeping the sites up for at least a few more months. I would like to see decent use of the site so tell people about them. That will be my determinining factor when I rethink the sites in June or July. They are free and do not require one to be a list member to read or respond to the author. You must be a list member to post to the list, though. Thanks again to those that wrote me and enjoy. David Fordham -- Original Message -- >Hi all, > >I have had this website that captures the list email messages and placed it into a >searchable db. I did this as a learning exercise and think it is pretty cool but am wondering if I should just shut em down. > >Take a look and if I get enough feedback, I will keep them running for at least a few >more months. I have a PHP and a MYSQL list db, here are the URLs: > >http://www.summittech.com/mysqlmail.php3 >http://www.summittech.com/phpgenmail.php3 > >They are free and I am not doing anything with the data. > >Let me know, > >David Fordham > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Q: PHP3 / Read STDIN when missing Content-Type
I'm stuck with PHP3 at present and need to process POSTed data that has a missing Content-Type, so the HTTP_POST_VARS don't work. Is the raw STDIN data accessible in this situation, please? Pretty please? Cheers, J. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] Holy Moly...
>> On Wed, 2 Jan 2002, Julie Hull wrote: >> >> > Could someone please direct a total novice to the best PHP >> > beginner news group. Just to many to choose from ~:) >> > >> > Thank You, >> > Julie ~:) Jump right in, but be sure to read the introductory chapters of the PHP manual, especially on security, and then dip back into them once you're getting familiar with PHP. It also depends on what you know about web servers, server-side scripting, what other languages you know, and so on... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] Q: PHP3 / Read STDIN when missing Content-Type
BS> Your question intrigued me enough to start searching for an BS> answer. Never did this myself, but you may try BS> http://download.php.net/manual/en/html/function.fopen.html (fifth BS> paragrapgh of explanations). Hope it works with Apache - I was BS> unable to determine if this only works when you run PHP scripts BS> from the prompt. Thanks for your response. I think the problem is actually to do with STDIN having already been gobbled up by PHP when it parsed the input, and therefore there is no more data available -- maybe it _is_ available when the Content-type is missing (by stuffing the data back on the queue) or something. Hm. I'll take a peek and let you know, although I have since found another solution: In the end I found another way around it by sucking-in the data using a tiny Perl script, parsing out the field I wanted and then issuing an HTTP request from the Perl script to launch a PHP script with a regular QUERY_STRING. Streuth! Cheers, James. -- Axoria Ltd specialises in Bespoke Internet Software and Hosting. (Esp. integration of desktop with on-line databases / e-Commerce.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Need Feedback
Hi all, I have had this website that captures the list email messages and places them into a searchable db. I did this as a learning exercise and think it is pretty cool but am wondering if I should just shut em down. Take a look and if I get enough feedback, I will keep them running for at least a few more months. I have a PHP and a MYSQL list db, here are the URLs: http://www.summittech.com/mysqlmail.php3 http://www.summittech.com/phpgenmail.php3 They are free and I am not doing anything with the data. Let me know, David Fordham -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP AS an FTP server
On Wed, Feb 18, 2009 at 4:24 AM, Ashley Sheridan wrote: > I used vsftp for several FTP systems at work, and bar a few problems > (errors on my part!) they work just fine. I've even got PHP talking to > various Bash scripts to manage users and permissions for the FTP, and, > touch wood, everything works well. > > I wouldn't really agree that allowing local users to FTP in is a bad > idea. I'm using just that method for my systems. The users, etc are only > ever created through a web interface, which forces certain rules on > usernames, which as far as I see it, is the only problem. As long as the > vsftpd.conf file is configured correctly and securely, the whole thing > will remain pretty tight. > > > Ash > www.ashleysheridan.co.uk > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > A couple months back we were able to configure ProFTPd with MySQL support to allow our forum users to login and upload files. Although users login using credentials from MySQL they are somewhat chrooted to a single user with very limited capabilities and no shell of course. This opens up the possibility of working with the users from PHP. With a bit of creativity this link can help you get started http://www.howtoforge.com/proftpd_mysql_virtual_hosting - http://www.lampadmins.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] User Authentication across multiple server
On Fri, Mar 6, 2009 at 5:14 PM, Paul Scott wrote: > On Fri, 2009-03-06 at 10:09 +0100, Edmund Hertle wrote: > >> The only method which possibly could work and came to my mind was using >> somehow $_GET parameter for username and password (encrypted). > > Set a cookie and crypt that (RC4 works well) and then check for the > cookie on both sites. Kind of like a "Remember me" type deal > > -- Paul > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I believe you can do this with a database to handle session, I haven't used that myself though. -- - http://www.lampadmins.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [php] scheduled task in php
On Fri, Apr 3, 2009 at 7:49 PM, Andrew Williams wrote: > does anyone knows the the following is not working: > > C:\PHP\php.exe D:\DEMO\index.php?action=run&run=1 > The querystring does not have an effect from the command line, it is part of the HTTP protocol. Use console options instead and use the getopt function http://us2.php.net/manual/en/function.getopt.php -- http://www.lampadmins.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ftp_put issues
On Thu, Apr 16, 2009 at 9:27 PM, James wrote: > Hi, yeah ftp manually works just fine using the same login too. > > James > > -Original Message- > From: Chris [mailto:dmag...@gmail.com] > Sent: Wednesday, April 15, 2009 10:09 PM > To: James > Cc: php-general@lists.php.net > Subject: Re: [PHP] ftp_put issues > > James wrote: >> Hi, I'm trying to upload a pdf file from a local drive to the server using > a >> php routine. I've done it server to server before with no issues but this >> just keeps failing on me. >> >> This is the function I'm calling, it connects and logs in just fine, but > it >> will not upload the file. The file I'm sending is just a 100k pdf file. > > If you do it manually does it work? Maybe the account is over quota. > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Just to be clear where are you running your ftpData function from? Your local computer? Where is the PDF file coming from? I hope from your local computer as well. How does your Source and Dest variables look like? Full paths? Have you tried your firewall? (Assuming both script and file is coming from local and your firewall is on whitelist mode.) Cheers -- http://www.lampadmins.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ftp_put issues
On Thu, Apr 16, 2009 at 10:24 PM, James Hill wrote: > The ftpData function and in fact all the php stuff is running online on my > webserver. The pdf file is on my local machine, I'm trying to upload the > local pdf file to the server using ftp. > > > > The dest variable I have tried with the full path: > > /var/www/html/Docs/DU/DU1.pdf > > And with just the DU1.pdf along with ftp_chdir. > > > > The local file path is being passed through a html form and consists of > L:/mypdfs/testpdf.pdf > > > > I've disabled my firewall to try that to no avail. > > > > James > > > > Just to be clear where are you running your ftpData function from? > > Your local computer? Where is the PDF file coming from? I hope from > > your local computer as well. > > > > How does your Source and Dest variables look like? Full paths? > > Have you tried your firewall? (Assuming both script and file is coming > > from local and your firewall is on whitelist mode.) > > > > Cheers > > > > -- > > http://www.lampadmins.com I think that explains your problem, in order to upload a file via FTP your FTP client GENERALLY must reside on the same computer as your client, in your case your FTP client sits remotely elsewhere (which is your PHP script) and your file is on your local computer. A simple HTTP file upload should fit your 100K file nicely. Cheers. -- http://www.lampadmins.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
confirm subscribe to php-general@lists.php.net
Hi! This is the ezmlm program. I'm managing the php-general@lists.php.net mailing list. I'm working for my owner, who can be reached at php-general-ow...@lists.php.net. To confirm that you would like arch...@mail-archive.com added to the php-general mailing list, please send an empty reply to this address: php-general-sc.1347368255.dogihbdninpbhefjekdn-archive=mail-archive@lists.php.net Usually, this happens when you just hit the "reply" button. If this does not work, simply copy the address and paste it into the "To:" field of a new message. or click here: mailto:php-general-sc.1347368255.dogihbdninpbhefjekdn-archive=mail-archive@lists.php.net This confirmation serves two purposes. First, it verifies that I am able to get mail through to you. Second, it protects you in case someone forges a subscription request in your name. Some mail programs are broken and cannot handle long addresses. If you cannot reply to this request, instead send a message to and put the entire address listed above into the "Subject:" line. --- Administrative commands for the php-general list --- I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address: For help and a description of available commands, send a message to: To subscribe to the list, send a message to: To remove your address from the list, just send a message to the address in the ``List-Unsubscribe'' header of any list message. If you haven't changed addresses since subscribing, you can also send a message to: or for the digest to: For addition or removal of addresses, I'll send a confirmation message to that address. When you receive it, simply reply to it to complete the transaction. If you need to get in touch with the human owner of this list, please send a message to: Please include a FORWARDED list message with ALL HEADERS intact to make it easier to help you. --- Enclosed is a copy of the request I received. Return-Path: Received: (qmail 4126 invoked from network); 11 Sep 2012 12:57:35 - Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Sep 2012 12:57:35 - Return-Path: Authentication-Results: pb1.pair.com smtp.mail=nore...@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=arch...@mail-archive.com; sender-id=softfail Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 140.211.15.143 as permitted sender) X-PHP-List-Original-Sender: nore...@php.net X-Host-Fingerprint: 140.211.15.143 osu1php.osuosl.org Received: from [140.211.15.143] ([140.211.15.143:57971] helo=osu1php.osuosl.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/A2-24398-E353F405 for ; Tue, 11 Sep 2012 08:57:35 -0400 Authentication-Results: osu1php.osuosl.org smtp.mail=nore...@php.net; spf=neutral; sender-id=neutral Authentication-Results: osu1php.osuosl.org header.from=arch...@mail-archive.com; sender-id=softfail Received-SPF: neutral (osu1php.osuosl.org: 127.0.0.1 is neither permitted nor denied by domain of php.net) Received: from [127.0.0.1] ([127.0.0.1:60108] helo=localhost) by osu1php.osuosl.org (envelope-from ) (ecelerity 3.3.2.44647 r(44647)) with ESMTP id 39/D0-30231-A353F405; Tue, 11 Sep 2012 12:57:30 + Date: Tue, 11 Sep 2012 12:57:30 + Message-ID: <39.d0.30231.a353f...@osu1php.osuosl.org> X-Authentication-Warning: osu1php.osuosl.org: nobody set sender to nore...@php.net using -f To: php-general-subscribe-archive=mail-archive@lists.php.net Subject: PHP Mailing List Website Subscription X-PHP-Originating-Script: 0:subscribe.php From: arch...@mail-archive.com This was a request generated from the form at http://www.php.net/mailing-lists.php by 109.61.3.34.
[PHP] mysql_connect() error
Hi guys hope you can all help me here. im in the middle of making a script ( im still quite new), anyway im getting this error Parse error: syntax error, unexpected T_STRING in c:\wamp\www\cms\header.inc on line 5 and on line 5 is mysql_connect($dbhost, $dbusername, $dbpassword) , i know its the mysql_connect() function thats giving me the error though cant seem to get it sorted. below is the versions im using Apache version : Apache/1.3.33 (Win32) PHP version : 5.0.4 MySQL version : 4.1.10a-nt - extension : mysqli all the above come in a bundle package called ( wampserver ) have also posted on wampservers forums for help im using windows xp home. Hope you guys can help me. Thanks Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql_connect() error
Hi guys hope you can all help me here. im in the middle of making a script ( im still quite new), anyway im getting this error Parse error: syntax error, unexpected T_STRING in c:\wamp\www\cms\header.inc on line 5 and on line 5 is mysql_connect($dbhost, $dbusername, $dbpassword) , i know its the mysql_connect() function thats giving me the error though cant seem to get it sorted. below is the versions im using Apache version : Apache/1.3.33 (Win32) PHP version : 5.0.4 MySQL version : 4.1.10a-nt - extension : mysqli all the above come in a bundle package called ( wampserver ) have also posted on wampservers forums for help im using windows xp home. Hope you guys can help me. Thanks Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 23 Nov 2002 20:55:04 -0000 Issue 1722
php-general Digest 23 Nov 2002 20:55:04 - Issue 1722 Topics (messages 125716 through 125738): Re: php teleprogramming -- How to avoid being ripped off ? 125716 by: Khalid El-Kary How to obtain unique XML Elements 125717 by: David Pratt 125718 by: Khalid El-Kary Undefined Variable 125719 by: Adriano Santos 125720 by: Derick Rethans 125724 by: Adriano Santos 125725 by: Derick Rethans 125734 by: Adriano Santos Re: extension can't be found 125721 by: Derick Rethans Re: Post again. question about Animated GIF 125722 by: Derick Rethans Re: put result of "include" into a variable 125723 by: Derick Rethans Some error in file upload. 125726 by: Naif Al-Otaibi 125727 by: Derick Rethans Re: Some error in file upload.] 125728 by: Marco Tabini 125730 by: Marco Tabini Re: OT- "Private Registrations" for Domains 125729 by: Ernest E Vogelsinger Re: echo'ing array contents through reference variable ... why doesn't this work??? 125731 by: -<[ Rene Brehmer ]>- 125733 by: Ernest E Vogelsinger Re: dynamic arraynames 125732 by: John W. Holmes Re: echo'ing array contents through reference variable 125735 by: Tularis Insert file into sql server binary field. 125736 by: Naif Al-Otaibi using cookies 125737 by: Ken Nagorski 125738 by: Rich Gray 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 --- hi, don't be so unhappy withit, because you won however, money comes and goes knowledge stays, through this experience you learned much, right? so you didn't lost much! :-) _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail --- End Message --- --- Begin Message --- Anyone have a simple technique for obtaining a unique list of elements from an XML file? Am looking for something that will identify the first opening tag ie and the single tag so that I get an array of tags that I can print out. Having a bit of trouble with regex to get something to work. Basic idea I had is to open file, read through each line with regex, add matches to array, and then do unique elements of array and write to another file. Is there a better way? -- Regards, Dave --- End Message --- --- Begin Message --- hi, you can get this parser http://creaturesx.ma.cx/kxparse/ if you want only this limited functionality (take an old version) 0.2 for example, you may also want to take only particular functions from it this is valid in all cases (as i think), except that you are developing another parser :) khalid _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus --- End Message --- --- Begin Message --- Hi, I'm with problem: Undefined Variable. I'm using : PHP 4.2.3 MySql 3.2.39 Windows 2000 How do I make to soluction my problem ? thanks --- End Message --- --- Begin Message --- Adriano Santos wrote: Hi, I'm with problem: Undefined Variable. I'm using : PHP 4.2.3 MySql 3.2.39 Windows 2000 How do I make to soluction my problem ? at the top of your script: error_reporting(E_ALL & ~E_NOTICE); or initialize your variables likes: $number = 0; $string = "foo"; Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - The PHP Magazine for Professionals - http://php-mag.net/ - --- End Message --- --- Begin Message --- My php.ini: error_reporting = E_ALL & ~E_NOTICE I have a form to send of the variables, but my page do not receive values. This my code: thanks "Derick Rethans" <[EMAIL PROTECTED]> escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Adriano Santos wrote: > > Hi, > > > > I'm with problem: Undefined Variable. > > I'm using : > > PHP 4.2.3 > > MySql 3.2.39 > > Windows 2000 > > > > How do I make to soluction my problem ? > > at the top of your script: > error_reporting(E_ALL & ~E_NOTICE); > > or initialize your variables likes: > $number = 0; > $string = "foo"; > > Derick > > > -- > > - > Derick Rethans
php-general Digest 24 Nov 2002 09:23:29 -0000 Issue 1723
php-general Digest 24 Nov 2002 09:23:29 - Issue 1723 Topics (messages 125739 through 125772): Re: using cookies 125739 by: Paul Marinas 125742 by: Rich Gray 125754 by: Chris Shiflett Re: Using Ping (was: using cookies) 125740 by: Marco Tabini Passing Variables 125741 by: Craig Edgmon 125743 by: Marco Tabini 125745 by: Rich Gray 125749 by: Stephan Seidt Re: Php search results] 125744 by: Tom Culpepper Re: grabbing data from a site 125746 by: Tom Culpepper Re: put result of "include" into a variable 125747 by: Tom Culpepper Re: dynamic arraynames 125748 by: Floyd Baker 125753 by: Hugh Danaher logs(querystring) in php4 or apache? 125750 by: Frank Wang PHP Syntax - mail statement 125751 by: Michael Sharp 125752 by: Marco Tabini strings and vars 125755 by: empty 125756 by: Kyle Gibson 125757 by: Ernest E Vogelsinger 125758 by: empty Parse URLs 125759 by: Stephen 125760 by: Tom Culpepper 125761 by: Stephen 125762 by: Tom Culpepper getting mysql dump using php 125763 by: See Kok Boon 125764 by: Rich Gray 125765 by: Morgan Hughes Secureing PHP. 125766 by: Steven Adams 125767 by: Stephan Seidt Re: sessions and trans-sid problem/question 125768 by: Jean-Christian Imbeault 125769 by: Jean-Christian Imbeault 125770 by: Jean-Christian Imbeault does //commenting reduce performance? 125771 by: Adam Newbie: element index array 125772 by: Michael Wai 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 --- dose anyone how to send a "ping" in local network thanks Paul Marinas Technical Support RDS Craiova Phone: +402-51-410-194 Mobile: +407-22-451-439 Fax:+402-51-416-579 www.rdsnet.ro . Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such a case, you should destroy this message and kindly notify the sender by reply e-mail. --- End Message --- --- Begin Message --- Try the system() or passthru() functions... Rich -Original Message- From: Paul Marinas [mailto:[EMAIL PROTECTED]] Sent: 23 November 2002 13:09 To: Rich Gray Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] using cookies dose anyone how to send a "ping" in local network thanks Paul Marinas Technical Support RDS Craiova Phone: +402-51-410-194 Mobile: +407-22-451-439 Fax:+402-51-416-579 www.rdsnet.ro . Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such a case, you should destroy this message and kindly notify the sender by reply e-mail. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- --- Begin Message --- --- Ken Nagorski <[EMAIL PROTECTED]> wrote: > I have never used cookies before, however I am trying to > implement them to make things a little more secure. Rather > than passing a sql statement via a hidden input tag I am > setting a cookie. I think someone else already mentioned this, but let me emphasize that this is a terrible idea and definitely does not make things a little more secure. The best analogy I can think of for a cookie would be handing out name tags to people who visit your site. Imagine that you write the following SQL on someone's name tag: select * from foo where unique_id='12345' This helps you distinguish them from the next person who may have a unique identifier of 23456. While this might work for those who play by the rules, you are placing a tremendous amount of trust in these people. What if someone erased what you wrote on their name tag, replacing it with this: delete from foo If you were to trust this person's name tag the next time you saw them, you would delete all of the data from that table. In addition to this, hidden form variables are just as bad. It is a different method, but you are still basically sending something to the client and just trusting the client to return exactly what you sent. Placing so much trust in the client is never a good idea. I would recommend abandoning these methods for anything that you, a
php-general Digest 24 Nov 2002 21:40:01 -0000 Issue 1724
php-general Digest 24 Nov 2002 21:40:01 - Issue 1724 Topics (messages 125773 through 125836): Re: Newbie: element index array 125773 by: Chase Urich 125774 by: Kyle Gibson Re: does //commenting reduce performance? 125775 by: Kyle Gibson 125781 by: DL Neil 125783 by: Ernest E Vogelsinger 125797 by: Ernest E Vogelsinger 125798 by: . Edwin 125804 by: DL Neil 125806 by: DL Neil 125808 by: Sterling Hughes 125811 by: Ernest E Vogelsinger 125817 by: Vincent Vandemeulebrouck Creating mySql search feature. 125776 by: Cookra 125777 by: Jean-Christian Imbeault 125778 by: Hatem Ben 125827 by: Marek Kilimajer Re: sessions and trans-sid problem/question 125779 by: Ernest E Vogelsinger 125780 by: Ernest E Vogelsinger 125785 by: Jean-Christian Imbeault 125790 by: Justin French 125793 by: Jean-Christian Imbeault 125800 by: Ernest E Vogelsinger 125801 by: Ernest E Vogelsinger 125814 by: Michael Sims 125819 by: Chris Shiflett get info of sub-directories 125782 by: gamin Re: [PHP-WIN] Unable to upload.. :( 125784 by: Boris Kolev getting mysql dump using php 125786 by: See Kok Boon 125789 by: See Kok Boon 125792 by: . Edwin 125831 by: See Kok Boon Stripslashes through an array. 125787 by: Cookra backticks vs Safe Mode 125788 by: Vincent Starre Huffman encoding 125791 by: Hatem Ben 125794 by: Jean-Christian Imbeault 125795 by: Jean-Christian Imbeault Re: Secureing PHP. 125796 by: . Edwin Re: Huffman encoding / almost done 125799 by: Hatem Ben How do I Install PHP on Apache 2.0? 125802 by: Tweak2x 125803 by: Stephan Seidt 125809 by: Tweak2x 125810 by: Stephan Seidt 125812 by: Tweak2x Frequent question..Which Mailing List Script 125805 by: Bret L Conard rad tools, form paser/validator 125807 by: Robert Mena security of stand alone script 125813 by: gamin 125822 by: gamin 125823 by: Stephen 125825 by: DL Neil 125830 by: Ernest E Vogelsinger Re: Linux Question 125815 by: Marek Kilimajer Re: Insert file into sql server binary field. 125816 by: Marek Kilimajer 125818 by: Sterling Hughes 125826 by: Marek Kilimajer 125832 by: Chris Shiflett php and caching 125820 by: Alex 125824 by: Stephan Seidt 125828 by: Marek Kilimajer 125833 by: Marco Tabini 125834 by: Ernest E Vogelsinger Parse URLs 125821 by: Stephen Cookies 125829 by: Omid Another cookie question 125835 by: Øystein Håland 125836 by: Kyle Gibson 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 --- unset($a['element2']); http://www.php.net/manual/en/function.unset.php > I would like to ask that how can I completely delete the $a['element2'] in > the array? That's mean I will get 'false' in 'isset($a['element2']) after > the delete process is taken place. -- Linux: Because rebooting is for adding hardware. Fingerprint = CE24 057D 1E88 A253 3196 89DB 9FF0 9EF0 2F70 8BE8 BE8 signature.asc Description: This is a digitally signed message part --- End Message --- --- Begin Message --- If I declared an element indexed array and put some values into it: $a['element1'] = array('btime' => '19D', 'etime' => '22D', 'dayname' => 4); $a['element2'] = array('btime' => '12D', 'etime' => '20D', 'dayname' => 2); $a['element3'] = array('btime' => '15D', 'etime' => '17D', 'dayname' => 3); I would like to ask that how can I completely delete the $a['element2'] in the array? That's mean I will get 'false' in 'isset($a['element2']) after the delete process is taken place. Thanks for your help. Use unset() http://www.php.net/manual/en/function.unset.php -- Kyle Gibson admin(at)frozenonline.com http://www.frozenonline.com/ --- End Message --- --- Begin Message --- I have always had the opinion that the more comments you put into php scripts, the slower they will run because there is more data to be read... Can someone tell me if there is any truth in this or whether commenting has absolutely 'no' impact on the performance of a script? The comments are ignored, except the characters that ini
php-general Digest 27 Nov 2002 11:17:23 -0000 Issue 1729
php-general Digest 27 Nov 2002 11:17:23 - Issue 1729 Topics (messages 126201 through 126259): Re: & in Query String 126201 by: Ernest E Vogelsinger 126209 by: Chris Shiflett 126247 by: . Edwin session problems 126202 by: Jason Romero 126207 by: John W. Holmes 126233 by: conbud 126236 by: conbud Re: Problems with a simple While-If condition 126203 by: Bret L Conard 126205 by: Jason Romero Re: URL hiding 126204 by: Marco Tabini 126211 by: Kris 126213 by: Marco Tabini 126219 by: Bob Irwin 126224 by: John Nichel Re: deleting a record. 126206 by: Peter Houchin Re: Problems with a simple While-If condition With the statement 126208 by: Rodrigo de Oliveira PHP zipcode distance class 126210 by: UberGoober Re: Multiple page form 126212 by: Verdon Vaillancourt 126226 by: . Nilaab Re: Need email solution 126214 by: Bryan Koschmann - GKT displaying record number in a cell in a table 126215 by: Peter Houchin 126217 by: Van Andel, Robert 126220 by: Peter Houchin testing for empty array 126216 by: poliva.cox.net 126218 by: Van Andel, Robert 126221 by: Kyle Gibson 126222 by: Morgan Hughes php/mysql report builder 126223 by: Michael P. Carel 126225 by: John W. Holmes 126227 by: Miles Thompson 126250 by: DL Neil php bugs (Chinese word display problem)-help 126228 by: samuel.3give.com 126229 by: Tom Culpepper 126234 by: samuel.3give.com 126246 by: . Edwin How do i provide Download facility ?? 126230 by: Venkatesh Hosur 126232 by: Chris Shiflett 126235 by: Justin French Re: Linux Question 126231 by: Justin French Re: php version of majordomo? 126237 by: Jason Wong Invalid Charactors in a string. 126238 by: Philip J. Newman 126239 by: Tom Culpepper 126243 by: Justin French 126248 by: DL Neil My first XML! 126240 by: Boris Kolev 126245 by: olinux Changing SERVER's IP ADDRESS 126241 by: Adharsh Praveen R 126244 by: Jason Wong 126249 by: Adharsh Praveen R array manipulations 126242 by: Mattia Wow Re: spawing new PHP process 126251 by: Geranium Newbie : How work with parameters? 126252 by: Stéphane Génin 126253 by: Ernest E Vogelsinger 126254 by: Scott Houseman 126255 by: Rich Gray XSLT support for RH8 126256 by: Dan Kuykendall Re: Decrypt Password 126257 by: Joakim Andersson Re: Confirm message box 126258 by: Keith Sauvant 126259 by: Marek Kilimajer 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 --- At 00:00 27.11.2002, Jonathan Rosenberg \(Tabby's Place\) said: [snip] >Ok ... I take back what I said about & not working in a query string. >It works just fine. [snip] Ahhh - and I just created a test page for all to check out... nevertheless, here it is: http://www.vogelsinger.at/test.php Simply provides a link using query parameters encoded with &, to check with different browsers. Maybe someone will check this outwith his browser anyway. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ --- End Message --- --- Begin Message --- --- "Jonathan Rosenberg" <[EMAIL PROTECTED]> wrote: > I tried it & it fails. The browser sends the query > string with the & & the $_GET access fails. > > I am using IE 6. I can't imagine that it would be > buggy in this regard. I just tried this in IE 6, and it worked fine for me. My test code follows: "; print_r($_GET); echo ""; } else { ?> Click Here This should display: Array ( [foo] => bar [blah] => blah ) Does it not work for you? Chris --- End Message --- --- Begin Message --- Hello, "Chris Shiflett" <[EMAIL PROTECTED]> wrote: [snip] > Does it not work for you? [/snip] It does, just like I said earlier :) Anyway, I just wanted to add that not only in IE6 but even in NN4 or N7 (also in linux) it works perfectly fine. - E --- End Message --- --- Begin Message --- when using session registered variables i can only get them to save as session variables for one page then on the next page they are gone far as i can tell the variables are not getting written over or unset and the session is not gettting destroyed any other ideas what it might be? Jason --- End Message --- --- B
php-general Digest 28 Nov 2002 11:26:02 -0000 Issue 1731
php-general Digest 28 Nov 2002 11:26:02 - Issue 1731 Topics (messages 126374 through 126397): session problems again 126374 by: Jason Romero 126378 by: Rich Gray Re: [PHP-DEV] Parse search string a la Google (Regular expression?) 126375 by: Ernest E Vogelsinger Re: ignoring client supplied session data 126376 by: Justin French 126386 by: John W. Holmes 126387 by: John W. Holmes Re: Password Script 126377 by: Justin French 126397 by: Vicky PHP 4.3.0RC2 released 126379 by: Andrei Zmievski Re: printing screen without the print dialog 126380 by: Justin French Re: Parsing XML files, logic involved... 126381 by: Khalid El-Kary Re: dynamic arraynames 126382 by: Floyd Baker 126383 by: Floyd Baker 126384 by: Floyd Baker 126396 by: Hugh Danaher Re: Streaming audio 126385 by: olinux Re: Show only user that variable "music"contain "pop" 126388 by: John W. Holmes Error in retrieving a BLOB from DB. 126389 by: Naif Al-Otaibi 126390 by: Faisal Abdullah Re: sendmail problem! 126391 by: Manuel Lemos getaddrinfo failed: No address associated with hostname 126392 by: Godzilla 126395 by: Tony Earnshaw how to use openssl_x509_read. 126393 by: Richard Rojas mcrypt 2.4.x - trouble with small data fields? 126394 by: Steve Yates 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 --- --when using session registered variables --i can only get them to save as session variables for one page --then on the next page they are gone --far as i can tell the variables are not getting written over or unset --and the session is not gettting destroyed --any other ideas what it might be? i tried the seggestions you guys had and i came up with one more question does the session cookie.cookie_lifetime have anything to do with the amount of time that session variables can be stored the session.use_cookies is on and register.globals is turned on however session.cookie_lifetime is set to 0 so would this affect the session variable lifetime? --- End Message --- --- Begin Message --- Jason session.cookie_lifetime set to 0 means the session cookie persists until the client browser is closed... I'm not clear if you are still having session problems now or the advice you got earlier sorted it? Rich -Original Message- From: Jason Romero [mailto:[EMAIL PROTECTED]] Sent: 27 November 2002 15:09 To: [EMAIL PROTECTED] Subject: [PHP] session problems again --when using session registered variables --i can only get them to save as session variables for one page --then on the next page they are gone --far as i can tell the variables are not getting written over or unset --and the session is not gettting destroyed --any other ideas what it might be? i tried the seggestions you guys had and i came up with one more question does the session cookie.cookie_lifetime have anything to do with the amount of time that session variables can be stored the session.use_cookies is on and register.globals is turned on however session.cookie_lifetime is set to 0 so would this affect the session variable lifetime? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- --- Begin Message --- At 23:11 27.11.2002, Ernest E Vogelsinger said: [snip] >If I understand you correctly you want to isolate either quoted strings >(with or without whitespace), or tokens separated by whitespace, as array >elements? > >For this you would first have to isolate the first quoted sentence, then >tokenize the part before, and loop this as long you're not done. > >Should work something like that: > > [...] >Disclaimer: untested as usual. _Should_ behave like this: [snip] I _should_ have tested. This script actually works the way you expect it to be: The output of this script is: Array ( [0] => search for this sentence [1] => -NotForThisWord [2] => ButDefinitelyForThisWord ) -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ --- End Message --- --- Begin Message --- on 28/11/02 9:22 AM, Evan Nemerson ([EMAIL PROTECTED]) wrote: > I'm not worried about them using the query string for malicious purposes- I > have register_globals off... I'm worried about someone messing with their > cookie and sedding authorized to true- that _will_ change my $_SESSION > variable, unles
php-general Digest 28 Nov 2002 23:44:52 -0000 Issue 1732
php-general Digest 28 Nov 2002 23:44:52 - Issue 1732 Topics (messages 126398 through 126442): rewrite urls with preg_replace 126398 by: Dieter Koch 126417 by: liljim 126418 by: John W. Holmes Re: controlling ownership on file uploads ... 126399 by: Marek Kilimajer Re: Bad File Mode? 126400 by: Marek Kilimajer 126402 by: Ernest E Vogelsinger Re: Converting dynamic webpages into static HTML pages 126401 by: Marek Kilimajer Re: printing screen without the print dialog 126403 by: Marek Kilimajer Bizarreness with htmlentities() and other things 126404 by: James Coates 126410 by: Rich Gray 126412 by: James Coates Re: session problems again 126405 by: Marek Kilimajer Re: editing .htaccess / .htpasswrd 126406 by: Mika Tuupola 126407 by: James Coates String function 126408 by: Shaun 126409 by: Marco Tabini Re: PHP 4.3.0RC2 released 126411 by: Vadim Tkachenko Re: echo'ing array contents through reference variable ... why doesn't this work??? 126413 by: -<[ Rene Brehmer ]>- Re: echo'ing array contents through reference variable 126414 by: -<[ Rene Brehmer ]>- mysql, php, checkbox 126415 by: Adrian Partenie 126416 by: John W. Holmes Re: Password Script 126419 by: Bobby Patel 2D Array 126420 by: Khalid El-Kary Re: dynamic arraynames 126421 by: Floyd Baker Re: [PHP-DB] Help with date 126422 by: Aaron Wolski Multidimensional array 126423 by: Mako Shark Hello ! How to write a programme in PHP which executes a routine at a given time ? 126424 by: Jonathan 126425 by: Jon Haworth Detecting email bounces sent by the mail function? 126426 by: Ade Smith 126430 by: DL Neil 126432 by: Marek Kilimajer 126434 by: Michael Sims 126437 by: scott Multidimensional arrays (more and more...) 126427 by: Mako Shark 126428 by: Marek Kilimajer 126431 by: Mako Shark 126439 by: Mako Shark 126440 by: Matt Vos File handling 126429 by: Jeff Postnuke --- Meta keywords and title different for all the pages... 126433 by: Manoj Nahar Help with the PHP 126435 by: Ted Frank 126438 by: Hatem Ben Re: [PHP-DEV] Parse search string a la Google (Regular expression?) 126436 by: Benny Rasmussen session_name() - Question 126441 by: Juerg Zgraggen help with session variables 126442 by: Thomas Goeminne 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 --- Hi to all the PHP-Fans out there, i have a syntax-problem with the folowing preg_replace command: $returnString = preg_replace("/(href=\")(.+?)(\")/is", preg_quote("\\1".ebLinkEncode(."\\2".)."\\3"), $returnString); i'm trying to call my own function within a preg_replace function and it won't work. any ideas ? it seems to me, that the quoting is incorrect, but i'm not shure, why it is incorrect, especially because i use preg_quote() ... thanks in advance for some hints ! best regards [EMAIL PROTECTED] --- End Message --- --- Begin Message --- Hi Dieter, You need to use the 'e' modifier as well as 'is' in your pattern. Have a look in the manual, here: http://www.php.net/manual/en/pcre.pattern.modifiers.php "If this modifier is set, preg_replace() does normal substitution of backreferences in the replacement string, evaluates it as PHP code, and uses the result for replacing the search string." Also look here: http://www.php.net/manual/en/function.preg-replace.php And check the "Example 2. Using /e modifier" part. Hope that helps ;) James "Dieter Koch" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi to all the PHP-Fans out there, > > i have a syntax-problem with the folowing preg_replace command: > > $returnString = preg_replace("/(href=\")(.+?)(\")/is", > preg_quote("\\1".ebLinkEncode(."\\2".)."\\3"), $returnString); > > i'm trying to call my own function within a preg_replace function and it > won't work. > any ideas ? it seems to me, that the quoting is incorrect, but i'm not > shure, why it is incorrect, > especially because i use preg_quote() ... > > thanks in advance for some hints ! > > best regards > [EMAIL PROTECTED] > > > > > --- End Message --- --- Begin Message --- > Hi to all the PHP-Fans out there, > > i have a s
php-general Digest 29 Nov 2002 11:47:32 -0000 Issue 1733
php-general Digest 29 Nov 2002 11:47:32 - Issue 1733 Topics (messages 126443 through 126464): Werid problemswith mail() command: From address on sent messages 126443 by: C.F. Scheidecker Antunes Suppressing X-Return-Path 126444 by: Darren Fehrmann Re: Is it possible to do this in PHP ? If it is then, how ? 126445 by: Axis Computers 126461 by: Marek Kilimajer file creation date 126446 by: Research and Development 126450 by: John W. Holmes Re: Postnuke --- Meta keywords and title different for all the pages... 126447 by: Peter Houchin Re: File handling 126448 by: Justin French 126454 by: Jeff RingRose 126456 by: Jeff RingRose Help with login/redirect/insert to dbase 126449 by: Karl James IRCG/PHP and Apache 1.3 126451 by: Sascha Schumann Logging out and session ids 126452 by: Gerard Samuel 126459 by: Tom Rogers how to use mssql_connect()? 126453 by: Kim Can't recover data in php posted with a form tag. 126455 by: Luc Roettgers 126457 by: Jeff RingRose 126458 by: Bastian Vogt Re: Detecting email bounces sent by the mail function? 126460 by: Chris Hewitt Questions on PHPs openssl extensions 126462 by: Richard Rojas images 126463 by: Craig Re: dynamic arraynames 126464 by: Ford, Mike [LSS] 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 --- Hello All, I wonder if is there anyone who ever had the same problem and know how to solve it. I have a web site that does send e-mail to some users based on requests. The problem is that although I pass the right user/from address on the mail function, the message source shows From as beeing apache@localhost and therefore some messages bouce back due to anti spam filters. This server is a Red Hat Linux 7.2 and it does not have apache 2.0 but 1.3. It does not have sendmail runnig or installed but another server on the same network does have it. The problem is that I do not want and cannot have my message headers with a From: Apache@LocalHost as this copy bellow shows: I've changed the header variable and put a From in it so it does displays the right FROM: address as bellow. But as you can see, the Received: (from apache@localhost) by servername, etc is there so the spam filters filter it. Return-Path: Received: (from apache@localhost) by ns1.nando.net (8.11.2/8.11.2) id gASLtQM27458; Thu, 28 Nov 2002 19:55:26 -0200 Date: Thu, 28 Nov 2002 19:55:26 -0200 Message-Id: <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Order # 603 (511066220021128194052) Content-Type: text/html From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] X-Mailer: PHP/ My php.ini has an smtp entry but no sendmail is running on the local machine. Do I have to have one running? I wish I did not have to do it. Any other way to fix this issue? Carlos Fernando Scheidecker Antunes Linux User #207984 --- End Message --- --- Begin Message --- Has anyone had experience with PHP or a mail server setting the X-Return-Path header on mail sent using PHP's mail() command? Our tests indicate the X-Return-Path is being set to the "sendmail_from" address found in php.ini. Our code definately isn't doing it, as a hello-world mail() example proved. The system is running Win 2K, all current service packs and hot fixes, IIS 5, php 4.2.3 (running as a CGI), and the Zend optimizer 2.0.1. The mail server is Microsoft Exhange Server. Does anyone know why the webserver or mail server would set the X-Return-Path, and if it can be suppressed? Regards, Darren Fehrmann Storefront.com --- End Message --- --- Begin Message --- Thanks for replying, Now I know it's possible to do it, but I still don't know how can I develop such interface, I will do it in php and mysql, but I need a little guidance with the way to do it I just can't figure out how ... Thank you Ricardo Fitzgerald - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Wednesday, November 27, 2002 10:34 AM Subject: Re: [PHP] Is it possible to do this in PHP ? If it is then, how ? > Using javascript you can change the src of image. So you start with > blank image, and if onchange > event handler finds out the input field has two chars, changes the src > of the image to say show_image.php?id=input.value > > Axis Computers wrote: > > >Hi, > > > >I was wondering if this is possible to in PHP ... I am developing an > >application for a pizza place, where touch typing interface is much faster &g
php-general Digest 30 Nov 2002 00:18:12 -0000 Issue 1734
php-general Digest 30 Nov 2002 00:18:12 - Issue 1734 Topics (messages 126465 through 126505): OpenSSL Encryption to a browser. 126465 by: Comunica2 s. coop. 126468 by: Dan Hardiker Re: Multidimensional arrays (more and more...) 126466 by: Ford, Mike [LSS] Re: File handling 126467 by: Justin French 126484 by: Maxim Maletsky array with session 126469 by: Laurence 126470 by: Craig 126471 by: Craig 126505 by: Justin French First PHP 126472 by: heikkikk 126473 by: Khalid El-Kary 126494 by: John Nichel 126496 by: CC Zona 126503 by: Godzilla Upload wont work, OS X 126474 by: magnus nilsson 126479 by: Beth Gore 126500 by: magnus nilsson Re: Logging out and session ids 126475 by: Gerard Samuel 126489 by: Tom Rogers Re: Werid problemswith mail() command: From address on sent messages 126476 by: Chris Hewitt Re: how to use mssql_connect()? 126477 by: Chris Hewitt Re: rewrite urls with preg_replace 126478 by: Dieter Koch php and https 126480 by: DUPUIS Grégoire BE/DGC 126485 by: Marco Tabini 126487 by: DUPUIS Grégoire BE/DGC Re: Help with login/redirect/insert to dbase 126481 by: Maxim Maletsky Re: file creation date 126482 by: Maxim Maletsky Re: Help with the PHP 126483 by: Maxim Maletsky Multiuser System with Sessions 126486 by: Anson LeClair Enable Quota function with php 126488 by: EdwardSPL.ita.org.mo Convert dates 126490 by: Sturle 126491 by: John W. Holmes How to access properties of objects within objects 126492 by: Randall Perry Re: Detecting email bounces sent by the mail function? 126493 by: John Nichel Re: imap Server support Quota] 126495 by: EdwardSPL.ita.org.mo Sessions not written to db on windows... 126497 by: Gerard Samuel Re: Bad File Mode? 126498 by: Steve Keller YATS on OS X 126499 by: Adam Atlas Test links? 126501 by: Rob Packer 126502 by: Jason Reid Re: Is it possible to do this in PHP ? If it is then, how ? 126504 by: Axis Computers Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- I would like to use OpenSSL to send encrypted information to a browser. The information would be encrypted to a public key that has its private counterpart installed in the browser. The idea is that the information would be decrypted automatically, but only when the destination browser has the right private key installed. Would it be possible to us header("Content-type: multipart/encrypted"), since it is originally meant for messages? -- René --- End Message --- --- Begin Message --- > I would like to use OpenSSL to send encrypted information to a browser. > The information would be encrypted to a public key that has its private > counterpart installed in the browser. The idea is that the information > would be decrypted automatically, but only when the destination browser > has the right private key installed. Most people would leave apache (usually with mod_ssl) to handle the encryption over https. Im not even sure if you could do what I think you are asking without controlling the whole http communication (as the whole thing is SSL wrapped, or none of it). > Would it be possible to us header("Content-type: multipart/encrypted"), > since it is originally meant for messages? I think you need to look into one of the following: - Handling the requests yourself by listening to port 80 (not advisable - php wasnt built for that sort of task, but its possible) - Using ssl certificate pairs and installing them in a custom manner on the apache installation - Alternative methods PS: if your not using apache, I cant help you at all. Others may. --- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software & Systems Engineer First Creative --- End Message --- --- Begin Message --- > -Original Message- > From: Mako Shark [mailto:[EMAIL PROTECTED]] > Sent: 28 November 2002 18:20 > > A little more info on my count()ing. > I have $issue[0]["number"] to $issue[x]["number"] just > like any other multidimensional array (we'll call them > m-arrays for simplicity). > > If I try to count($issue), I'll get all instances of > my array (instances?) mltipled by the number of > elements Uh -- have you actually tried this? Without doing so myself, I'm 99% sure that count($issue) will give you the answer you're looking for -- i.e. the number of different subscripts in the first dimension. F
php-general Digest 30 Nov 2002 12:31:53 -0000 Issue 1735
php-general Digest 30 Nov 2002 12:31:53 - Issue 1735 Topics (messages 126506 through 126526): Method for displaying downline 126506 by: Daren Cotter 126510 by: Daren Cotter 126512 by: Daren Cotter Re: How Do I install php on Apache 2.0 126507 by: -<[ Rene Brehmer ]>- Re: First PHP 126508 by: -<[ Rene Brehmer ]>- imap_open authentication failure 126509 by: Dumdeedum Re: & in Query String 126511 by: Malcolm Brownell test for ascii or binary string 126513 by: Jonathan Sharp 126514 by: Jonathan Sharp 126515 by: Morgan Hughes 126523 by: Paul Chvostek string 126516 by: Remon Redika 126517 by: Kyle Gibson PHP & Javascript compatibilty 126518 by: Wee Keat [Amorphosium] 126519 by: Kyle Gibson About Speech 126520 by: Ing. Raúl González Rodríguez Re: Test links? 126521 by: Jason Wong Re: Upload wont work, OS X 126522 by: Jason Wong Re: Hello ! How to write a programme in PHP which executes a routine at a given time ? 126524 by: Paul Chvostek Re: Multidimensional array 126525 by: Paul Chvostek Re: OpenSSL Encryption to a browser. 126526 by: Tony Earnshaw 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 need to display an entire downline (info about all members referred by another member). The query to actually get the info I need is fairly simple, but displaying it in a table is what's tripping me up. There are two tables: Affiliates and Referrals. Affiliates keeps track of all affiliate info. Referrals keeps track of who referred who (AffID and ReferredBy fields). The output I need is something like: 7 10 11 14 16 18 20 26 28 31 34 36 38 41 44 Where 7 referred 10 and 11, 10 referred 14 and 16, 14 referred 26 and 28, etc. Each member can only refer two others. I know some sort of looping (possibly recursion?) structure is needed, but I can't figure out how to display the output in tables as shown above. Any help would be greatly appreciated! __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com --- End Message --- --- Begin Message --- I need to display an entire downline (info about all members referred by another member). The query to actually get the info I need is fairly simple, but displaying it in a table is what's tripping me up. There are two tables: Affiliates and Referrals. Affiliates keeps track of all affiliate info. Referrals keeps track of who referred who (AffID and ReferredBy fields). The output I need is something like: 7 10 11 14 16 18 20 26 28 31 34 36 38 41 44 Where 7 referred 10 and 11, 10 referred 14 and 16, 14 referred 26 and 28, etc. Each member can only refer two others. I know some sort of looping (possibly recursion?) structure is needed, but I can't figure out how to display the output in tables as shown above. Any help would be greatly appreciated! __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com --- End Message --- --- Begin Message --- I need to display an entire downline (info about all members referred by another member). The query to actually get the info I need is fairly simple, but displaying it in a table is what's tripping me up. There are two tables: Affiliates and Referrals. Affiliates keeps track of all affiliate info. Referrals keeps track of who referred who (AffID and ReferredBy fields). The output I need is something like: 7 10 11 14 16 18 20 26 28 31 34 36 38 41 44 Where 7 referred 10 and 11, 10 referred 14 and 16, 14 referred 26 and 28, etc. Each member can only refer two others. I know some sort of looping (possibly recursion?) structure is needed, but I can't figure out how to display the output in tables as shown above. Any help would be greatly appreciated! __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com --- End Message --- --- Begin Message --- Hi Adam Voigt, On 27 Nov 2002 11:44:49 -0500, you wrote about "Re: [PHP] How Do I install php on Apache 2.0" something that looked like this: >A. What does having Adobe installed matter? Where'd you get that??
php-general Digest 1 Dec 2002 00:36:26 -0000 Issue 1736
php-general Digest 1 Dec 2002 00:36:26 - Issue 1736 Topics (messages 126527 through 126580): Re: Multidimensional arrays (more and more...) 126527 by: Paul Chvostek 126529 by: Paul Chvostek Re: test for ascii or binary string 126528 by: Beth Gore 126532 by: Ernest E Vogelsinger Re: Method for displaying Downline 126530 by: Rick Widmer 126531 by: Rick Widmer Re: Test links? 126533 by: Rob Packer 126538 by: Jason Wong 126551 by: Rob Packer 126555 by: Jason Wong 126560 by: Beth Gore 126562 by: Chris Hewitt 126579 by: Rob Packer Quota function 126534 by: EdwardSPL.ita.org.mo 126535 by: Jason Wong 126539 by: EdwardSPL.ita.org.mo 126541 by: Michael Sims Language codes to textual languages. 126536 by: Noodle Snacks Re: About Speech 126537 by: Mark Charette Re: How Do I install php on Apache 2.0 126540 by: Tweak2x Going Mad 126542 by: Andy 126543 by: Chris Hewitt 126544 by: Phil Driscoll 126545 by: Chris Hewitt 126546 by: Andy 126547 by: Chris Hewitt 126548 by: Andy 126556 by: Phil Driscoll 126558 by: Chris Hewitt 126565 by: Chris Hewitt How to override header info in mail() 126549 by: Phil Powell 126557 by: Paul Nicholson 126580 by: Paul Nicholson last updated ? 126550 by: Paul O'Neil 126552 by: Beth Gore 126559 by: Chris Hewitt PHP confirmation window 126553 by: Lars Espelid 126563 by: Jason Sheets Page break 126554 by: Lars Espelid OS X and cURL Issues 126561 by: Weston Houghton 126564 by: Sterling Hughes Redirect opening in a new window 126566 by: Troy May 126568 by: Jason Sheets 126569 by: Troy May Function passed as argument to function 126567 by: Jeffrey B.Ferland 126572 by: Jason Wong 126574 by: Jeffrey B.Ferland 126578 by: Jason Wong Read Files 126570 by: Randum Ian 126571 by: Randum Ian 126573 by: Chris Wesley 126575 by: Randum Ian 126577 by: Randum Ian domxml? 126576 by: Devin 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 --- Well, counting is easy... count($issue) will be correct. If you want to count things that match only specific elements, use things like: $c=0; foreach($issue as $what) if ( $year==2003 && $month>=5 ) $c++; As I said in the previous email, to sort by array elements, you'd need to use array_multisort. Something like... $sortkey=array(); foreach($issue as $what) $sortkey[]=$what['number']; array_multisort($issue,$sortkey); And for looping, foreach is still your best bet: foreach($issue as $key => $what) { if ($what['senttosubscribers']==0) $issue[$key]['description'].=" (EMPTY)"; else $issue[$key]['description'].=str_replace(" (EMPTY)","",$what['description']); } With regard to PHP being "screwey", I haven't found this -- I use multidimensional arrays quite a bit and find that they behave exactly as I would predict. Maybe I'm just lucky. ;-) p On Thu, Nov 28, 2002 at 09:55:25AM -0800, Mako Shark wrote: > > Wow. This goes way beyond simply printing > multidimensional arrays. Here's some sample data: > > $issue[]["number"] = "number"; > $issue[]["headline"] = "headling"; > $issue[]["writers"] = "writers"; > $issue[]["list"] = "list"; > $issue[]["senttosubscribers"] = "0"; > $issue[]["month"] = "05"; > $issue[]["year"] = "2003"; > $issue[]["description"] = "description"; > > What I need to do now is count(), sort() by number, > and loop through this array. > > I read that PHP is screwy when counting and sorting > multidimensional arrays, but they *have* to have come > up with a method, right? -- Paul Chvostek <[EMAIL PROTECTED]> Operations / Abuse / Whatever +1 416 598- it.canada - hosting and development http://www.it.ca/ --- End Message --- --- Begin Message --- On Thu, Nov 28, 2002 at 10:19:38AM -0800, Mako Shark wrote: ... > My problem is I need to loop through these. So I can't > just assume that the count is count($issue[]) divided > by 8, because that won't wo
php-general Digest 1 Dec 2002 13:25:08 -0000 Issue 1737
php-general Digest 1 Dec 2002 13:25:08 - Issue 1737 Topics (messages 126581 through 126598): Re: last updated ? 126581 by: Morgan Hughes Re: Read Files 126582 by: Chris Wesley login_script_help needed. 126583 by: Karl James 126585 by: Maxim Maletsky 126592 by: Andrew Brampton Re: Page break 126584 by: Justin French Re: Redirect opening in a new window 126586 by: Maxim Maletsky Problem importing LARGE text file. 126587 by: CDitty Re: Test links? 126588 by: Hugh Danaher 126590 by: Jason Wong Session Variables Not Being Passed 126589 by: Jami Guestbook 126591 by: Vicky 126593 by: Thomas Seifert 126594 by: Jason Wong 126595 by: sfasf saff Inheritance problem 126596 by: Bernard Chamberland 126597 by: Tom Rogers anyone askin for Page Breaks ! 126598 by: sfasf saff 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 --- > >Dumb question here but whats the general practice regarding putting a > >"website last updated:" entry on a web page? Does the web master manually > >enter in today's date in a database table entry and let PHP display. Is it > >statically added to the HTML page? Etc... > If you want "website last updated" then from a database sounds OK but > where I'm working its commonly a "page last updated" wanted. In this > case its just a manually entered date in html in the page. Or use stat() to get the page's mtime, something like Which will be automatically updated... -- Morgan Hughes C programmer and highly caffeinated mammal. [EMAIL PROTECTED] ICQ: 79293356 --- End Message --- --- Begin Message --- On Sat, 30 Nov 2002, Randum Ian wrote: > Ministry is the name of the club. > Full is the type of the content. > 6122002 is the date - It is in the form ddmm so the example here is > 6th December 2002. > Is there a simple way I can just grab the date and sort it by order? > Should I change the format of the date to make it easier or something? It'd be easier to sort if you changed your date format a bit ... what you have is rather difficult to work with, unless you take the string apart. (i.e. - How is '7102002' not greater than '6122002'?) For simplicity & ease, I work with date strings formatted as "MMDD". If your files were named "something-full-MMDD", you could get a sorted array of your files easily. $interestingFiles = array(); $dir = opendir( "/path/to/directory" ) or die( "Could not open dir" ); while( $dirEntry = readdir( $dir ) ){ if( ereg( "full-([0-9]{8})", $dirEntry, $MATCH ) ){ $interestingFiles[$MATCH[1]] = $dirEntry; } } ksort( $interestingFiles ); g.luck, ~Chris --- End Message --- --- Begin Message --- http://www.ultimatefootballleague.com/Create_Account.phps hey people I was wondering if anyone can tell me why I cant get this script to work. Or do you have an easier one I can use.. Thanks Karl --- End Message --- --- Begin Message --- what is on your line 22? -- Maxim Maletsky [EMAIL PROTECTED] On Sat, 30 Nov 2002 20:46:12 -0800 "Karl James" <[EMAIL PROTECTED]> wrote: > http://www.ultimatefootballleague.com/Create_Account.phps > > hey people > > I was wondering if anyone can tell me why I cant get this script to > work. > > Or do you have an easier one I can use.. > > Thanks > Karl --- End Message --- --- Begin Message --- Well quickly looking at the code I can't see what line is causing the Warning: Cannot add header information but there have been many discussion explaining why this happens... as for your Unknown MySQL Server Host '$198.63.221.3' the error for that is on the line: if(!($link_id = mysql_connect($198.63.221.3, $Ultimatefootball, $kjames1973))) die(mysql_erorr()); I think the line would look better like: $link_id = mysql_connect('198.63.221.3', 'Ultimatefootball', 'kjames1973') or die(mysql_erorr()); (might be a good idea to change your password now btw (since you have shown everyone)) Hope that gets you started Andrew - Original Message - From: "Karl James" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 01, 2002 4:46 AM Subject: [PHP] login_script_help needed. > http://www.ultimatefootballleague.com/Create_Account.phps > > hey people > > I was wondering if anyone can tell me why I cant get this script t
php-general Digest 2 Dec 2002 13:33:15 -0000 Issue 1739
php-general Digest 2 Dec 2002 13:33:15 - Issue 1739 Topics (messages 126660 through 126712): Re: Disable refresh? 126660 by: Larry Brown 126661 by: Martin Towell 126663 by: Larry Brown 126683 by: Ernest E Vogelsinger 126686 by: phpnew_bocket 126698 by: Marek Kilimajer Re: [PHP-INST] OS X and Curl Issues 126662 by: Randall Perry Re: XTemplate 126664 by: Oleg Krogius Passing arguments to the same script 126665 by: Troy May 12 by: John W. Holmes 126667 by: Troy May 126668 by: Kyle Gibson 126669 by: Chris Wesley 126670 by: John W. Holmes 126671 by: Jonathan Sharp 126672 by: Jonathan Sharp 126673 by: Troy May 126674 by: Troy May 126704 by: Marek Kilimajer header() and target page 126675 by: Jami 126676 by: John W. Holmes 126688 by: phpnew_bocket Re: includes & globals 126677 by: Cesar Aracena 126678 by: Tom Rogers 126689 by: Marek Kilimajer Why all the returned emails from this list? 126679 by: Troy May Dynamically Adding methods to an object 126680 by: Brian Takita some data output formatting and grouping question... 126681 by: Victor 126682 by: Bastian Vogt 126693 by: Marek Kilimajer page auto reload after new window closed 126684 by: Michael P. Carel 126685 by: Ernest E Vogelsinger 126691 by: Marek Kilimajer Re: last updated ? 126687 by: Chris Hewitt How do I run a command as root? 126690 by: Luke van Blerk 126692 by: Luke van Blerk 126694 by: John Wards 126695 by: Jon Haworth 126696 by: Marek Kilimajer 126697 by: Matthieu Le Corre Failed php module load 126699 by: bob pilly 126712 by: Ford, Mike [LSS] Newbie Question 126700 by: hacook 126701 by: Jon Haworth How to get/wait for user-input? 126702 by: Martin Thoma 126703 by: Marek Kilimajer PHP and WebDAV 126705 by: Adam.Whitehead.csm.com.au Cache caches anyway, regardless 126706 by: Elmota Abdul Ayyash 126708 by: Justin French Who can tell me the best php-base webmail? 126707 by: joskey.lianluo.com 126710 by: Jon Haworth Re: Date problem 126709 by: Rosen Re: Sessions not written to db on windows... 126711 by: Ford, Mike [LSS] 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 --- If not, is there a variable that provides information that a refresh occurred to load the page? Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: Larry Brown [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 01, 2002 8:23 PM To: PHP List Subject: [PHP] Disable refresh? Anyone know of a method of preventing a user from refreshing a page. I get multiple updates with the same information in my database... Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- --- Begin Message --- no, no way to disable and no variable to say a refresh happened one way to get around it is to submit to the page that does the update, then get that page to do a header("location...") to another page. When the user refreshes, they'll only refresh the last page, and not the updating page. HTH Martin -Original Message- From: Larry Brown [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 12:33 PM To: PHP List Subject: RE: [PHP] Disable refresh? If not, is there a variable that provides information that a refresh occurred to load the page? Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: Larry Brown [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 01, 2002 8:23 PM To: PHP List Subject: [PHP] Disable refresh? Anyone know of a method of preventing a user from refreshing a page. I get multiple updates with the same information in my database... Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- 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 --- Thanks guys this forum is going to get me in trouble. It is so convenient I keep asking questions too soon. After submitting the amendment to the original question I thought of the solution of setting a session variable and then clearing it before and after the submittal page. I'll work the gray mat
php-general Digest 3 Dec 2002 13:41:08 -0000 Issue 1741
php-general Digest 3 Dec 2002 13:41:08 - Issue 1741 Topics (messages 126791 through 126846): Re: dynamic arraynames 126791 by: Floyd Baker Re: printing array 126792 by: . Edwin 126793 by: Matt Re: IIS 5 126794 by: . Edwin Validating get and post data 126795 by: Beth Gore 126802 by: Matt 126803 by: . Edwin 126804 by: John W. Holmes 126806 by: . Edwin 126822 by: Tom Rogers 126825 by: Tom Rogers 126833 by: Ford, Mike [LSS] Re: PHP --with-dbm enabled??? 126796 by: . Edwin Need advice on downloading files and databases 126797 by: Dara Dowd 126819 by: Jason Wong PHP and the PDFlib 126798 by: Ryan Smaglik 126799 by: Morgan Hughes 126807 by: Marco Tabini Re: Browser going to page twice? 126800 by: Leif K-Brooks Comment Threading 126801 by: Beth Gore 126818 by: Philip Hallstrom How to handle "so called" expired sessions?? 126805 by: Gerard Samuel 126820 by: Tom Rogers 126823 by: Gerard Samuel [JOB] Senior Developer (PHP/Perl/Java/SQL), Washington DC Area 126808 by: Alok K. Dhir Re: PDF Help Please 126809 by: Larry Brown Can't get this right 126810 by: John Taylor-Johnston hiding php 126811 by: Larry Brown 126812 by: Peter Houchin 126813 by: Rasmus Lerdorf 126816 by: Justin French 126821 by: Larry Brown 126824 by: Jason Wong 126827 by: Serge A. 126830 by: Dan Hardiker 126834 by: Ford, Mike [LSS] 126840 by: Dan Hardiker Re: Show Folder Contents in Form 126814 by: . Nilaab easiest way to get 1st and last dates of the month? 126815 by: Justin French 126817 by: Justin French 126832 by: Ford, Mike [LSS] Does using msql_select_db excessively burn resources? 126826 by: Rob Paxon Re: Date problem 126828 by: James Coates 126835 by: Jason Wong Pear vs Phplib vs adodb 126829 by: David Eisenhart object method overloading 126831 by: Javier Montserat writing to mysql using php 126836 by: Shams does anybody know PHPlib's source site? 126837 by: Alexander A. Savenkov Problem: Only 1 fsockopen() connection for apache at a time. 126838 by: William Bailey mail with CC and BCC 126839 by: Alain ROMERO 126843 by: Jason Wong Re: php5 features? 126841 by: Brad Young [SEMI-OT] Making secure flash high scoring? 126842 by: Leif K-Brooks variable num of function args 126844 by: christian haines 126845 by: christian haines need advice on template engine 126846 by: Alexander A. Savenkov 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 --- Just want to thank everyone and tell how it finally came out... I was making way to much of this and went into difficult concepts too quickly. That's where the problem came from. Trying to build on earlier mistakes. We already had an array for the column names so a suggestion that I use one single array for all the data columns works out the best. Now I'm unwinding that one long array according to how many name fields there are in each row. As each process is done, the fields are there in the original column order, no matter how big the x-y grid is. The data from the 'basic' column arrays is also going to be included in the single array too. I'm not a wiz by any means so creating the best application 'method' can be rough no matter what I know about the individual functions. The *single* array just never dawned on me. Thanks for the help... :-) Floyd On Fri, 29 Nov 2002 11:47:56 -, you wrote: >> -Original Message- >> From: Floyd Baker [mailto:[EMAIL PROTECTED]] >> Sent: 28 November 2002 17:09 > >OK, I think I'm finally beginning to understand what you're up to, and it seems to me >everyine's been making rather heavy weather of it so far! > >> The user's choice is made from a drop down list of available items, >> prior to running the routine itself. The choices are predetermined >> and kept in a personal table to be called by the routine. This part >> is finished to the point of putting the needed column names at the top >> of the input columns on the form. The choices are fixed spellings to >> match formula if-then's, etc. > >If this is the case, couldn't you use 2-dimensional arrays with the column names as >the first dimension, and the values rela
php-general Digest 6 Dec 2002 14:18:32 -0000 Issue 1747
php-general Digest 6 Dec 2002 14:18:32 - Issue 1747 Topics (messages 127216 through 127255): Re: Sending no content-type header? 127216 by: Chris Wesley 127217 by: Leif K-Brooks Need Redirection Trick... 127218 by: . Nilaab 127223 by: Jason Wong 127224 by: Roger Lewis 127226 by: . Nilaab Re: PHP includes without access to the default directory 127219 by: Morgan Hughes 127225 by: Tom Rogers Re: 127220 by: Karl James empty string parameters to backslashes? 127221 by: andyw.scroom.com 127237 by: DL Neil Re: MySQL ? 127222 by: Justin French 127227 by: Tom Rogers md5 question 127228 by: conbud 127229 by: Chris Wesley 127232 by: Jason Wong Making random string function function more random? 127230 by: Leif K-Brooks $DOCUMENT_ROOT 127231 by: christopher calicott HOW GET ALL HTML CONTENT 127233 by: nice_boy ezmlm 127234 by: Randum Ian 127235 by: Jason Wong Re: How to create user in mySQL ? 127236 by: Krzysztof Dziekiewicz Re: Repeating Decimals 127238 by: Marek Kilimajer 127249 by: Tom Rogers PHP query to javascript array 127239 by: Christian Ista 127242 by: Marek Kilimajer Re: Checking for Overlapping Dates 127240 by: DL Neil 127246 by: DL Neil GD support in PHP 4.1.2 127241 by: GoodnGo.de \(R\) Zentrale Cookies help please 127243 by: Steve Vernon --with-gd=DIR 127244 by: GoodnGo.de \(R\) Zentrale 127245 by: info.t-host.com 127253 by: Tom Rogers Output of MySQl sorted query to text or Word file. 127247 by: ed.home.homes2see.com 127255 by: Tim Ward How to loop diplays of 4 column of items, every row? 127248 by: Wee Keat [Amorphosium] 127251 by: Chris Boget 127252 by: Marek Kilimajer mail function() with MS 127250 by: Anthony Ritter Check wheter GD function is working 127254 by: info.t-host.com 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 Thu, 5 Dec 2002, Leif K-Brooks wrote: > I'm running a few simple php scripts from the (windows) command line. > Since I'm not using a web browser to view it, the HTTP headers are > annoying and pointless. I've turned expose_php off in php.ini, but > commenting out default_mimetype changes nothing, and setting it to an > empty string sends a blank content-type header. Is there any way to do > this? php.exe -q ~Chris --- End Message --- --- Begin Message --- Ok, thanks a lot. For what it's worth, here's my simple .bat file for executing php files: @ECHO OFF IF NOT EXIST %1.php goto usage php.exe -q %1.php goto end :usage echo ÚÄÄÄ¿ echo ³ USAGE ³ echo ³Type "php.bat" (without quotes)³ echo ³ followed by the name of a³ echo ³valid php file without the .php³ echo ³extension. ³ echo ÀÄÄÄÙ :end Chris Wesley wrote: On Thu, 5 Dec 2002, Leif K-Brooks wrote: I'm running a few simple php scripts from the (windows) command line. Since I'm not using a web browser to view it, the HTTP headers are annoying and pointless. I've turned expose_php off in php.ini, but commenting out default_mimetype changes nothing, and setting it to an empty string sends a blank content-type header. Is there any way to do this? php.exe -q ~Chris -- 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. --- End Message --- --- Begin Message --- Hello Everyone, I have a simple problem that, I think, might require a little trick to be used. I have a list of products in a database that is organized by categories and subcategories. Categories can have as many subcategories as it wants, but some categories don't need to have a subcategory at all. In the following code "cat" refers to category and "subcat" refers to subcategory. cat_data and subcat_data refers to a multi-dimentional array, pulled from the DB, with values of an id and a name. example: cat_data[row_number][name_of_category] and cat_data[row_number][id]. Ok, before I ask the question, here's the code: [-- snip --] get_cat_data(); for ($i=0; $i < count($cat_data); $i++) { echo '' . $cat_data[$i]["name"] . "\n"; if ($cat_id) { $subcat_data = $db->get_subcat_data($cat_id); if ($subcat_data != 0 && ($cat_id == $cat_data[$i]["id"
php-general Digest 7 Dec 2002 15:46:03 -0000 Issue 1749
php-general Digest 7 Dec 2002 15:46:03 - Issue 1749 Topics (messages 127352 through 127377): Re: mail() problems... 127352 by: Anthony Ritter 127372 by: Jason Wong 127376 by: Anthony Ritter Date again 127353 by: Miguel Brás 127356 by: Stephen 127371 by: Jason Wong Re: XSLT failing when DOCTYPE declaration present 127354 by: Dave 127355 by: Dave 127368 by: Chris Wesley Re: Help! Stuck! Perm denied w/ fopen. 127357 by: Dave 127375 by: psy berpunk Re: Middle Number 127358 by: Rick Widmer Re: HOW GET ALL HTML CONTENT 127359 by: Dave Re: Repeating Decimals 127360 by: Tom Rogers 127377 by: Stephen Humour me 127361 by: John Taylor-Johnston 127363 by: . Edwin 127369 by: Jerry M. Howell II Re: Generating forms using OOP 127362 by: Peter J. Schoenster 127367 by: Tom Rogers 127373 by: Davy Obdam 127374 by: Davy Obdam Re: Output page cut off after 7000 characters 127364 by: Tom Rogers Re: PHP includes without access to the default directory 127365 by: Tom Rogers Re: Confused about $_SESSION and $_COOKIE scope.. 127366 by: Tom Rogers Re: Allowed memory size exhausted 127370 by: . Edwin 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 --- To all who assisted me today. I finally managed to get the mail () funtion to work. Thank you and happy holidays to you all... TR --- End Message --- --- Begin Message --- On Saturday 07 December 2002 12:16, Anthony Ritter wrote: > To all who assisted me today. > > I finally managed to get the mail () funtion to work. Would you mind disclosing what you did to make it work? Those searching the archives in generations to come would appreciate what the conclusion was. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Reply hazy, ask again later. */ --- End Message --- --- Begin Message --- Jason Wong wrote: > Would you mind disclosing what you did to make it work? Those searching the > archives in generations to come would appreciate what the conclusion was. . Sure. 1. I put it the _correct _name of my ISP's mailserver. No more errros. However...that sent out the mail but I didn't receive it back. Then... 2. I received a nice e-mail from Ms. Meloni explaining that I forget to replace the string in the variable: $to with _my_ e-mail address - not _hers_. She was getting my test e-mails. Oh brother... Happy holidays and thank you for your help. TR --- End Message --- --- Begin Message --- Ok guys, having a problem here. I did my table with 6 fields, they are: id position name timein timeout date I have a form to insert the info on the fields, and at the date field, I have a drop down menu that returns me the next 7 days (the date in d/m/y), people will choose the date they want and that will be stored on the table. Now I want to retrieve the position, name, timein and timeout from by table and display it on a page. But I want only the records for the present date. I inserted the info on my table and on the date's field I inserted 07/12/02 and 06/12/02 just for testing I called the data via a query: SELECT position, name, timein, timeout, date FROM table WHERE date=NOW() It was supposed that only the record from the present date was shown. But not, I can't have anything. Only the custom message I did if nothing was available What is missing here? Looked at PHP manual, time, date mktime and so on functions, but nothing. Anybody for a hand? One more thing, how can I do to prevent that different people apply for a same position, on the same day and during the "shift" of the first one that applied? I mean, I decide to occupy the FSS position from 21:00 to 23:00 on 08th Decemeber. Someone come and try to apply also for FSS but from 19:00 to 20:30 or from 21:30 to 22:30. Since the position is occupied during a portion of the requested time or during all the requested time, how can I prevent this to be added on the table?? Thx Miguel --- End Message --- --- Begin Message --- Not sure but I think now() doesn't return the date formate you'd want assuming your date section is classified as a date. Here's what I would do: $date = date("Y-m-d"); $sql = "SELECT * FROM table WHERE date='".$date"'"; $result = mysql_query($sql, $connection); Hope it works! - Original Message - From: "Miguel Brás" <[EMAIL PROTECTED]> To: &l
php-general Digest 8 Dec 2002 04:31:57 -0000 Issue 1750
php-general Digest 8 Dec 2002 04:31:57 - Issue 1750 Topics (messages 127378 through 127413): save file from outside url 127378 by: Jeremiah Breindel 127382 by: Jason Wong 127383 by: Jeremiah Breindel Re: redirect URL 127379 by: John W. Holmes Simple text editor for Windows? 127380 by: John W. Holmes 127381 by: Tim Ward 127386 by: Tom Rogers 127388 by: DL Neil 127389 by: Tom Rogers 127395 by: Jonathan 127398 by: John W. Holmes passing argument between scripts 127384 by: Geert Arts 127385 by: Andrew Brampton Re: Repeating Decimals 127387 by: Tom Rogers 127390 by: Stephen Re: PHP includes without access to the default directory 127391 by: Gundamn Spaces 127392 by: Patrick McKinley 127393 by: Leif K-Brooks 127394 by: Patrick McKinley 127397 by: John W. Holmes Help on OOP 127396 by: Mohd_Q 127399 by: Khalid El-Kary 127400 by: Khalid El-Kary 127407 by: Matt Giddings 127408 by: Khalid El-Kary PHP trouble out of the box 127401 by: Dennis Putnam Re: Good eve 127402 by: rolf vreijdenberger Re: Middle Number 127403 by: Stephen 127409 by: Rick Widmer Finding Mode 127404 by: Stephen 127410 by: Rick Widmer 127412 by: Stephen Re: String to an Array 127405 by: Justin French 127411 by: Rick Widmer Re: Question about displaying directories and files 127406 by: Justin French Just Curious 127413 by: conbud 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 am trying to save a dynamically generated image on an outside server to a local file on my server using the code below: $fc = fopen($image_filename, "wb"); $file = fopen ($image_url, "rb"); if (!$file) { echo "Unable to open remote file.\n"; exit; }else{ while (!feof ($file)) { $line = fread ($file, 1028); fwrite($fc,$line); } } fclose($fc); fclose($file); $image_filename is a locally referred to file, such as "../images/file1.png" and $image_url is an absolute address, such as "http://www.whatever.com/imagecreate.php";. Instead of saving when I run the script through a browser, the image displays within the browser, and the script creates a file containing only "427" on the server. Any ideas why or what I can do to correct this? Jeremiah --- End Message --- --- Begin Message --- On Saturday 07 December 2002 05:12, Jeremiah Breindel wrote: > I am trying to save a dynamically generated image on an outside server to a > local file on my server using the code below: > > $fc = fopen($image_filename, "wb"); > $file = fopen ($image_url, "rb"); > > if (!$file) { > echo "Unable to open remote file.\n"; > exit; > }else{ > while (!feof ($file)) { >$line = fread ($file, 1028); >fwrite($fc,$line); > } > } > fclose($fc); > fclose($file); > > > $image_filename is a locally referred to file, such as > "../images/file1.png" and $image_url is an absolute address, such as > "http://www.whatever.com/imagecreate.php";. > > Instead of saving when I run the script through a browser, the image > displays within the browser, and the script creates a file containing only > "427" on the server. Any ideas why or what I can do to correct this? Hmm, I don't see how the above code can make the remote image *display* your browser. The code itself looks OK, are there some parts of the code that you haven't shown us? If the above is indeed your complete code, then what is your $image_url? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Things will be bright in P.M. A cop will shine a light in your face. */ --- End Message --- --- Begin Message --- Thanks for responing Jason! There is other code in there for updating some database entries and producing a confirmation page, but I had them working perfectly before I added the image code below. Only when acessing the outside script and saving to file did it start doing the odd things. I didn't write the image creation script, only hard coded in some values for font and bg colors in it. I have attached that script at the bottom of this, away from everything else. Maybe a header problem from that script? Any idea what 427 is from? Thanks for all your help! The $image_url is like
php-general Digest 8 Dec 2002 16:38:31 -0000 Issue 1751
php-general Digest 8 Dec 2002 16:38:31 - Issue 1751 Topics (messages 127414 through 127436): Re: Just Curious 127414 by: Leif K-Brooks 127415 by: Justin French 127419 by: Kyle Gibson 127420 by: rolf vreijdenberger 127422 by: Thomas Seifert 127424 by: Davy Obdam 127427 by: Henrik Malmberg Question about Trim 127416 by: Dade Register 127418 by: Justin French Free Util: apxDebug 127417 by: Weston Houghton Dumb session cookie question? 127421 by: Douglas Douglas 127423 by: Justin French 127428 by: Robert Pruitt Snoopy Class 127425 by: DL Neil Domxml and problem 127426 by: Winthux Re: save file from outside url 127429 by: Jason Wong Re: Finding Mode 127430 by: Ford, Mike [LSS] open_basedir 127431 by: Przemys³aw ¯ó³czyñski PRV force download with header() 127432 by: Patrick McKinley 127433 by: Marco Tabini mysql_connect problem under RedHat 8.0 ? 127434 by: Brian J. Celenza LogIn check within function within class :: HELP! 127435 by: Sean Mayhew 127436 by: Tom Rogers 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 use the mailing list. conbud wrote: I was just curious, but what program or website do you all use to view and reply to the newsgroups with ? Lee -- 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. --- End Message --- --- Begin Message --- I use the e-mailing list, not the newsgroup... but I think there is an *experimental* web based interface to the newsgroup at http://news.php.net, and most mail readers (outlook, outlook express and netscape I know for sure) can all read news. on 08/12/02 3:31 PM, conbud ([EMAIL PROTECTED]) wrote: > I was just curious, but what program or website do you all use to view and > reply to the newsgroups with ? > > Lee > > Justin French http://Indent.com.au Web Development & Graphic Design --- End Message --- --- Begin Message --- I was just curious, but what program or website do you all use to view and reply to the newsgroups with ? Fun Fact # 14: Netscape 7.0 ;) -- Kyle Gibson admin(at)frozenonline.com http://www.frozenonline.com/ --- End Message --- --- Begin Message --- outlook express 6 --- End Message --- --- Begin Message --- Mail/News-Client Sylpheed On Sat, 7 Dec 2002 23:31:57 -0500 [EMAIL PROTECTED] (Conbud) wrote: > I was just curious, but what program or website do you all use to view and > reply to the newsgroups with ? > > Lee > > --- End Message --- --- Begin Message --- Mozilla 1.2.1 ;-) conbud wrote: I was just curious, but what program or website do you all use to view and reply to the newsgroups with ? Lee --- End Message --- --- Begin Message --- Also using Mozilla Davy Obdam wrote: Mozilla 1.2.1 ;-) conbud wrote: > I was just curious, but what program or website do you all use to view > and > reply to the newsgroups with ? > > Lee > > > > > --- End Message --- --- Begin Message --- Hey... I have a question about trim. I don't know if trim() is the right funtion to use, but here is my problem. I am recieving a textarea input from a form and writing it to a data file. I need to change any line breaks or (enter) if you will into a or something else. When it's in my text file, it screws it up. Please, someone give me an idea of how to oversome this. I can't seem to make trim() work at all. It does remove a \n if you type that in, but won't actually remove an (enter). Thanx for your help in advance. -Dade __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com --- End Message --- --- Begin Message --- To convert \n's to \n's on any string, use nl2br(). To trim excess white space (\n, \r, [space] \t, etc) from both the beginning and end of a string, use trim(). Eg: This should echo: --- this is a string with an enter in the middle --- What do you actually want to do, and what's the problem? Justin on 08/12/02 5:28 PM, Dade Register ([EMAIL PROTECTED]) wrote: > Hey... I have a question about trim. I don't know if > trim() is the right funtion to use, but here is my > problem. > > I am recieving a textarea input from a form and > writing it to a data file. I need to change any line > breaks or (enter) if you will into a or something > else. When it's in m
php-general Digest 9 Dec 2002 05:40:32 -0000 Issue 1752
php-general Digest 9 Dec 2002 05:40:32 - Issue 1752 Topics (messages 127437 through 127468): Re: mysql_connect problem under RedHat 8.0 ? 127437 by: Tom Rogers 127438 by: Jason Wong 127439 by: Brian J. Celenza 127440 by: Brian J. Celenza Re: open_basedir 127441 by: Chris Hewitt Re: Finding Mode 127442 by: Paul Chvostek fopen have a "setTimeout" feature? 127443 by: Phil Powell 127451 by: Tim Ward Can I check MYSQL version 127444 by: John Taylor-Johnston 127445 by: Johannes Schlueter 127446 by: John Taylor-Johnston 127448 by: Stephen 127449 by: Chris Knipe Typo -- Re: [PHP] Can I check MYSQL version 127447 by: Johannes Schlueter Hiding URL Variable 127450 by: Stephen 127452 by: Tim Ward Re: Send PHP results in email 127453 by: Malcolm Brownell Re: PHP Configuration - Can't Change Post_Max_Size 127454 by: Malcolm Brownell Re: Simple text editor for Windows? 127455 by: John W. Holmes mpm perchild mod_php4 127456 by: Jochen Kächelin Solaris 127457 by: Kris 127458 by: Peter Houchin 127460 by: Kris date() on two diff. servers 127459 by: Justin French 127461 by: John W. Holmes 127462 by: . Edwin 127463 by: . Edwin 127464 by: Justin French 127465 by: Tom Rogers 127467 by: . Edwin 127468 by: Justin French Re: C# 127466 by: michael kimsal 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 --- Hi, Monday, December 9, 2002, 2:29:35 AM, you wrote: BJC> Hello! BJC> When trying to connect to a mysql database under my linux system, I get the BJC> following error: BJC> Warning: Can't connect to local MySQL server through socket BJC> '/var/lib/mysql/mysql.sock' (2) in /webroot/dbconnect.php on line 2 BJC> Here is a copy of the code I am using: BJC> $link = mysql_connect("localhos" , "username" , "password") BJC> or die("Couldn't Connect."); BJC> ?> BJC> I am currently running Apache with Mysql and PHP version 4 on Redhat 8. Any BJC> suggestions? BJC> Thank you. BJC> -- BJC> --- BJC> Brian J. Celenza BJC> [EMAIL PROTECTED] BJC> ICQ: 100942424 BJC> AIM: BJCKnight If that is the location of the socket (mysql default is /tmp/mysql.sock but I don't know with RH)you could try $link = mysql_connect(":/var/lib/mysql/mysql.sock" , "username" , "password") If that fails, check the permissions of the path to the socket for the apache user and that mysqld is running. -- regards, Tom --- End Message --- --- Begin Message --- On Monday 09 December 2002 00:29, Brian J. Celenza wrote: > Hello! > > When trying to connect to a mysql database under my linux system, I get the > following error: How did you install your apache, mysql & php? Source/RPM? If RPM, where did you get the RPMs? IIRC Redhat's packaging of MySQL differs from that provided by www.mysql.com and this difference could potentially cause the problem you're seeing ... > Warning: Can't connect to local MySQL server through socket > '/var/lib/mysql/mysql.sock' (2) in /webroot/dbconnect.php on line 2 > > Here is a copy of the code I am using: > > > $link = mysql_connect("localhos" , "username" , "password") > or die("Couldn't Connect."); > ?> ... assuming that the above really is a typo and you _are_ using 'localhost' and not 'localhos'. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Your business will assume vast proportions. */ --- End Message --- --- Begin Message --- I'm almost positive that the socket file is in the correct spot. My installation was with Redhat 8.0, I also have mysqlcc installed, and it uses /var/lib/mysql/mysql.sock successfully. - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Sunday, December 08, 2002 11:53 AM Subject: Re: [PHP] mysql_connect problem under RedHat 8.0 ? > On Monday 09 December 2002 00:29, Brian J. Celenza wrote: > > Hello! > > > > When trying to connect to a mysql database under my linux system, I get the > > following error: > > How
php-general Digest 14 Dec 2002 19:55:50 -0000 Issue 1763
php-general Digest 14 Dec 2002 19:55:50 - Issue 1763 Topics (messages 128272 through 128292): Re: Text Fields - How Big Can They Be? 128272 by: Jason Wong Re: Problems with text files from a Mac 128273 by: Justin French Re: Is there any alternative to FuseBox? 128274 by: Jason Wong 128288 by: Javier 128292 by: Jason Wong Re: Mail Error 128275 by: Jason Wong Re: File Upload 128276 by: Tom Rogers 128277 by: Jason Wong 128280 by: Paul Roberts 128281 by: Paul Roberts 128282 by: Bogdan Stancescu 128283 by: Jason Wong session_start 128278 by: John Taylor-Johnston I did: Re: session_start 128279 by: John Taylor-Johnston 128284 by: Jason Wong php --with-GD 128285 by: info.t-host.com migrating from register_globals on to off 128286 by: Willem 128287 by: John W. Holmes php --with-gd support 128289 by: info.t-host.com Compiling PHP and RH Linux 128290 by: Todd Cary 128291 by: Chris Hewitt 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 14 December 2002 15:46, Monty wrote: > Hi John, I'm using POST for the form. But it's the HTML form field itself > that won't allow me to paste in a large amount of text. If I can get the > field to accept the text, there's no problem sending it via POST to the PHP > script. I think that is browser-dependent. For example, for NN (4.x) I think it was 64K. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* If you don't strike oil in twenty minutes, stop boring. -- Andrew Carnegie, on public speaking */ --- End Message --- --- Begin Message --- 1. they can export the CSV as DOS/Windows from Excel on the Mac with ease 2. they can pipe the CSV thru any text editor that lets them choose between mac/win/unix line endings (BBEdit/Lite for example) 3. $filecontents = str_replace('\r', '\n', $filecontents); //should work on 13/12/02 1:22 PM, Sterling Anderson ([EMAIL PROTECTED]) wrote: > I am working on an application for a school district and am having some > problems with the files they are supplying for import. > They are supplying data files and I am writing routines to populate the > database using these files. Its a simple file upload then I just need to > parse through the tab separated value file. I am using the most recent > PHP build on Windows with IIS ISAPI and a MSSQL database. They are > sending text files from a Macintosh application. > I noticed on the documentation for fgetcsv() that it cannot read the end > of line character on Mac files. I have not been able to find a good work > around for this issue. When I grab the entire contents of the file then > try doing a string replacement on the "\r" or even "\t" for that matter > it does not work. > Has anyone found a good solution for dealing with Mac files? > Justin French http://Indent.com.au Web Development & Graphic Design --- End Message --- --- Begin Message --- On Saturday 14 December 2002 12:25, Javier wrote: > I was reading FuseBox's beginners' guide but I didn't completely understood > the way that framework works. > > How do you process the data obtained from forms? Is it the same script that > displays the form? Doesn't fusebox have it's own mailing list where you can ask questions? If so wouldn't that be a better place to do so? In answer to the question in your subject: http://marc.theaimsgroup.com/?l=php-general&m=103964196113392&w=2 -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The big cities of America are becoming Third World countries. -- Nora Ephron */ --- End Message --- --- Begin Message --- [EMAIL PROTECTED] (Jason Wong) wrote in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: Hi, sorry that I didn't make it clear. I'm looking for an alternative to php-fusebox. So I was asking how do you process the data from forms and so. > On Saturday 14 December 2002 12:25, Javier wrote: >> I was reading FuseBox's beginners' guide but I didn't completely >> understood the way that framework works. >> >> How do you process the data obtained from forms? Is it the sa
php-general Digest 15 Dec 2002 08:02:34 -0000 Issue 1764
php-general Digest 15 Dec 2002 08:02:34 - Issue 1764 Topics (messages 128293 through 128322): Re: Formatting dates (from MySQL) 128293 by: freaky 128294 by: Marco Tabini 128295 by: John W. Holmes Undefined Variable 128296 by: Anthony Ritter 128297 by: Marco Tabini 128298 by: Anthony Ritter 128299 by: Marco Tabini 128300 by: Anthony Ritter Hey, If anyone can help me with this at all, I would really appreciate it... 128301 by: Ryan Smaglik 128322 by: Jason Wong Parse Errors 128302 by: Andy Turegano 128303 by: DL Neil Querying two tables 128304 by: Cesar Aracena Session: I RTFM 128305 by: John Taylor-Johnston 128306 by: Marco Tabini 128309 by: TomH 128312 by: John Taylor-Johnston 128313 by: John Taylor-Johnston 128315 by: Justin French 128319 by: michael kimsal 128321 by: conbud question 128307 by: r.vellinga 128314 by: Justin French 128318 by: Andy Turegano PHP/ldap - atomic attribute modification 128308 by: Carl J Meyer Re: A little regex help 128310 by: Justin French Re: migrating from register_globals on to off 128311 by: Justin French Installing PEAR on windows 128316 by: Davy Obdam Strange problem with PHP,SSI 128317 by: sport4ever 128320 by: conbud 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 --- Hey there, I was just looking at the date/time functions (http://www.php.net/manual/en/function.time.php) and I can't seem to find a function that can format a date that is supplied in the format of a DATETIME column. So, I was wondering, is there a function that can format it properly or should I let the database handle the formatting (I'm really new to SQL, I didn't come across anything to mod in the select statement yet). I could ofcourse split it on space for a time and a date var and then split the date on -'s for years, months and days but efficient is something else I think :-) In the archives I saw some examples doing exactly that, but nothing with a single function (unless home defined ofcourse). Kind regards and TIA --- End Message --- --- Begin Message --- You should be able to use strtotime() to transform the datetime string into a UNIX timestamp, which you can then format back using date(). However, this is a very circuitous way--either use SQL to format it or, if your DBMS supports it, have it returned already as a UNIX timestamp. The actual SQL commands depend on which DBMS you actually use. Marco -- php|architect - The Magazine for PHP Professionals The monthly magazine dedicated to the world of PHP programming Check us out on the web at http://www.phparch.com! --- Begin Message --- Hey there, I was just looking at the date/time functions (http://www.php.net/manual/en/function.time.php) and I can't seem to find a function that can format a date that is supplied in the format of a DATETIME column. So, I was wondering, is there a function that can format it properly or should I let the database handle the formatting (I'm really new to SQL, I didn't come across anything to mod in the select statement yet). I could ofcourse split it on space for a time and a date var and then split the date on -'s for years, months and days but efficient is something else I think :-) In the archives I saw some examples doing exactly that, but nothing with a single function (unless home defined ofcourse). Kind regards and TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- --- End Message --- --- Begin Message --- > I was just looking at the date/time functions > (http://www.php.net/manual/en/function.time.php) and I can't seem to find > a > function that can format a date that is supplied in the format of a > DATETIME > column. > > So, I was wondering, is there a function that can format it properly or > should I let the database handle the formatting (I'm really new to SQL, I > didn't come across anything to mod in the select statement yet). I could > ofcourse split it on space for a time and a date var and then split the > date > on -'s for years, months and days but efficient is something else I think > :-) In the archives I saw some examples doing exactly that, but nothing > with > a single function (unless home defined ofcourse). You can use the DATE_FORMAT() function in your SELECT query to format the date however you want it. Or, you can use UNIX_TIMESTAMP() to pull it out in the unix fo
php-general Digest 15 Dec 2002 22:09:08 -0000 Issue 1765
php-general Digest 15 Dec 2002 22:09:08 - Issue 1765 Topics (messages 128323 through 128346): Re: Querying two tables 128323 by: Lars Olsson Re: Session: I RTFM 128324 by: Marco Tabini 128325 by: michael kimsal Getting full HTTP request the page was requested with? 128326 by: Leif K-Brooks 128328 by: Hatem Ben 128335 by: Leif K-Brooks AIM and PHP 128327 by: John Meyer New PHP Editor/IDE Project 128329 by: Hidayet Dogan Getting a field value 128330 by: drparker 128333 by: Jason Wong JPG from Blob to HTML 128331 by: Miro Kralovic 128332 by: Jason Wong 128334 by: Miro Kralovic PHP/MySQL Query 128336 by: Steven M 128337 by: Leif K-Brooks 128343 by: Steven M Problems with "ftp_put()", .in.-file already exists 128338 by: Tobias Schlitt Socket_connect() timeout 128339 by: Max Clark PGP/PHP 128340 by: Jonathan 128341 by: Jonathan Re: arrays 128342 by: drparker Passing text info using $PHP_SELF 128344 by: Lightfirst 128345 by: Jason Sheets Executing a Perl/CGI program from PHP 128346 by: Troy May 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 --- Hi! To fetch information from several tables you usually use a join operation. Here's a starting point in the MySQL manual. http://www.mysql.com/doc/en/JOIN.html /Lars ([EMAIL PROTECTED]) Cesar Aracena wrote: Hi all, I have several tables from which I have to fetch certain products & categories based on customer selection. The tables are as follows: Table 1 - Categories catid (autonum) catname Table 2 - Sub categories subcatid (autonum) subcatname Table 3 - Products prodid (autonum) prodname Table 4 - Relationships Catid Subcatid Prodid Now, the question is how to fetch all the sub-categories let's say that are related to category 0001. I know it's as simple as relating two tables in one query, but I don't remember how. Any help appreciated. Cesar L. Aracena [EMAIL PROTECTED] [EMAIL PROTECTED] (0299) 156-356688 Neuquén (8300) Capital Argentina --- End Message --- --- Begin Message --- Single quotes are normal strings. Double quotes are strings in which substitutions can take place. For example: Double quotes also expand escape strings (e.g."\n") whereas single quotes don't. Cheers, Marco -- php|architect - The Magazine for PHP Professionals The monthly magazine dedicated to the world of PHP programming Check us out on the web at http://www.phparch.com! --- Begin Message --- Marco (or anyone) What is the difference between: $familyname = getvar("familyname"); and $familyname = getvar('familyname'); What do single quotes do, as a general rule, that double cannot (he asks remembering something, but not sure what)? Marco Tabini wrote: > I haven't followed the rest of the thread, but how about using a > function? > > function getvar ($varname) > { > if (isset ($_POST[$varname]) > { > $_SESSION[$varname] = $_POST[$varname]; > return $_POST[$varname]; > } > elseif (isset ($_SESSION[$varname])) > return $_SESSION[$varname]; > } > > session_start(); > > // You don't need session_register anymore > > $familyname = getvar('familyname'); > > and so on--just one line per variable. > > Hope this helps. > > Cheers, > > Marco > -- > > php|architect - The Magazine for PHP Professionals > The monthly magazine dedicated to the world of PHP programming > > Check us out on the web at http://www.phparch.com! > > >---
php-general Digest 16 Dec 2002 10:17:04 -0000 Issue 1766
php-general Digest 16 Dec 2002 10:17:04 - Issue 1766 Topics (messages 128347 through 128382): Re: how to send an MSWORD email? 128347 by: Chris Shiflett 128349 by: Andy Turegano 128360 by: Jonathan Sharp 128367 by: See kok Boon select * From 128348 by: Bruce Levick 128350 by: Martin Towell 128353 by: Seraphim 128355 by: Martin Towell 128357 by: Javier Re: Getting full HTTP request the page was requested with? 128351 by: Chris Shiflett Re: Querying two tables 128352 by: Javier Re: Executing a Perl/CGI program from PHP 128354 by: John W. Holmes 128361 by: Jonathan Sharp Print bgcolors in table 128356 by: Lars Espelid 128381 by: Bogdan Stancescu Print text and image in the same page. 128358 by: Naif M. Al-Otaibi 128359 by: Chris Shiflett Re: Simple text editor for Windows? 128362 by: David T-G 128363 by: Chris Shiflett Re: approaching a relational database 128364 by: David T-G to php or to perl, that is the question 128365 by: David T-G 128366 by: Rasmus Lerdorf could an audio streaming reflector be written in php? 128368 by: Kendal Can php auto execute it's script in schedule without opening a webpage? 128369 by: Jack 128370 by: Chris Shiflett 128382 by: John W. Holmes notice prevents setting cookie in 4.3.0RC2? 128371 by: Alex Pukinskis Re: Passing text info using $PHP_SELF 128372 by: Ernest E Vogelsinger Re: INSERT using subqueries 128373 by: Evan Nemerson 128374 by: Ernest E Vogelsinger 128376 by: Evan Nemerson needle in a haystack (Can't find :) 128375 by: John Taylor-Johnston 128377 by: Jason Wong 128378 by: Ernest E Vogelsinger Re: Mail() Not working right 128379 by: Miguel González Castaños PDF Lib 128380 by: Bogomil Shopov 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 --- --- See Kok Boon <[EMAIL PROTECTED]> wrote: > I want to send emails that have graphics, for example > the pub logo. I know that there are 2 ways to do so > (maybe there are more, pls enlighten me): > > 1. use html email with >http://www.mydomain.com/logo.gif";> > > 2. use MSWORD to insert the logo into the email. >MSWORD will then send the logo.gif as an >attachment and will ALSO use tags. I doubt anyone on this list is going to know what your second method is, though I would guess that MS Word does nothing special and does the same thing you mention in your first method, except that it attaches the image to the email rather than reference it via URL. You can probably search the archives for more information on sending HTML email as well as sending attachments, which is all you are trying to do. I detest such email myself, so I cannot offer any help. Chris --- End Message --- --- Begin Message --- The easiest way to include a picture in the email would be through the html. The second way sounds much more complex. Right now, I really don't know of any other ways. Perhaps copy and paste? On Sun, 15 Dec 2002, Chris Shiflett wrote: > --- See Kok Boon <[EMAIL PROTECTED]> wrote: > > I want to send emails that have graphics, for example > > the pub logo. I know that there are 2 ways to do so > > (maybe there are more, pls enlighten me): > > > > 1. use html email with > >http://www.mydomain.com/logo.gif";> > > > > 2. use MSWORD to insert the logo into the email. > >MSWORD will then send the logo.gif as an > >attachment and will ALSO use tags. > > I doubt anyone on this list is going to know what your > second method is, though I would guess that MS Word does > nothing special and does the same thing you mention in your > first method, except that it attaches the image to the > email rather than reference it via URL. > > You can probably search the archives for more information > on sending HTML email as well as sending attachments, which > is all you are trying to do. I detest such email myself, so > I cannot offer any help. > > Chris > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > --- End Message --- --- Begin Message --- search google for RFC HTML email, or look at phpmailer.sourceforge.net. It's roughly along the lines of: Subject: My html email Content-type: multipart/mime Content-boundry(): BOUNDRY-ABC ---BOUNDRY-ABC--- Content-type: text/html ...more headers... Hello! This i
php-general Digest 17 Dec 2002 11:06:18 -0000 Issue 1768
php-general Digest 17 Dec 2002 11:06:18 - Issue 1768 Topics (messages 128489 through 128532): Re: can I mail unlimited in one click? 128489 by: Kyle Gibson 128514 by: Greg Donald 128515 by: Chris Kay Re: Array 128490 by: Philip Olson Put text matching regex into array? 128491 by: Leif K-Brooks 128519 by: Jason Wong undefined indexproperty. 128492 by: Bruce Levick 128495 by: Bruce Levick 128500 by: Martin Towell Re: php --with-gd support 128493 by: Bogdan Stancescu 128494 by: Bogdan Stancescu Updating GD 128496 by: Noodle Snacks 128518 by: Jason Wong 128522 by: Noodle Snacks Re: Divide into words 128497 by: John W. Holmes MySQL select a field's first X bytes 128498 by: Micah Bushouse 128499 by: Quentin Bennett 128503 by: Micah Bushouse Re: Undefined variable 128501 by: New B 128509 by: John W. Holmes Help for Undefined variable 128502 by: New B Re: php setup 128504 by: Justin French invoking the PHP engine on a single .html file 128505 by: Krzysztof Wozniak 128507 by: Justin French Re: PGP/PHP 128506 by: Jason Sheets selecting img file extension. 128508 by: Bruce Levick 128510 by: Justin French Plz help to solve my problem. 128511 by: Elaine Kwek 128512 by: Martin Towell 128513 by: Peter Houchin 128525 by: Tros Per instance disable_functions in CGI "mode" 128516 by: Lic. Rodolfo Gonzalez Gonzalez [php] INSERT INTO 128517 by: John Taylor-Johnston 128521 by: Jason Wong Number of sessions 128520 by: fragmonster Re: XML + XSL 128523 by: Hristina 128524 by: Bogomil Shopov "Use of undefined constant" error 128526 by: fragmonster 128527 by: fragmonster 128529 by: Jon Haworth 128530 by: Tim Ward Showing 10 record items per page...? 128528 by: Davíð Örn Jóhannsson 128531 by: Jon Haworth PHP with GD Support 128532 by: info.t-host.com 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 --- Hi, I wonder if I can mail 300 customers in one click? part of script: while($listrow = mysql_fetch_array($listresult)) { $recipient = $listrow[epost]; $subject = "$subj"; $message = "$mess"; $headers .= "From: $admail\n"; $headers .= "Reply-To: $admail\n"; $headers .= "X-Mailer: PHP\n"; mail($recipient, $subject, $message, $headers); } or is there a limit? Thanks for any help Jan Grafstrom Why not just put all the email address into the BCC header field? $headers .= "Bcc: $email[0], $email[1],,$email[n]\n"; Of course the BCC list could be filled programmatically... -- Kyle Gibson admin(at)frozenonline.com http://www.frozenonline.com/ --- End Message --- --- Begin Message --- On Mon, 16 Dec 2002, wrote: >I wonder if I can mail 300 customers in one click? > >part of script: > >while($listrow = mysql_fetch_array($listresult)) { > >$recipient = $listrow[epost]; >$subject = "$subj"; >$message = "$mess"; >$headers .= "From: $admail\n"; >$headers .= "Reply-To: $admail\n"; >$headers .= "X-Mailer: PHP\n"; >mail($recipient, $subject, $message, $headers); >} > >or is there a limit? You may need to increase your max_execution_time, the default seems to be 30 seconds, pretty low for 300 emails: >cat `locate php.ini`|grep max_execution_time max_execution_time = 30 ; Maximum execution time of each script, in seconds -- Greg Donald http://destiney.com/ --- End Message --- --- Begin Message --- I am emailing 150 or so - Chris Kay (Systems Development) Techex Communications Website: www.techex.com.au Email: [EMAIL PROTECTED] Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 - -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 17 December 2002 11:40 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] can I mail unlimited in one click? On Mon, 16 Dec 2002, wrote: >I wonder if I can mail 300 customers in one click? > >part of script: > >while($listrow = mysql_fetch_array($listresult)) { > >$recipient = $listrow[epost]; >$subject = "$subj"; >$message = "$mess"; >$headers .= "From: $admail\n"; >$headers .= &qu
php-general Digest 19 Dec 2002 13:01:52 -0000 Issue 1772
php-general Digest 19 Dec 2002 13:01:52 - Issue 1772 Topics (messages 128790 through 128849): Re: *OK, more eval for today 128790 by: Martin Towell 128847 by: Ford, Mike [LSS] Re: $_SERVER['DOCUMENT_ROOT'] on localhost 128791 by: DL Neil Re: *Premature end of script headers 128792 by: Dave [Hawk-Systems] 128829 by: Alexey Lysenkov is there php equiv left() and right() functions? 128793 by: Jeff Bluemel 128795 by: Matthew Gray 128796 by: Philip Olson 128797 by: Jeff Bluemel 128798 by: Jeff Bluemel Re: creating objects by reference? 128794 by: Matthew Gray 128814 by: Bastian Vogt recommendation needed for dedicated server hosting 128799 by: Taek Kwon 128801 by: Jason Sheets 128802 by: Tom Rogers 128803 by: Kyle Gibson PHP and MySQL queries 128800 by: Beauford.2002 128810 by: John W. Holmes 128834 by: Rich Gray repeat region 128804 by: Bruce Levick 128806 by: Jeff 128808 by: Justin French 128816 by: John Taylor-Johnston 128817 by: Bastian Vogt Re: PHP question 128805 by: gamin Re: checking bounce email 128807 by: See kok Boon 128840 by: Chris Hewitt Re: URL parsing 128809 by: gamin Re: XML + XSL 128811 by: Hristina php + xsl + xsm 128812 by: Hristina Re: flush output error 128813 by: electroteque 128848 by: Ford, Mike [LSS] problem with sending pages directly from browser 128815 by: Kocnár Peter speet testing (was URL parsing) 128818 by: Sean Burlington display edited field in table 128819 by: Lightfirst 128821 by: Lightfirst 128824 by: Jason Wong 128841 by: Chris Hewitt delete() and unlink() 128820 by: . Nilaab 128823 by: Jason Wong AddType application/x-httpd-source .phps 128822 by: Freaky Displaying first 20 characters of a comment 128825 by: Kevin Meredith 128828 by: Quentin Bennett 128832 by: Jon Haworth sending AND recieving XML 128826 by: K.C.P. van Zijl 128830 by: Quentin Bennett 128831 by: K.C.P. van Zijl JavaScript or browser detection 128827 by: Steve Vernon 128835 by: fragmonster 128839 by: Chris Hewitt Check Uploaded File 128833 by: shaun 128836 by: Rich Gray Looping needs to re-open parm file 128837 by: Jacob van Zanen 128838 by: Wico de Leeuw 128842 by: Wico de Leeuw RegExpres Prob 128843 by: John Wards 128844 by: Wico de Leeuw 128845 by: John Wards 128849 by: Wico de Leeuw Inserting tab delimited textfiles into mysql 128846 by: Thomas Goeminne 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 --- argh! eval() try this instead: $temp = ${"php_q3_$i"}; to get it directly from $HTTP_POST_VARS: $temp = $HTTP_POST_VARS["php_q3_$i"]; simple HTH Martin -Original Message- From: Alexey Lysenkov [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 6:08 AM To: [EMAIL PROTECTED] Subject: [PHP] *OK, more eval for today I know, it's eval = evil, but I don't see any other way I can check for 120 variables submitted via post, without making a temp variable, assigning a value of the posted Var and checking for it (and deciding on the further run of the script). Anyways, I took a classical eval thing and am doing fine with it. It looks like this: $temp = "\$php_q3_".$i; // $i is a loop index eval ("\$temp = \"$temp\";"); works alright. Now, how do I eval directly from the $HTTP_POST_VARS? I am trying to do this: $tempVar1 = '\$HTTP_POST_VARS[\"q4_'.$i.'"]'; eval("\$tempVar1=\"$tempVar1\";"); and am obviously failing. If you know any other way to validate 120-150 variables in a loop and then rewrite the values into the fields (checkboxes, radios and selects) - should an error had been made - let me know. Best Regards, Alex p.s. you do help! :) --- End Message --- --- Begin Message --- > -Original Message- > From: Alexey Lysenkov [mailto:[EMAIL PROTECTED]] > Sent: 18 December 2002 19:08 > > > I am trying to do this: > > $tempVar1 = '\$HTTP_POST_VARS[\"q4_'.$i.'"]'; > eval("\$tempVar1=\"$tempVar1\";"); > Well, you have the answer right there in front of you -- why not just take the statement you build and eval(), and write it directly in the PHP thus: $tempVar1 = $HTTP_POST_VARS['q4_
php-general Digest 20 Dec 2002 13:47:40 -0000 Issue 1774
php-general Digest 20 Dec 2002 13:47:40 - Issue 1774 Topics (messages 128931 through 128983): Re: Another problem with conditional statements 128931 by: Beauford.2002 128934 by: Sean Malloy 128936 by: Beauford.2002 128958 by: Jason Wong 128959 by: Jason Wong 128966 by: Ford, Mike [LSS] 128969 by: Ford, Mike [LSS] 128971 by: Ford, Mike [LSS] 128972 by: Ford, Mike [LSS] Re: Training Courses in PHP & MySQL 128932 by: Andrew Wilson 128939 by: michael kimsal 128940 by: Mike Hillyer 128941 by: michael kimsal Re: Problem with sessions. 128933 by: Philip Olson 128957 by: Jason Wong Re: Fatal error: Call to undefined function: allerrors() in 128935 by: Beauford.2002 128938 by: John W. Holmes Code still showing up :( 128937 by: Lic. Rodolfo Gonzalez Gonzalez syntax to reference $_POST within function 128942 by: Jamie 128945 by: Philip Olson Good program to indent large quantity of files? 128943 by: Leif K-Brooks 128944 by: Leif K-Brooks 128949 by: Justin French 128954 by: Leif K-Brooks 128983 by: michael kimsal URL path problems 128946 by: ªüYam 128947 by: Peter Houchin 128948 by: Wee Keat 128961 by: ªüYam Alternating Links 128950 by: conbud 128951 by: Philip Olson 128952 by: Justin French 128953 by: conbud Re: offline application 128955 by: Philippe Saladin PopUp Recall 128956 by: beno Problem with static call of method - class::method 128960 by: Mirek Novak 128962 by: Mirek Novak 128963 by: Mirek Novak Re: Error installing 128964 by: Jason Wong Re: PHP not working in html 128965 by: Dries Verachtert mkdir() makes dir, but with wrong owner 128967 by: Mirza Muharemagic 128981 by: John W. Holmes Re: Some discoveries I've made. Anyone care to confirm/deny 128968 by: Ford, Mike [LSS] Apache2 & PHP4 128970 by: Chase Urich 128979 by: Dries Verachtert upload_max_filesize + ini_set 128973 by: electroteque 128976 by: Ford, Mike [LSS] Is there any method to filter the single quote from a string? 128974 by: ªüYam 128975 by: Justin French 128982 by: ªüYam Re: How to upload a file 128977 by: Somesh Re: PHP not working in html] 128978 by: Dries Verachtert XML fopen($url) 128980 by: William Bradshaw 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 believe you are incorrect. Switch will look for the first case statement that is true and execute that statement. The following works - case one is incorrect so it doesn't get executed but the second case does. Paste this into a test.php file and you will see it works.. Read the manual. $a=2; $b=4; switch (true) { case ($a < $b) and ($b > 5): echo "Incorrect"; case ($a == 2): echo "Correct"; } So my original question is still stands. The switch statement is correct, but there is a problem with my conditional statements. - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "Beauford.2002" <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 7:33 PM Subject: Re: [PHP] Another problem with conditional statements > switch() does not work that way. Switch uses the value in the parentheses and selects a > CASE based upon that value. Read the manual. > > You will have to use a series of if()-elseif()-else() > - Original Message - > From: "Beauford.2002" <[EMAIL PROTECTED]> > To: "PHP General" <[EMAIL PROTECTED]> > Sent: Thursday, December 19, 2002 6:19 PM > Subject: [PHP] Another problem with conditional statements > > > Hi, > > This should be as simple as breathing, but not today. I have two variables > $a and $b which I need to compare in a switch statement in several different > ways, but no matter what I do it's wrong. > > This is what I have tried, can someone tell me how it should be. > > TIA > > switch (true): > > case ($a == $b): This one seems simple enough. > do sum stuff; > break; > > case ($a && $b == 124): This appears not to work. > do sum stuff; > break; > > case ($a == 124 && $b == 755):
php-general Digest 21 Dec 2002 14:19:20 -0000 Issue 1776
php-general Digest 21 Dec 2002 14:19:20 - Issue 1776 Topics (messages 129044 through 129056): Re: the numeric key of an array??? 129044 by: Alexander Guevara 129045 by: John W. Holmes 129046 by: Alexander Guevara Re: Is there any method to filter the single quote from astring? 129047 by: Alexander Guevara 129050 by: Justin French 129051 by: Philip Olson 129053 by: Jason Wong running perl script via su 129048 by: Larry Brown table trouble 129049 by: Didier McGillis Re: Problem with functions 129052 by: Jeff Re: real time output 129054 by: Steve Yates Re: Disable session cookies 129055 by: ed.home.homes2see.com session life 129056 by: Paul Roberts 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 --- Yeah this workes fine.. thanks!! "Philip Olson" <[EMAIL PROTECTED]> wrote in message Pine.BSF.4.10.10212210135051.36987-10@localhost">news:Pine.BSF.4.10.10212210135051.36987-10@localhost... > > No, but you can do this: > > $arr2 = array_values($array); > > print $arr2[0]; // VALUE1 > > Regards, > Philip Olson > > > On Fri, 20 Dec 2002, Alexander Guevara wrote: > > > How can i do for printing the value of an array given the numeric key for > > example i have this code: > > > > $array = array ( > > 'VAL1' => "VALUE1", > > 'VAL2' => "VALUE2", > > 'VAL3' => "VALUE3" > > ) > > > > So the only way i have found to print the value is like this : > > echo $array['VAL1']; > > > > and it prints = VALUE1 but i want to know if its possible to do it something > > like this: > > echo $array[0]; > > i mean give the numeric key for printing VALUE1 so instead the string key > > (VAL1) use the numerc (0) > > > > Thanks in advance! > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > --- End Message --- --- Begin Message --- > > If you're looking to loop through your array, there are other methods. > Well which kind of methods are you talking about?? could you tell me some > for do it?? foreach($array as $key=>$value) www.php.net/foreach while(list($key,$value) = each($array) www.php.net/each www.php.net/list $cnt = count($array); for($x=0;$x<$cnt;$x++) www.php.net/count ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ --- End Message --- --- Begin Message --- Thanks. it worked fine.. and the reply at the botton too.. Thank you so much! "John W. Holmes" <[EMAIL PROTECTED]> wrote in message 000101c2a896$70aad5c0$7c02a8c0@coconut">news:000101c2a896$70aad5c0$7c02a8c0@coconut... > > > If you're looking to loop through your array, there are other > methods. > > > Well which kind of methods are you talking about?? could you tell me > some > > for do it?? > > foreach($array as $key=>$value) > > www.php.net/foreach > > while(list($key,$value) = each($array) > > www.php.net/each > www.php.net/list > > $cnt = count($array); > for($x=0;$x<$cnt;$x++) > > www.php.net/count > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > --- End Message --- --- Begin Message --- It works.. but when you retrieve the data from the database to a text box it doesnt appear if it has the single quote ('), o tought it was cause i have the stripslashes but i delete stripslashes and it still doesnt appear in the text box! "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... don't filter the quotes... escape them with add_slashes() justin on 20/12/02 10:50 PM, ªüYam ([EMAIL PROTECTED]) wrote: > as title that I'm getting a trouble on filtering the single quote ' , since > there would be error when storing those string into MySQL, thus, i have to > find the appropriate method to solve it, anybody can help please? > thx a lot > > --- End Message --- --- Begin Message --- on 21/12/02 2:00 PM, Alexander Guevara ([EMAIL PROTECTED]) wrote: > It works.. but when you retrieve the data from the database to a text box it > doesnt appear if it has the single quot
php-general Digest 22 Dec 2002 02:30:00 -0000 Issue 1777
php-general Digest 22 Dec 2002 02:30:00 - Issue 1777 Topics (messages 129057 through 129088): Re: Is there any method to filter the single quote fromastring? 129057 by: Alexander Guevara 129059 by: John W. Holmes 129063 by: Alexander Guevara Re: session life 129058 by: John W. Holmes 129070 by: Jason Sheets Re: Disable session cookies 129060 by: John W. Holmes Adding to Apache access log from PHP 129061 by: Geoff Caplan 129087 by: Tom Rogers pspell and html tags 129062 by: Gil Disatnik 129064 by: Gil Disatnik running perl script via su 129065 by: Larry Brown Sorry 129066 by: Gil Disatnik No tshowing url in title bar 129067 by: Alexander Guevara 129068 by: Larry Brown 129071 by: Alexander Guevara Problem with the List? 129069 by: Larry Brown 129074 by: Kyle Gibson \Z characters 129072 by: Dave J. Hala Jr. 129073 by: Kyle Gibson Sessions on a shared server 129075 by: Beth Gore 129085 by: Tom Rogers Mass Mailing 129076 by: Jonathan Chum 129078 by: Gil Disatnik 129080 by: Jonathan Chum 129082 by: Chris Knipe 129083 by: Mark Charette 129086 by: Jonathan Chum Loading modules not compiled in php 129077 by: John Nichel 129084 by: Tony Earnshaw Re: text parser 129079 by: Sean Burlington tool to organize & design a project? 129081 by: Chris Hayes Forms and PHP variables 129088 by: Beauford.2002 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 --- WEll for example i got this: In a field called name i write a name with single quotes for example 'Alex' and click submit... in the verify.php i store the data i filled in the form.php that contains name, surnmane,etcetc... so when i save my data to the db i use the addslashes($name) in this case... and the i look up the database and i see that the valeu oin my db for name is like i wrote it in this cas 'Alex'.. that's perfect.. but when i try to retrieve the user data in another page for example change_user.php i want to retrive the user name and show it in a text box but it doesnt show up.. and i have this code: where userName i retrieved from the data base with a simple query.. so tell me what is wrong there!...Thanks! "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 21/12/02 2:00 PM, Alexander Guevara ([EMAIL PROTECTED]) wrote: > It works.. but when you retrieve the data from the database to a text box it > doesnt appear if it has the single quote ('), o tought it was cause i have > the stripslashes but i delete stripslashes and it still doesnt appear in the > text box! Huh? I can't really understand what you're saying. If you're adding stuff to a database, and getting an error, use addslashes(), then on the way out of the database, you need to stripslashes(). Easy. If you don't get any errors, then magic quotes is probably enabled in your php.ini file. Justin > "Justin French" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > don't filter the quotes... escape them with add_slashes() > > justin > > on 20/12/02 10:50 PM, ªüYam ([EMAIL PROTECTED]) wrote: > >> as title that I'm getting a trouble on filtering the single quote ' , > since >> there would be error when storing those string into MySQL, thus, i have to >> find the appropriate method to solve it, anybody can help please? >> thx a lot >> >> > > --- End Message --- --- Begin Message --- > WEll for example i got this: > In a field called name i write a name with single quotes for example > 'Alex' > and click submit... in the verify.php i store the data i filled in the > form.php that contains name, surnmane,etcetc... > > so when i save my data to the db i use the addslashes($name) in this > case... > and the i look up the database and i see that the valeu oin my db for name > is like i wrote it in this cas 'Alex'.. that's perfect.. but when i try to > retrieve the user data in another page for example change_user.php i want > to > retrive the user name and show it in a text box but it doesnt show up.. > and > i have this code: > > I thought this was already covered today? First, you don't need stripslashes() on the data when you pull it from the database unless you have magic_quotes_runtime enabled. Second, sla
php-general Digest 22 Dec 2002 15:05:13 -0000 Issue 1778
php-general Digest 22 Dec 2002 15:05:13 - Issue 1778 Topics (messages 129089 through 129114): Re: Forms and PHP variables 129089 by: Philip Olson 129097 by: Beauford.2002 129106 by: Jason Wong assignment by reference bug? 129090 by: reynardmh.netscape.net Re: Loading modules not compiled in php 129091 by: Philip Olson 129098 by: John Nichel Function returning a reference - how ?!? 129092 by: Tim Molendijk 129093 by: reynardmh.netscape.net 129094 by: Tim Molendijk 129096 by: Tom Rogers 129099 by: Kyle Gibson Re: assignment by reference bug? (update) 129095 by: reynardmh.netscape.net fwrite() blank-line Quirk? 129100 by: Noel Wade uploading flat text to MySQL 129101 by: James Brennan 129108 by: Jason Wong fgets() question? 129102 by: Noel Wade 129107 by: Jason Wong 129109 by: Steve Yates 129110 by: Noel Wade Re: solved - uploading flat text to MySQL - 129103 by: James Brennan Re: un-solved - uploading flat text to MySQL - 129104 by: James Brennan Re: Mass Mailing 129105 by: Manuel Lemos Re: \Z characters 129111 by: Mattia 129113 by: Dave J. Hala Jr. Email problems. 129112 by: Steve Jackson Is __FILE__ still current or is there something newer? 129114 by: z z 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 --- Use is_numeric() http://www.php.net/is_numeric See also the ctype functions which can be read about here: http://www.php.net/ctype And yes, regular expressions are another option but aren't needed here. Regards, Philip Olson On Sat, 21 Dec 2002, Beauford.2002 wrote: > Hi, > > First off, thanks to all those that helped out with my other questions. Not > all my problems were solved, but I'm certainly closer. Still working on the > same project I need to do the following. > > I have a form where users input numbers only, is there a way I can have php > check to make sure a letter or other character didn't get put in by > accident. I was looking at ereg, but not to familiar with this or if it > would work in this case. > > TIA > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > --- End Message --- --- Begin Message --- Thanks for the info, but . is_numeric does not appear to accept variables i.e. is_numeric($num) and ctype gives me the following. Fatal error: Call to undefined function: ctype_digit() in /usr/local/apache/htdocs/.. on line 6 - Original Message - From: "Philip Olson" <[EMAIL PROTECTED]> To: "Beauford.2002" <[EMAIL PROTECTED]> Cc: "PHP General" <[EMAIL PROTECTED]> Sent: Saturday, December 21, 2002 9:50 PM Subject: Re: [PHP] Forms and PHP variables > > Use is_numeric() > > http://www.php.net/is_numeric > > See also the ctype functions which can > be read about here: > > http://www.php.net/ctype > > And yes, regular expressions are another > option but aren't needed here. > > Regards, > Philip Olson > > > On Sat, 21 Dec 2002, Beauford.2002 wrote: > > > Hi, > > > > First off, thanks to all those that helped out with my other questions. Not > > all my problems were solved, but I'm certainly closer. Still working on the > > same project I need to do the following. > > > > I have a form where users input numbers only, is there a way I can have php > > check to make sure a letter or other character didn't get put in by > > accident. I was looking at ereg, but not to familiar with this or if it > > would work in this case. > > > > TIA > > > > > > > > -- > > 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 --- On Sunday 22 December 2002 10:29, Beauford.2002 wrote: > Hi, > > First off, thanks to all those that helped out with my other questions. Not > all my problems were solved, but I'm certainly closer. Still working on the > same project I need to do the following. > > I have a form where users input numbers only, is there a way I can have php > check to make sure a letter or other character didn't get put in by > accident. I was looking at e
php-general Digest 23 Dec 2002 03:28:02 -0000 Issue 1779
php-general Digest 23 Dec 2002 03:28:02 - Issue 1779 Topics (messages 129115 through 129135): Re: Email problems. 129115 by: Rick Emery 129121 by: Manuel Lemos Re: Mass Mailing 129116 by: Jonathan Chum 129119 by: Manuel Lemos Re: Forms and PHP variables 129117 by: Philip Olson Re: session life 129118 by: John W. Holmes dropping the resource fork 129120 by: James Brennan 129127 by: David Rice problems with uploading files 129122 by: Oliver Witt 129123 by: rw.xend.net 129124 by: rw.xend.net Which one to use.. 129125 by: Peter Houchin 129130 by: Justin French Re: php/dreamweaver mx/mysql server question... 129126 by: Peter Houchin Tutorials on OOP 129128 by: Davy Obdam 129129 by: Justin French 129131 by: Davy Obdam 129133 by: Wee Keat 129134 by: Philip Olson 129135 by: Stephen register globals off ...problems 129132 by: Mack 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 --- This is not realy a PHP question; rather, it is an OutLook question. Regardless...when you opened the OutLook window to create your mail, did you go to the Menu->Format and select "Rich Text (HTML)"" - Original Message - From: "Steve Jackson" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Sunday, December 22, 2002 7:29 AM Subject: [PHP] Email problems. > I have generated a page on our server using PHP (from within a CMS system) > which I renamed the output .html to use in an html email. > My problem is when I cut and paste the HTML into the email (Outlook) it > either: > displays the code, > displays the html email and then when it's sent, sends it as an attachment > or sends it as a bunch of html links and badly formatted text. > > I assumed (badly) that Outlook would simply send HTML emails if you > formatted the program to send html emails but this seems almost impossible. > > Anyone have any suggestions? > > This is the page I want to send: > http://www.violasystems.com/e-news/template.html > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- End Message --- --- Begin Message --- Hello, On 12/22/2002 11:29 AM, Steve Jackson wrote: I have generated a page on our server using PHP (from within a CMS system) which I renamed the output .html to use in an html email. My problem is when I cut and paste the HTML into the email (Outlook) it either: displays the code, displays the html email and then when it's sent, sends it as an attachment or sends it as a bunch of html links and badly formatted text. I assumed (badly) that Outlook would simply send HTML emails if you formatted the program to send html emails but this seems almost impossible. Anyone have any suggestions? This is the page I want to send: http://www.violasystems.com/e-news/template.html You may want to try this class for composing messages that lets you add parts from files. Just specify the URL as filename: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos --- End Message --- --- Begin Message --- Thanks Manuel, "Manuel Lemos" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > On 12/21/2002 08:10 PM, Jonathan Chum wrote: > > An upcoming project I'm working and spec'ing out is a mass mailing > > application. Initially, I was looking at Mailman which was written in Python > > since it looks like it handles delivering emails efficiently without killing > > the server. We have 1 client able to send 110,000 emails at 6.5K avg per > > week on PIII 800 with 128 MB RAM using Mailman. The inteface however is very > > bad and we'd like to develop other features like text ads, tracking, > > templates, etc. This would require writing a wrapper around Mailman in PHP. > > I was considering of writing the mass mailing application in PHP instead > > though. > > > > If anyone has eperience writing such applications with this amount of > > emails, I'd like to know what you've done. > > If you do not need to send personalized messages (messages that differ > for each recipient), just put all recipients in a BCc: header and send a > single message to the local mailer queue (not via SMTP). > > If you do not care for the users that bounce messages, just make the > return path be black hole email address. OTOH, if you care a
php-general Digest 23 Dec 2002 15:29:16 -0000 Issue 1780
php-general Digest 23 Dec 2002 15:29:16 - Issue 1780 Topics (messages 129136 through 129197): Undefined Functions 129136 by: Beauford.2002 129137 by: Rasmus Lerdorf Re: fwrite() blank-line Quirk? 129138 by: Jason Wong Re: \Z characters 129139 by: Jason Wong Thumbnail generation 129140 by: Centaur zeus 129142 by: Rasmus Lerdorf 129144 by: Centaur zeus 129145 by: Jason Wong 129172 by: 1LT John W. Holmes 129185 by: Mika Tuupola Thumbnail 129141 by: Centaur zeus How to generate thumbnail ? 129143 by: Centaur zeus 129155 by: Gil Disatnik $_COOKIE and include() or require() 129146 by: Luke Sneeringer 129151 by: Chris Wesley 129154 by: Luke Sneeringer 129157 by: Chris Wesley 129162 by: Jason Wong Flushing image from database to browser - how to get it cached?? 129147 by: Tim Molendijk 129165 by: Dries Verachtert 129170 by: Justin French Plotting Data Graphics 129148 by: Alexandre Soares 129152 by: Chris Wesley 129159 by: Rick Widmer 129163 by: Jason Wong ¡¾help¡¿how can I put the pull down menu in a frame and display. 129149 by: dreamyman 129153 by: Chris Wesley Creating Extensions DLL with Delphi 129150 by: Andreas Steibl Error loading PHP module in Apache 2 129156 by: Andrew Schaefer Re: Is __FILE__ still current or is there something newer? 129158 by: Rick Widmer preg_replace question 129160 by: electroteque 129164 by: Jason Wong Preperation for News CMS? 129161 by: Steve Jackson LDAP support... 129166 by: Peter Lavender 129167 by: Peter Lavender 129178 by: michael kimsal PHP scripts use/get passed root's environment? 129168 by: Terrence Koeman Re: fgets() question? 129169 by: Ford, Mike [LSS] Re: upload_max_filesize + ini_set 129171 by: Ford, Mike [LSS] calendar solution for workgroups ??? 129173 by: Tariq Murtaza 129183 by: Jan Schneider 129196 by: Brent Baisley php-java formatting 129174 by: Edward Peloke 129177 by: 1LT John W. Holmes 129184 by: Krzysztof Dziekiewicz md5() 129175 by: Edward Peloke 129176 by: Justin French 129180 by: Chris Hewitt 129181 by: Johannes Schlueter 129182 by: Edward Peloke Re: cookies 129179 by: Krzysztof Dziekiewicz php.exe without console window 129186 by: Alexander Kuznetsov how to specify dimensions of opened window? 129187 by: Jody Cleveland 129188 by: Rick Emery 129189 by: Jody Cleveland 129190 by: Rick Emery 129192 by: Jody Cleveland 129194 by: Rick Emery Configuring printer output for a POS printer --> Admin Configuring Printer Drivers or a Select Driver Menu 129191 by: Axis Computers MySQL vs PostgreSQL 129193 by: Miro Kralovic 129195 by: Rick Emery Direct IO functions 129197 by: Slobodan Miljkovic 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 --- Hi, I previously asked a question about getting undefined function errors in my script and someone mentioned that it may be that I am calling it from within an if or else statement. This turned out to be the case. Now the question - is there a way around this? What I need to do resolves around many different conditions, and depending on the what's what I call the necessary function. I have looked my script over and over and can not see any other way of doing this. I am fairly new to PHP and maybe there is a better way, and I'm open to suggestions. TIA Example: if ($a == $b) call function one; elseif ($a > $b) call function two; elseif ($a == $c) call function two; elseif ($a < $b) call function two; elseif ($c > $b) call function two; elseif ($d == $e) call function two; --- End Message --- --- Begin Message --- An undefined function error has nothing to do with where you are calling the function from. It has to do with whether or not you have defined the function you are calling. -Rasmus On Sun, 22 Dec 2002, Beauford.2002 wrote: > Hi, > > I previously asked a question about getting undefined function errors in my > script and someone mentioned that it may be that I am calling it from within > an if or else statement. This turned out to be the case. Now the question - > is there a way around this? What I need to do resolves around many different > conditions, and depending on the what's what I call the necessary function. > I have looked my script over and
php-general Digest 24 Dec 2002 04:01:39 -0000 Issue 1781
php-general Digest 24 Dec 2002 04:01:39 - Issue 1781 Topics (messages 129198 through 129239): Richiesta collaborazioni 129198 by: Armando Re: Configuring printer output for a POS printer --> Admin Configuring Printer Drivers or a Select Driver Menu 129199 by: Chris Hewitt 129206 by: Chris Hewitt Re: Undefined Functions 129200 by: Beauford.2002 129203 by: Rasmus Lerdorf 129219 by: Beauford.2002 129221 by: Gerald Timothy Quimpo 129222 by: Leif K-Brooks 129223 by: Rasmus Lerdorf Re: calendar solution for workgroups ??? 129201 by: Rick Emery Re: MySQL vs PostgreSQL 129202 by: David T-G Forms 129204 by: Vicente Valero 129205 by: John Nichel 129207 by: Rick Emery 129208 by: Chris Hewitt 129209 by: Johannes Schlueter 129210 by: Jason Reid 129224 by: Jason Sheets Are there macros in PHP? 129211 by: Don 129212 by: Rick Emery 129217 by: Chris Hewitt Suggestions on how I should handle this 129213 by: Sarah Heffron 129214 by: Edward Peloke 129215 by: John W. Holmes socket_select() on STDIN 129216 by: Geir Torstein Kristiansen mbstring and iconv status and conversion problems 129218 by: Jan Schneider 129220 by: Jan Schneider Unable to match dollar sign in preg_match 129225 by: Randall Perry 129227 by: John W. Holmes 129228 by: Randall Perry 129237 by: John W. Holmes Re: upload_max_filesize + ini_set 129226 by: Dan Rossi Date Subtraction 129229 by: Christopher J. Crane 129231 by: Marco Tabini 129235 by: Justin French Re: [PHP-WIN] Tutorials on OOP 129230 by: Davy Obdam php+gif problems take 2 129232 by: cj mcrypt 129233 by: Ysrael Guzmán 129234 by: Alex Piaz Re: $_COOKIE and include() or require() 129236 by: Luke Sneeringer Problem with Include 129238 by: sport4ever Beginner examples? 129239 by: Chris Rehm 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 --- Salve, A chiunque possa interessare, cerco persone su Napoli con cui avere scambi di pareri e info circa PHP/MySQL, eventualmente ci sarebbero opportunità lavorative. Saluti -- Armando Alario ICQ# 172677921 -- Armando Alario ICQ# 172677921 --- End Message --- --- Begin Message --- Axis Computers wrote: I'm developing a Pizza delivery application which uses printer output, and I want to know which is the better way to format the output to the printer, and how can I design a select printer menu (communicate with printer drivers), so the user can select from a number of POS printers (45 columns ?). I assume that you mean a printer connected to the client computer, not the server? As php is all executed on the server, like other server-side languages, it has no access to the client computer (for security reasons). HTH Chris --- End Message --- --- Begin Message --- Axis Computers wrote: Yes, but in my application's case the server and the client are on the same computer, because the server will act as localhost, so you are saying there is no way to dump any printer output ? Ah, you do mean the server. OS dependent. If linux then probably call lpr via an exec call in php. If windows then possibly COM. I've not had to do this so I'm not going to be the best person to advise here. Any printing gurus please chip in. HTH Chris --- End Message --- --- Begin Message --- I have a function at the bottom of my script which is called from withing an if/else statement. If I take it out of the if/else and just call the function it works fine (except I don't get the results I want). So it appears where you are calling it from does matter. See the examples below. This isn't the first time either, I have had to redo several scripts for this project because of it. If I'm doing this wrong based on the examples below, please let me know. Thanks. i.e. This doesn't work.This does. some code .. some code If ($bob) { gotofunction($bob); } gotofunction($bob); elseif ($sally) { gotonextfunction($sally); } gotonextfunction($sally) else { gotolastfunction(); } gotolastfunction() some other code . some other code function gotofunction($bob) function gotofunction($bob) function gotonextfunction() function gotonextfunction() function gotolastfunction() f
php-general Digest 25 Dec 2002 08:26:00 -0000 Issue 1783
php-general Digest 25 Dec 2002 08:26:00 - Issue 1783 Topics (messages 129295 through 129316): What happened with zend engine version 2? 129295 by: Erik Franzén 129299 by: Rasmus Lerdorf 129308 by: Erik Franzén 129316 by: Erik Franzén Re: Problem with Include 129296 by: Rick Widmer 129297 by: Tom Woody 129300 by: Philip Olson Re: forum? 129298 by: Philip Olson Re: Creating my own External Module for PHP 129301 by: Rasmus Lerdorf 129309 by: Leon Mergen extracting text 129302 by: Clivus2k1.aol.com 129305 by: John W. Holmes objects within arrays 129303 by: Beth Gore 129304 by: Andrew Brampton 129307 by: Beth Gore exif functions 129306 by: Dade Register 129312 by: Jason Sheets upload_max_filesize hack 129310 by: electroteque 129311 by: electroteque Greetings 129313 by: Joseph Ross Lee 129314 by: Andy Turegano Problem with comma in mail form 129315 by: Ben Edwards 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 believed that PHP V4.3 should include the Zend engine version 2 since there was two alpha releases for PHP-4.3.0 with Zend engine version 2 -PHP-4.3.0-dev-zend2-win32-alpha1 -PHP-4.3.0-dev-zend2-win32-alpha2 I'm waiting for Zend engine version 2. Where could I read information about future releases? I think the Zend engine version 2 provides much better coding facilities so I would preciate if anybody could answer my questions. Thanks /Erik --- End Message --- --- Begin Message --- That was never the plan. It is scheduled for PHP 5 sometime in the next 6-12 months. -Rasmus On Tue, 24 Dec 2002, Erik Franzén wrote: > I believed that PHP V4.3 should include the Zend engine version 2 since > there was two alpha releases for PHP-4.3.0 with Zend engine version 2 > > -PHP-4.3.0-dev-zend2-win32-alpha1 > -PHP-4.3.0-dev-zend2-win32-alpha2 > > I'm waiting for Zend engine version 2. Where could I read information about > future releases? > > I think the Zend engine version 2 provides much better coding facilities so > I would preciate if anybody could answer my questions. > > Thanks > > /Erik > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > --- End Message --- --- Begin Message --- After I posted the first message, I read something about PHP 5 at www.zend.com and suspected that is was about the new Zend Engine. I must have missed it totally! I was planning to code on a new website during my christmas holiday and now that chance is gone because the functionality in the new Zend Enginge is exactly what I miss. I also read on Zend.com that there are some decisions to make about some major changes i.e private members variables or not. I guess I have to switch to Linux and get a CVS-copy for PHP 5, if it exists? Maybe a Win32-binary? Does it exist and if it exists, what status does it have? Can you write code that will work when the final version is finished with minor changes, or are major changes on the agenda? And secondly, I have to face the fact that I cannot get the Zend Engine version 2 in a runtime environment for at least 6 month. You can be sure that I'm longing for it... :) "Rasmus Lerdorf" <[EMAIL PROTECTED]> skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > That was never the plan. It is scheduled for PHP 5 sometime in the next > 6-12 months. > > -Rasmus > > On Tue, 24 Dec 2002, Erik Franzén wrote: > > > I believed that PHP V4.3 should include the Zend engine version 2 since > > there was two alpha releases for PHP-4.3.0 with Zend engine version 2 > > > > -PHP-4.3.0-dev-zend2-win32-alpha1 > > -PHP-4.3.0-dev-zend2-win32-alpha2 > > > > I'm waiting for Zend engine version 2. Where could I read information about > > future releases? > > > > I think the Zend engine version 2 provides much better coding facilities so > > I would preciate if anybody could answer my questions. > > > > Thanks > > > > /Erik > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > --- End Message --- --- Begin Message --- You don't need to answer my questions. Found almost all answers myself (Yes, I was "triggerhappy" to post my questions here before I looked for the answers...) I have one question though, in which status are Zend Engine 2 i
php-general Digest 25 Dec 2002 20:26:44 -0000 Issue 1784
php-general Digest 25 Dec 2002 20:26:44 - Issue 1784 Topics (messages 129317 through 129327): Re: Problem with Include 129317 by: sport4ever Writing byte 0A to a file (LF / CR related) 129318 by: BBun 129319 by: BBun 129320 by: Thomas Seifert CVS download 129321 by: Bc. Radek Krejèa How To Get Last Item Of An Array? 129322 by: . Nilaab 129323 by: Chris Wesley MySQL 129324 by: Parry60.aol.com Re: Problem with comma in mail form 129325 by: Chris Wesley Good class for managing settings stored in INI (or other format) file? 129326 by: Leif K-Brooks 129327 by: John W. Holmes 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 --- Thanks to all whom answered me while there is no solution for my problem (including more than one PHP file in a HTML page through SSI) :( I want to return to my server old configuration, It was: RedHat Linux 7.3 Apach 1.3 PHP 4.0.1 except PHP, because I have encountered some problems with PHP 4.0.1, and please tell me what I (exactly) suppose to reinstall (Linux,Apache or PHP)... Is there any way to undo my upgrade ( what I call downgrade :-) )? thanx anyway __ http://www.sport4ever.net Administrator of Sport4ever.Net [EMAIL PROTECTED] - Original Message - From: "sport4ever" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Tom Ray" <[EMAIL PROTECTED]> Sent: Tuesday, December 24, 2002 8:04 AM Subject: Re: [PHP] Problem with Include > It's PHP problem because I can include any number of files with other > extensions. only PHP which I can not include more than one file at a page... > > maybe there is something wrong with php.ini > notice that I faced with this problem just after I upgraded to (PHP 4.2.1), > (Apache2), everything was great before! > > > > > sport4ever wrote: > > > >Hello, > >my problem is that I can't use more than one SSI INCLUDE in a page > > > >Please access this test page to check the problem yourself: > >http://www.sport4ever.com/test/hello.shtml > > > >The first INCLUDE will appear correctly and prints "HELLO World, include #1" which is the output of "hello.php" > > > >Whereas the second INCLUDE won't appear, and instead, it will print the content (code) of "hello2.php", which is the follwoing: > > > > > >So, it always executes the first include statement perfectly, and doesn't > execute the rest! > > > >note: the problem appears only if I include a PHP file, it will execute > it correctly if it's a SHTML or HTML file. > > > >PLEASE is there any solution for this strange problem! > > > > > > > > > --- End Message --- --- Begin Message --- Hey, I am trying to write some binary data (image) to a file, but using fputs, every 0A byte will be written as 0D 0A. This is because of the windows representation of a new line (\r\n), but I'm not writing a text file! I'm writing binary data! Does anyone know how I can make this work correctly? Thanks --- End Message --- --- Begin Message --- Hey, I am trying to write some binary data (image) to a file, but using fputs, every 0A byte will be written as 0D 0A. This is because of the windows representation of a new line (\r\n), but I'm not writing a text file! I'm writing binary data! Does anyone know how I can make this work correctly? Thanks --- End Message --- --- Begin Message --- from the manual: Note: On systems which differentiate between binary and text files (i.e. Windows) the file must be opened with 'b' included in fopen() mode parameter. Thomas On Wed, 25 Dec 2002 11:43:13 +0100 [EMAIL PROTECTED] (Bbun) wrote: > Hey, > > I am trying to write some binary data (image) to a file, but using fputs, > every 0A byte will be written as 0D 0A. This is because of the windows > representation of a new line (\r\n), but I'm not writing a text file! I'm > writing binary data! Does anyone know how I can make this work correctly? > > Thanks > > --- End Message --- --- Begin Message --- Hello, I want to download PHP from CVS and a wrote this command (from manual): cvs -d :pserver:[EMAIL PROTECTED]:/repository co -r PHP_4_2_3 php4 But I got this message: cvs [server aborted]: no such tag PHP_4_2_3 Where is problem? Thanks Radek --- End Message --- --- Begin Message --- Hello Everyone, I have an multi-dimensional array called $cat_data, which is info extracted from a MySQL DB. I want to retrieve the very last item of t
php-general Digest 26 Dec 2002 10:42:56 -0000 Issue 1785
php-general Digest 26 Dec 2002 10:42:56 - Issue 1785 Topics (messages 129328 through 129346): Re: How To Get Last Item Of An Array? 129328 by: John W. Holmes 129329 by: Jason Wong 129330 by: Leon Mergen How to display field after MySQL join. 129331 by: Stephen of Blank Canvas 129345 by: Jason Wong 129346 by: Sean Burlington Problem with compilation from CVS 129332 by: Bc. Radek Krejèa 129333 by: Johannes Schlueter 129334 by: Bc. Radek Krejèa Formatting text output 129335 by: menezesd 129336 by: John W. Holmes 129338 by: Justin French Insert Record (php.ini) 129337 by: Edson Waite 129339 by: John W. Holmes 129341 by: Edson Waite 129342 by: Javier Re: MySQL 129340 by: Mike Mannakee UltraTemplate's documentation 129343 by: Javier Apache 129344 by: Mantas Kriauciunas 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 have an multi-dimensional array called $cat_data, which is info > extracted > from a MySQL DB. I want to retrieve the very last item of that array. How > would I do that? I know the first item can be retrieved by simply asking > for > $cat_data[0][0], which contains an id number. But I can't figure out how > to > get the last item in that same array -- $cat_data[x][0] where x is the > last > item in the array. Kind of begs the question of why can't you just select what you need with the proper query, instead of loading everything into an array... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ --- End Message --- --- Begin Message --- On Thursday 26 December 2002 03:34, Chris Wesley wrote: > On Wed, 25 Dec 2002, @ Nilaab wrote: > > I have an multi-dimensional array called $cat_data, which is info > > extracted from a MySQL DB. I want to retrieve the very last item of that > > array. How would I do that? I know the first item can be retrieved by > > simply asking for $cat_data[0][0], which contains an id number. But I > > can't figure out how to get the last item in that same array -- > > $cat_data[x][0] where x is the last item in the array. > > Naturally, the index of last item of an array is one less than the total > number of elements in the array. > > $num_elements = count( $cat_data ); > $last_element = $cat_data[$num_elements-1][0]; > // 0 being what you were seeking Or, if you don't need to keep $cat_data intact, you can use array_pop(). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* When it is not necessary to make a decision, it is necessary not to make a decision. */ --- End Message --- --- Begin Message --- "John W. Holmes" <[EMAIL PROTECTED]> schreef in bericht 000401c2ac54$142032c0$7c02a8c0@coconut">news:000401c2ac54$142032c0$7c02a8c0@coconut... > Kind of begs the question of why can't you just select what you need > with the proper query, instead of loading everything into an array... Yeah, just add limit 0,1 desc to the query --- End Message --- --- Begin Message --- Hi Everyone, I'm trying to display the content of two mysql tables on a single page, I have successfully joined them with the following statement. $query = "SELECT serv.*, cat.* FROM site_services AS serv, site_servicescat AS cat WHERE serv.servicescat_id = cat.servicescat_id AND serv.theme_id = $DomainTheme AND serv.status = 1 ORDER BY RAND() LIMIT 3"; This works great but my problem is I have a field in each table called "title", if I use the normal function of $row[title] I get field from the "site_services" table but I cannot work out how to get the "site_servicescat" title field. I have tried $row[cat.title] but all I get is errors. Any help would be really appreciated as I think it's just me missing something basic. Thanks Stephen --- End Message --- --- Begin Message --- On Thursday 26 December 2002 07:25, Stephen of Blank Canvas wrote: > Hi Everyone, > > I'm trying to display the content of two mysql tables on a single page, > I have successfully joined them with the following statement. > > $query = "SELECT serv.*, cat.* FROM site_services AS serv, > site_servicescat AS cat WHERE serv.servicescat_id = cat.servicescat_id > AND serv.theme_id = $DomainTheme AND serv.status = 1 ORDER BY RAND() > LIMIT 3"; > > This wor
php-general Digest 26 Dec 2002 23:14:22 -0000 Issue 1786
php-general Digest 26 Dec 2002 23:14:22 - Issue 1786 Topics (messages 129347 through 129387): Open HTTPS connection 129347 by: John W. Holmes language internationalisation 129348 by: Denis L. Menezes Populating textboxes and listboxes from a query result of a database table 129349 by: Denis L. Menezes 129351 by: Rick Emery 129381 by: Gerald Timothy Quimpo Re: Problem with comma in mail form 129350 by: Ben Edwards 129356 by: Ben Edwards 129357 by: John W. Holmes 129360 by: Ben Edwards 129361 by: Paul Roberts PHP session logger 129352 by: Francisco Vaucher 129353 by: John W. Holmes 129354 by: Francisco Vaucher Re: Beginner examples? 129355 by: Rick Widmer Installing PHP on XP 129358 by: Todd Cary Finding # of weekdays between 2 dates.. 129359 by: Chad Day OOP and object references, not copies - how to do? 129362 by: Erik Franzén Unable to set permissions 129363 by: Alberto Brea Re: Mass Mailing 129364 by: peter a Re: Apache 129365 by: John Nichel unpack() based on C struct 129366 by: Tim Molendijk Flow diagrams. 129367 by: Sridhar Moparthy 129380 by: Jimmy Brake 129384 by: Manuel Lemos Include Problems 129368 by: Mike Bowers 129369 by: Mike Bowers 129370 by: John Nichel 129371 by: John Nichel 129372 by: Chris Hewitt 129373 by: Mike Bowers 129375 by: John Nichel 129377 by: Chris Wesley 129378 by: Mike Bowers 129383 by: Gerald Timothy Quimpo email 129374 by: Anil Garg e-mail 129376 by: Anil Garg 129379 by: Paul Roberts 129382 by: James E Hicks III Selecting what's for deletion 129385 by: Cesar Aracena 129386 by: John W. Holmes Nested Arrays 129387 by: Beauford.2002 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 --- What are the different ways to open an HTTPS connection from within a script and receive back the response into a variable? I know CURL can do it, and PHP 4.3 with OpenSSL can use fopen() to do it. Can sockets be used at all with PHP 4.2 to get the page or maybe a system call to a simple program to do it? This is going to be on a Win2K machine. Thanks for any info. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ --- End Message --- --- Begin Message --- Hello friends, As the subject suggests I am looking for language capabilitie on my php webpages. Can someone please tell me which is a good way? I thought that I could have a database, but if so, can MySQL: handle multiple languages in the fields(like chinese language)? if this is possible, what about the html output : does the user need to install some fonts etc ? Thanks very much Denis --- End Message --- --- Begin Message --- Hello friends, Can someone please tell me where I can find sample scripts for populating textboxes and listboxes on a form(when the form opens) using the data from fields in a table? Thanks Denis --- End Message --- --- Begin Message --- Text box: print "\n"; List box: print "\n"; while($row = mysql_fetch_array($result)) { extract($row); print "$data_title\n"; } print "\n"; - Original Message - From: "Denis L. Menezes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 26, 2002 6:13 AM Subject: [PHP] Populating textboxes and listboxes from a query result of a database table Hello friends, Can someone please tell me where I can find sample scripts for populating textboxes and listboxes on a form(when the form opens) using the data from fields in a table? Thanks Denis --- End Message --- --- Begin Message --- On Thursday 26 December 2002 06:59 am, Rick Emery wrote: > Text box: > print "\n"; i prefer to use templates. i use my own template code, but there are good template systems online that you can use, e.g., http://smarty.php.net is powerful. in a simple template system, assume that there is a file (the template) that contains HTML (in my system, i use mixed php and html, with a special function TemplateVirtual to make things work, but in this example let's assume it's straight HTML to keep it simple as possible). we load the file and replace substrings in there with the data. the convention is: database fieldname is, for example, dbfield. corresponding input fieldname is dbfield_name, corresponding input value template (in the HTML, to be replaced with the actual contents of the dbfield) is {dbfield_va
php-general Digest 27 Dec 2002 11:32:06 -0000 Issue 1787
php-general Digest 27 Dec 2002 11:32:06 - Issue 1787 Topics (messages 129388 through 129423): Re: Open HTTPS connection 129388 by: Sean Burlington Re: Nested Arrays 129389 by: Weston Houghton 129390 by: Weston Houghton 129391 by: Wee Keat [Amorphosium] 129395 by: Beauford.2002 129402 by: Wee Keat [Amorphosium] 129414 by: Paul Reed php+gd 2.0.7 problems take 2 129392 by: cj str_replace 129393 by: Weston Houghton 129396 by: John W. Holmes 129397 by: Weston Houghton Cheap Hosting 129394 by: Stephen 129398 by: Rick Emery 129405 by: Kyle Gibson 129407 by: Jason k Larson 129409 by: Daniel Kushner Photos and logos in MySQL + PHP 129399 by: Denis L. Menezes 129400 by: Michael J. Pawlowsky 129401 by: Rick Widmer include "problem" 129403 by: Pag 129404 by: Rasmus Lerdorf odd results inquiry 129406 by: Tony Tzankoff 129408 by: Michael J. Pawlowsky 129410 by: Michael J. Pawlowsky How To Use The next() and prev() functions on multi-dimensional arrays 129411 by: . Nilaab 129412 by: Jason k Larson Re: Finding # of weekdays between 2 dates.. 129413 by: Marek Kilimajer Re: Installing PHP on XP 129415 by: Marek Kilimajer Re: Unable to set permissions 129416 by: Marek Kilimajer Re: Selecting what's for deletion 129417 by: Marek Kilimajer 129419 by: Cesar Aracena 129423 by: John W. Holmes Re: language internationalisation 129418 by: Marek Kilimajer CLI delay 129420 by: Maciek Ruckgaber Bielecki 129421 by: Marek Kilimajer 129422 by: Rick Widmer 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 --- John W. Holmes wrote: What are the different ways to open an HTTPS connection from within a script and receive back the response into a variable? I know CURL can do it, and PHP 4.3 with OpenSSL can use fopen() to do it. Can sockets be used at all with PHP 4.2 to get the page or maybe a system call to a simple program to do it? This is going to be on a Win2K machine. Thanks for any info. you could try lynx http://lynx.isc.org/ its a text browser commanly available on Linux stystems but also available for dos/win32 it can retieve and dump to stdout either the raw file or the formatted text - and supports https. -- Sean --- End Message --- --- Begin Message --- Sure... for the longwinded approach, just do this: $row1 = array("col1", "col2", "col3", ...); $row2 = array("col1", "col2", "col3", ...); $row3 = array("col1", "col2", "col3", ...); $row4 = array("col1", "col2", "col3", ...); $row5 = array("col1", "col2", "col3", ...); $main_array = array($row1, $row2, $row3, $row4, $row5); Obviously these could include key-value pairs in the arrays as well. Then to prove it to yourself: print_r($main_array); Cheers, Wes On Thursday, December 26, 2002, at 06:14 PM, Beauford.2002 wrote: Hi, Is there anyway to do a nested array, I have looked at the various array functions and can't figure this out (if possible). I want to be able to put each field of a row into an array, and then put that entire row and into another array. so when I display it, I would have: row1 - col1 col2 col3 col4 col5 row2 - col1 col2 col3 col4 col5 row3 - col1 col2 col3 col4 col5 row4 - col1 col2 col3 col4 col5 row5 - col1 col2 col3 col4 col5 etc. (depending on how many rows there are). TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- --- Begin Message --- Sure... for the longwinded approach, just do this: $row1 = array("col1", "col2", "col3", ...); $row2 = array("col1", "col2", "col3", ...); $row3 = array("col1", "col2", "col3", ...); $row4 = array("col1", "col2", "col3", ...); $row5 = array("col1", "col2", "col3", ...); $main_array = array($row1, $row2, $row3, $row4, $row5); Obviously these could include key-value pairs in the arrays as well. Then to prove it to yourself: print_r($main_array); Cheers, Wes On Thursday, December 26, 2002, at 06:14 PM, Beauford.2002 wrote: Hi, Is there anyway to do a nested array, I have looked at the various array functions and can't figure this out (if possible). I want to be able to put each field of a row into an array, and then put
php-general Digest 28 Dec 2002 00:13:54 -0000 Issue 1788
php-general Digest 28 Dec 2002 00:13:54 - Issue 1788 Topics (messages 129424 through 129481): Re: Cheap Hosting 129424 by: Shashwat Nagpal 129428 by: David T-G 129442 by: Stephen 129445 by: 1LT John W. Holmes 129447 by: Edward Peloke 129451 by: Steve Jackson Re: php+gd 2.0.7 problems take 2 129425 by: Marek Kilimajer Re: Nested Arrays 129426 by: Marek Kilimajer 129427 by: Marek Kilimajer 129452 by: Beauford.2002 129454 by: Marek Kilimajer 129455 by: Michael J. Pawlowsky 129464 by: Beauford.2002 executable 129429 by: Edward Peloke 129430 by: Marek Kilimajer 129432 by: Michael J. Pawlowsky Does PHP recognize multiple selections in a form? 129431 by: Micah Bushouse 129433 by: Marco Tabini 129434 by: Marek Kilimajer 129440 by: Micah Bushouse XML-Presentationsystem from the Conf2002 129435 by: Tobias Schlitt 129436 by: Rasmus Lerdorf Re: [PHP-DEV] XML-Presentationsystem from the Conf2002 129437 by: Derick Rethans 129438 by: Derick Rethans Re: Finding # of weekdays between 2 dates.. 129439 by: Chad Day Reg Ex for replacing or with \n 129441 by: Tom Beddard 129444 by: Tom Beddard Re: OOP and object references, not copies - how to do? 129443 by: Rasmus Lerdorf processform.php not found 129446 by: Cerebrimbor 129448 by: Stephen 129453 by: Maciek Ruckgaber Bielecki PHP 4.3.0 released 129449 by: Andrei Zmievski Re: CLI delay 129450 by: Maciek Ruckgaber Bielecki Just need a link ;) 129456 by: Brian J. Celenza 129457 by: Jason Sheets 129458 by: Michael J. Pawlowsky uploading + downloading Large files ... 129459 by: Jimmy Brake 129460 by: Andrew Brampton 129462 by: James E Hicks III mysql_escape_string is deprecated? 129461 by: Leif K-Brooks 129471 by: 1LT John W. Holmes Flow diagrams.-- Resending 129463 by: Sridhar Moparthy 129475 by: Jimmy Brake directory list function? 129465 by: Dade Register 129466 by: Kevin Stone 129467 by: Maciek Ruckgaber Bielecki 129473 by: Maciek Ruckgaber Bielecki monster form and compression? 129468 by: Jeff D. Hamann 129470 by: Maciek Ruckgaber Bielecki 129477 by: Jimmy Brake php app frameworks? 129469 by: Jeff D. Hamann 129479 by: Javier [PHP-WIN] ftp_rawlist working as Admin and not working as normal user 129472 by: Paul Menard exec, system , backtick 129474 by: gamin 129476 by: Maciek Ruckgaber Bielecki 129478 by: gamin 129480 by: Maciek Ruckgaber Bielecki Re: Flow diagrams 129481 by: Manuel Lemos 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 can suggest u the best then.. 40$ annually will be fine with you??? then mail me back! Cheers! Shashwat www.shashwat.com "Stephen" <[EMAIL PROTECTED]> wrote in message 001e01c2ad42$b4ff1d20$0200a8c0@melchior">news:001e01c2ad42$b4ff1d20$0200a8c0@melchior... Hello, I need a nice, reliable host for my new website. It needs to be fast, reliable, needs a good uptime, and some features. PHP and MySQL are the two I really need. Does anyone recomend one that's really cheap? So far I've found on, $5 a month, but it's slower then what'd I like. If nothing else pops up, I'll go with it. I'd also like domain parking and/or domain registration (don't really need the registration though). Thanks in advance! Thanks, Stephen Craton http://www.melchior.us "What is a dreamer that cannot persevere?" -- http://www.melchior.us --- End Message --- --- Begin Message --- Stephen -- ...and then Stephen said... % % Hello, Hi! % % I need a nice, reliable host for my new website. It needs to be fast, reliable, needs a good uptime, and some features. PHP and MySQL are the two I really need. Does anyone recomend one that's really cheap? So far I've found on, $5 a month, but it's slower then what'd I like. If nothing else pops up, I'll go with it. I'd also like domain parking and/or domain registration (don't really need the registration though). Thanks in advance! This question has come up a number of times before. Check the archives for even more suggestions. That said... I offer php, mysql, ftp, multiple mail boxes, mailing lists, yourdomain hosting/parking, and more; my server is at DataPipe with good bandwidth and all of the goodies of a more expensive hosting package (since that's what *I*
php-general Digest 28 Dec 2002 13:02:28 -0000 Issue 1789
php-general Digest 28 Dec 2002 13:02:28 - Issue 1789 Topics (messages 129482 through 129496): Re: php app frameworks? 129482 by: Jason Sheets 129486 by: michael kimsal 129487 by: Javier Re: exec, system , backtick 129483 by: Michael Sims 129489 by: gamin 129490 by: gamin object vs functions 129484 by: Mat Harris 129492 by: Paul Reed Re: PHP 4.3.0 released 129485 by: The Doctor 129495 by: Rick Widmer some multiple array problems... 129488 by: Victor XSLT Transformation 129491 by: Boris Kolev rounding...sort of 129493 by: Peter Lavender 129494 by: Jason Wong Date fields 129496 by: Peter Goggin 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 --- If you go to www.hotscripts.com they have several PHP application frameworks listed. I've investigated PHPLIB, and horde (http://www.horde.org) but wound up creating my own framework because I have not yet found a well documented framework that does what I need it to do. Jason On Fri, 2002-12-27 at 13:51, Jeff D. Hamann wrote: > What application frameworks are avail for php? > > Jeff. > > -- > Jeff D. Hamann > Hamann, Donald & Associates, Inc. > PO Box 1421 > Corvallis, Oregon USA 97339-1421 > Bus. 541-753-7333 > Cell. 541-740-5988 > [EMAIL PROTECTED] > www.hamanndonald.com > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- --- Begin Message --- Jason Sheets wrote: If you go to www.hotscripts.com they have several PHP application frameworks listed. I've investigated PHPLIB, and horde (http://www.horde.org) but wound up creating my own framework because I have not yet found a well documented framework that does what I need it to do. What were you looking for that you couldn't find in other products/projects? Thanks. --- End Message --- --- Begin Message --- [EMAIL PROTECTED] (Jason Sheets) wrote in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: Have you got any documentation of it to share? > If you go to www.hotscripts.com they have several PHP application > frameworks listed. > > I've investigated PHPLIB, and horde (http://www.horde.org) but wound > up creating my own framework because I have not yet found a well > documented framework that does what I need it to do. > > Jason > > On Fri, 2002-12-27 at 13:51, Jeff D. Hamann wrote: >> What application frameworks are avail for php? >> >> Jeff. -- *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) --- End Message --- --- Begin Message --- On Sat, 28 Dec 2002 02:55:44 +0530, you wrote: >I tried a simple command line script, in all cases no_file does not exist. I >do not want the command line script to show the error on the screen but to >deliver it in the variable $r. But alas, in all 3 cases i get 'rm: canoot >remove `no_file': No such file or directory' [script snipped] I think this is because your error is being sent to stderr but PHP is only capturing what is sent to stdout. I was able to acheive your desired results by redirecting stderr to stdout via the shell. Try the following, it worked for me: #! /usr/bin/php -q &1`; echo "the value in r is $r"; ?> If you need more info on the "2>&1" part, consult the Advanced Bash Scripting Guide here: http://www.digitaltoad.net/docs/guide/advshell/io-redirection.html --- End Message --- --- Begin Message --- "Maciek Ruckgaber Bielecki" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > how about : > #!/usr/local/bin/php -q > > $file = 'no_file'; > > if(!is_file($file)) > $mess = "no such file"; > else > $mess = shell_exec("ls $file"); > > echo $mess."\n"; > ?> > regards, > Maciek Ruckaber Bielecki > Hi Maciek, I used rm as an example to illustrate what i want to do, basically i need to catch an error if it occurs and STOP the script from going ahead and include the error in a file for later examination. I would be using 'rm, unzip, tar, rpm' etc commands from inside a PHP script. Micheal Sims' post has something interesting. gamin --- End Message --- --- Begin Message --- "Michael Sims" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Sat, 28 Dec 2002 02:55:44 +0530, you wrote: <--sniped --> #! /usr/bin/php -q &
php-general Digest 29 Dec 2002 14:53:59 -0000 Issue 1791
php-general Digest 29 Dec 2002 14:53:59 - Issue 1791 Topics (messages 129556 through 129579): unpack() - how to handle bitfields?? 129556 by: Tim Molendijk Form duplicate post problem 129557 by: Pag 129558 by: Timothy Hitchens (HiTCHO) 129559 by: Pag 129561 by: John W. Holmes 129562 by: Timothy Hitchens (HiTCHO) 129568 by: Pag 129570 by: Michael J. Pawlowsky Directing to a URL from a radio group 129560 by: Denis L. Menezes 129563 by: John W. Holmes php.ini ignored! Re: [PHP] PHP 4.3.0 released 129564 by: omer k include option and calling only part of a file. 129565 by: Stephen of Blank Canvas 129572 by: John W. Holmes snmpget 129566 by: Gareth Hastings PHP 4.3.0, function removed? 129567 by: Detritus 129569 by: Sterling Hughes 129571 by: Detritus 129573 by: gamin Re: [PHP-DEV] Re: [PHP] PHP 4.3.0 released 129574 by: Rick Widmer preg_split 129575 by: Mr Nik Frengle Re: IIS Quit Working 129576 by: Jason Wong Warning: 1 is not a valid File-Handle resource - HELP! 129577 by: Phil Powell European "daylight saving" summer-time. 129578 by: Martin Thoma PHP 4.3 unable to load php_domxml.dll in WinXP Apache 2.0.43 129579 by: Rui Costa 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 --- Hi all, I'm wrestling with this problem for a while now. I want to read a binary file (created by C software) using PHP. I know of unpack(). But the C struct that is stored in the binary file contains variables with bitfields: struct some_struct { char val_a : 2 int val_b : 7 } Such a construct means that val_a is char with a bitfield of 2 and therefore can contain values between 0 (00 binary) and 3 (11 binary). val_b is an integer with a range of 0 (000) to 127 (111). Now the problem is: how on earth do I handle those values with PHP's unpack()?!? I've tried a lot of syntaxes but none of them seem to work. Can someone please shortcut whether it is possible or not and if yes, *how*? Thanks in advance, Tim --- End Message --- --- Begin Message --- Hi, I am having some problems with duplicate form input. I have a form that adds comments to an article, works fine, but if the user clicks on "refresh", having added a comment previously, the same comment is added again. I tried clearing the variables after the database write, but the refresh somehow resends the previous values. Roughly, heres how my script works: (not using actual code syntax here) -- if {$flag=1 AND $name!='' AND $commentbody!=''){ inserts the comment into the database $flag = 0 $name = '' $comment = '' } -- routine to display the article and the existing comments here -- form here if user clicks send, puts $flag=1 and calls same page -- How can i prevent these double entries? Some command to definitely clear the variables? Thanks. Pag --- End Message --- --- Begin Message --- There is a very simple solution to this on the page that does the entries into the database simply to a header redirect to a new page that displays the success notices etc and if they do a back or a refresh nothing will happen as the POST data is on the previous now "removed" from history page. header('Location: http://www.yourdomain.com/success.html'); * you will need to put some GET data in the URL to show the correct page. That will do it for you. Remember that you can't send output on the database entry page simple to the database calls and they do the header call as above. Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] If you need PHP hosting with an experienced support team 24/7 then email me today. On Sun, 29 Dec 2002, Pag wrote: > > Hi, > > I am having some problems with duplicate form input. > I have a form that adds comments to an article, works fine, but if the > user clicks on "refresh", having added a comment previously, the same > comment is added again. I tried clearing the variables after the database > write, but the refresh somehow resends the previous values. > Roughly, heres how my script works: (not using actual code syntax here) > > -- > if {$flag=1 AND $name!='' AND $commentbody!=''){ > > inserts the comment into the database > $flag = 0 > $name = '' > $comment = '' > } > -- > routine
php-general Digest 30 Dec 2002 03:21:26 -0000 Issue 1792
php-general Digest 30 Dec 2002 03:21:26 - Issue 1792 Topics (messages 129580 through 129622): Re: Warning: 1 is not a valid File-Handle resource - HELP! 129580 by: Rick Emery 129605 by: gamin Re: Form duplicate post problem 129581 by: Pag 129585 by: John W. Holmes 129586 by: Pag 129589 by: Jason Wong 129590 by: Pag 129592 by: Jason Wong 129594 by: John W. Holmes 129599 by: Pag 129601 by: Michael J. Pawlowsky 129602 by: John W. Holmes 129604 by: Jason Sheets 129606 by: Pag Formatting text 129582 by: Denis L. Menezes 129583 by: Michael J. Pawlowsky 129584 by: John W. Holmes 129587 by: Denis L. Menezes 129588 by: Michael J. Pawlowsky 129593 by: John W. Holmes 129595 by: Maciek Ruckgaber Bielecki lstdc++ problem 129591 by: Dmitry Demczuk Re: IIS Quit Working 129596 by: Stephen 129597 by: John W. Holmes 129598 by: Stephen 129600 by: Michael J. Pawlowsky Re: Problem with REQUIRE in PHP 4.3.0 129603 by: gamin Re: php.ini ignored! Re: [PHP] PHP 4.3.0 released 129607 by: Michael Mauch Embedding image a PHP file 129608 by: empty 129610 by: justin gruenberg Re: PHP 4.3 unable to load php_domxml.dll in WinXP Apache 2.0.43 129609 by: Dirk Schiefke Load Data Infile 129611 by: Anthony Ritter 129612 by: Marco Tabini 129614 by: Anthony Ritter using mail() with .info emails? 129613 by: Joe Popovich 129615 by: Johannes Schlueter Rookie mail() q's .. can't find answer after RTFM... 129616 by: -<[ Rene Brehmer ]>- 129617 by: Sean Burlington 129618 by: Michael J. Pawlowsky Dropping Tables 129619 by: Steve Buehler 129620 by: Michael J. Pawlowsky 129622 by: John W. Holmes imap_set_quota function 129621 by: Roger Thomas 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 --- The last line cannot be producing the warning; it does not refer to a file. Please show us the EXACT error message. Are you certain the file was opened? Did you try to print $stuff after reading it? Did it have the info you thought it should? - Original Message - From: "Phil Powell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, December 29, 2002 3:08 AM Subject: [PHP] Warning: 1 is not a valid File-Handle resource - HELP! Ok, I am a bad coder. :( I can't figure this out at all: $fileID = fopen("nicknames.txt", 'r'); $stuff = fread($fileID, filesize("nicknames.txt")); fclose($fileID); if (strlen($stuff) > 0) $priorNickNewLine = "\n"; $nicks = explode("\n", $stuff); The last line produces the Warning.. why? I am trying to read contents from nicknames.txt and split according to the newline character so that each nickname is an array element. What did I do wrong? :( Phil --- End Message --- --- Begin Message --- "Phil Powell" <[EMAIL PROTECTED]> wrote in message 021801c2af19$e05909d0$2aaf6244@scandinawa1bo6">news:021801c2af19$e05909d0$2aaf6244@scandinawa1bo6... Ok, I am a bad coder. :( I can't figure this out at all: $fileID = fopen("nicknames.txt", 'r'); $stuff = fread($fileID, filesize("nicknames.txt")); fclose($fileID); if (strlen($stuff) > 0) $priorNickNewLine = "\n"; $nicks = explode("\n", $stuff); <--snip--> I would recommend you to always check if the file was opened successfully. Simply add this after your fopen.. if ($fileID === false) { // 3 '=' signs checks variable type and value die("Error opening file. $php_errormsg"); // you will need track_errors = ON in php.ini to use $php_errormsg. HTN gamin. --- End Message --- --- Begin Message --- You can still use one page and use a "middle-man" technique. The part that processes the form input would redirect back to itself after the data is inserted into the database, thus getting rid of the post data. So subsequent refreshes of the page will refresh without attempting to repost the data. This post is merely for reference and, hopefully, to help out some other person that runs into the same problem. I solved my duplicate form post problem using that middle-man technique you guys mentioned, but i did it in a little more user friendly way than using a complete page and redirecting back to the original. (thus preventing some design
php-general Digest 30 Dec 2002 15:34:19 -0000 Issue 1793
php-general Digest 30 Dec 2002 15:34:19 - Issue 1793 Topics (messages 129623 through 129672): Re: Dropping Tables 129623 by: Steve Buehler Re: imap_set_quota function 129624 by: Michael Sims Re: PHP 4.3 unable to load php_domxml.dll in WinXP Apache 2.0.43 129625 by: Davy Obdam Re: Problem with REQUIRE in PHP 4.3.0 129626 by: Bc. Radek Krejca Clear file or write to file erasing all old content 129627 by: Noodle Snacks 129628 by: jason perkins 129629 by: Noodle Snacks PHP and XML parser (expat) 129630 by: Lasse Tarp HTML module problem under Linux/APache2.0 129631 by: Tiziano Crimella 129632 by: Leif K-Brooks 129633 by: Tiziano Crimella 129634 by: Jason k Larson Auto_incerement value 129635 by: Cesar Aracena 129636 by: Jason k Larson 129637 by: Rick Widmer Serializing a DOM object 129638 by: Boget, Chris PHP & PostgreSQL 129639 by: Boget, Chris 129640 by: Jason Wong 129643 by: Boget, Chris 129644 by: Jason Wong 129645 by: Rick Widmer 129647 by: Rick Widmer 129648 by: Jason Wong 129650 by: Boget, Chris 129654 by: Boget, Chris 129657 by: Michael Sims 129658 by: Boget, Chris 129660 by: Michael Sims 129663 by: Jason Wong 129665 by: Boget, Chris 129668 by: Jason Wong 129670 by: Boget, Chris Zerofill 129641 by: Cesar Aracena 129642 by: Jason k Larson 129649 by: Rudolf Visagie usort crashes 129646 by: CeeGee Text repeating problem 129651 by: Simon Hay 129666 by: Rasmus Lerdorf install problem 129652 by: gnu_is_not_unix.wp.pl 129661 by: Rasmus Lerdorf help-regarding installation 129653 by: celia rexselin function misfunction 129655 by: Martin S 129659 by: Michael Sims 129669 by: Jason Wong Multi Language support 129656 by: Michael J. Pawlowsky creating a .doc file in php 129662 by: Edward Peloke 129664 by: Marco Tabini 129672 by: Edward Peloke Re: include "problem" -- how to use an external 'template' file and still use PHP variables? 129667 by: Daevid Vincent importing array from flash, how does PHP handle it? 129671 by: Gav 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 --- Thank You so much John and Michael. SHOW TABLES LIKE 'a%' worked like a charm and was exactly what I was looking for. I guess my searches were using the wrong keywords. Kind of figures. Some of my searches were turning up 1000's of results. How do you know whether it's an "active" a* table or not? Will you be dropping a table that someone is actually using? I will be shutting down the script at a certain time each day to run some things like this for maintenance. So none of these should be active and if they are, it won't hurt anything. The customer can just wait until the maintenance time is over. Approximately 10 mintues. At 10:21 PM 12/29/2002 -0500, you wrote: > Basically just do a a php script the sends the sql "show tables"; > > Then do a strchr() to see if "a" is the first letter in the resuts and if > so do a delete table. > > Just yo play safe do a dump of your db first. Or even better, use SHOW TABLES LIKE 'a%' to just get the a* tables and drop each one. How do you know whether it's an "active" a* table or not? Will you be dropping a table that someone is actually using? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ow3 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ow3 --- End Message --- --- Begin Message --- On Sun, 29 Dec 2002 18:26:01 -0800 (PST), you wrote: >"This function requires the imap_stream to have been opened as the mail >administrator account. It will not work if opened as any other user. [...] >my question is, where do i set this admin called 'mailadmin' with password >'password'. do i set it in courier/uw for example? Yes, you need to give imap_set_quota() a username and password of an account that has administrator privileges on your IMAP server. If you were using Cyrus IMAP you'd use an account
php-general Digest 31 Dec 2002 15:58:36 -0000 Issue 1795
php-general Digest 31 Dec 2002 15:58:36 - Issue 1795 Topics (messages 129728 through 129779): Re: SQL Error 129728 by: John W. Holmes Re: PHP Look Back 2002 129729 by: John W. Holmes Making with $values!!! 129730 by: Alexander Guevara 129732 by: Maciek Ruckgaber Bielecki 129765 by: Marek Kilimajer Eocene -- An OO Framework for Web Devlopment 129731 by: Eocene printing documents on printer 129733 by: Larry Brown 129734 by: John W. Holmes 129735 by: Larry Brown 129736 by: Michael J. Pawlowsky PLEASE HELP 129737 by: Dale 129756 by: gamin FORM text formatting problem 129738 by: Pag 129739 by: John W. Holmes 129740 by: Pag Getting short (DOS) name of file? 129741 by: Leif K-Brooks 129748 by: Leif K-Brooks 129749 by: Tom Rogers 129769 by: Michael Sims chunking a blob field. adding a large object chunk by chunk 129742 by: Mike Brancato 129759 by: Marek Kilimajer Function misfunction - 2 129743 by: Martin S 129758 by: Marek Kilimajer 129761 by: Martin S 129764 by: Jason Wong 129766 by: Martin S 129767 by: Jason Wong 129770 by: Martin S 129771 by: Jason Wong 129772 by: Martin S 129774 by: Marek Kilimajer Re: PHP 4.3 JPG Support. Whats needed? 129744 by: Jason Wong Re: PHP3 + session handling limitation 129745 by: electroteque 129750 by: Tom Rogers Shopping Cart Credit Card Verification 129746 by: Josiah Peters 129747 by: Maciek Ruckgaber Bielecki Date problem 129751 by: Denis L. Menezes 129757 by: Rick Widmer 129775 by: John W. Holmes Arrays of strings from regex 129752 by: David Pratt 129762 by: Marek Kilimajer Re: rtfI knew it couldn't be this easy 129753 by: gamin Re: Keeping script running, but returning control to user? 129754 by: gamin PHP Error 129755 by: Dale 129760 by: Marek Kilimajer Parameters and Access 129763 by: rblack.datavisibility.co.uk Re: [PHP-DEV] PHP Look Back 2002 129768 by: Marcus Börger mail() 129773 by: Edward Peloke Problems getting PHP to work (IIS5/XP Pro) 129776 by: Jeff Lewis Php 4.3.0 and Mail() function 129777 by: Carl Bélanger Repeats of values 129778 by: Anthony Ritter openssl_csr_sign issues 129779 by: Larry 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 don't think there's anything wrong with the queries themselves. Are you trying to run them all at once? You're getting an error because MySQL is reaching a semi-colon somewhere and that's causing a parse error... Show how you're trying to run all of these queries. Bottom line, you must do them one at a time with mysql_query, or run them through the command line in a file. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 7:15 PM To: PHP List Subject: [PHP] SQL Error I'm having some troubles. I have an install script which runs a lot of SQL statements to create tables then insert info into them. One of them is an emoticons table. Here's the error I'm getting: You have an error in your SQL syntax near '; INSERT INTO c_emotes VALUES \(':\)', 'emotes/smile.gif'\); INSERT INTO c_emo' at line 4 or, if I change my code a little, it's this: You have an error in your SQL syntax near '; INSERT INTO c_emotes VALUES \(':)', 'emotes/smile.gif'\); INSERT INTO c_emo' at line 4 Here's my code which inserts the information: INSERT INTO c_emotes VALUES (':)', 'emotes/smile.gif'); // I also have tried placing a \ infront of the )...no luck INSERT INTO c_emotes VALUES (';)', 'emotes/wink.gif'); INSERT INTO c_emotes VALUES (':(', 'emotes/sad.gif'); INSERT INTO c_emotes VALUES (':P', 'emotes/tounge.gif'); INSERT INTO c_emotes VALUES (':|', 'emotes/blank.gif'); INSERT INTO c_emotes VALUES (':-|', 'emotes/blank.gif'); INSERT INTO c_emotes VALUES (':-)', 'emotes/smile.gif'); INSERT INTO c_emotes VALUES (';-)', 'emotes/wink.gif'); INSERT INTO c_emotes VALUES (':-P', 'emotes/tounge.gif'); INSERT INTO c_emotes VALUES (':-(', 'emotes/sad.gif'); Anyone see the problem
php-general Digest 1 Jan 2003 04:58:08 -0000 Issue 1796
php-general Digest 1 Jan 2003 04:58:08 - Issue 1796 Topics (messages 129780 through 129823): Re: Repeats of values 129780 by: Andrew Brampton 129782 by: Tom Rogers 129783 by: Thomas Seifert MySQL Join 129781 by: John Hinton 129811 by: Jason Wong Re: Function misfunction - 2 129784 by: Andrew Wallace How To Delete Multiple Items Of Multiple Tables Using PHP and MySQL 129785 by: . Nilaab 129788 by: Stephen 129808 by: . Nilaab 129812 by: Jason Wong assigning to $this in constructor? 129786 by: Matt Friedman loading a db table into a php array from mysql 129787 by: David T-G 129791 by: Tularis 129793 by: David T-G 129819 by: Rick Widmer Re: Serializing a DOM object 129789 by: Boget, Chris Re: Keeping script running, but returning control to user? 129790 by: Tularis FastCGI 129792 by: Fernando Serboncini Re: Getting short (DOS) name of file? 129794 by: Leif K-Brooks fwrite() debugging 129795 by: Alberto Brea 129796 by: Timothy Hitchens \(HiTCHO\) 129798 by: Michael J. Pawlowsky SUMMARY - Re: [PHP] Re: loading a db table into a php array from mysql 129797 by: David T-G Running PHP on Windows OS 129799 by: Todd Cary 129804 by: John Nichel 129814 by: Todd Cary 129816 by: David Freeman Re: Flow diagrams.-- Resending 129800 by: Jimmy Brake receiving XML stream as server via PHP 129801 by: Kristopher Yates 129806 by: Timothy Hitchens \(HiTCHO\) 129809 by: Timothy Hitchens \(HiTCHO\) 129813 by: Boget, Chris Missing logos 129802 by: Richard A Downing 129803 by: Tyler Longren 129807 by: Richard A Downing Re: Using strtotime on 'old' dates. 129805 by: David J. Johnson Re: mail() 129810 by: Jason Wong HTTP_IF_MODIFIED_SINCE 129815 by: Ian M. Evans use included GD of external 129817 by: Richard Pijnenburg 129821 by: Rick Widmer 129822 by: Richard Pijnenburg Re: Php 4.3.0 and Mail() function 129818 by: Rick Widmer PHP 4.3.0 (Win32, zip) not bundled with PEAR? 129820 by: Tobias Schlitt makeing an array 129823 by: Philip J. Newman 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 --- Hi, I think changing while(list (,$value) = each ($line)) { to foreach ($line as $value) { might help but I'm unsure, either way foreach is easier to read :) Andrew - Original Message - From: "Anthony Ritter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 31, 2002 4:47 PM Subject: [PHP] Repeats of values > I'm running the following sql query which outputs a repeat value for each > field in the html cell box. > > Like this: > .. > 3.3 3.3 78 78 2002-06-11 2002-06-11 > ... > > which is not what I would like. > > I was trying to get: > . > 3.3 78 2002-06-11 > > > I thought that by dropping off the $key in the $key - $value pair > to: > > while(list (,$value) = each ($line)) > > would accomplish that. > > The SQL query is: > > SELECT level, pm, date FROM daytime WHERE pm >=75 > > > The php script is: > > $link = mysql_connect("", "", "") > or die ("Could not connect"); > mysql_select_db ("water") > or die ("Could not select database"); > > > $query = "SELECT level, pm, date FROM daytime WHERE pm >= 75"; > $result = mysql_query ($query) > or die ("Query failed"); > > // printing HTML result > > > print ("Dates where water exceeded 75 > degrees at Callicoon, New York - 2002"); > print(""); > print "\n"; > > while($line = mysql_fetch_array($result)){ > print "\t\n"; > while(list (,$value) = each ($line)) { >print " size=2>$value\n"; > } > print "\t\n"; > } > print "\n"; > > mysql_close($link); > ?> > .. > > Any help would be greatly appreciated. > Happy New Year! > > Tony Ritter > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- End
php-general Digest 1 Jan 2003 17:26:29 -0000 Issue 1797
php-general Digest 1 Jan 2003 17:26:29 - Issue 1797 Topics (messages 129824 through 129854): Re: makeing an array 129824 by: Timothy Hitchens \(HiTCHO\) 129826 by: Philip J. Newman 129827 by: Timothy Hitchens \(HiTCHO\) 129840 by: Sean Malloy 129841 by: Timothy Hitchens \(HiTCHO\) Re: Serializing a DOM object 129825 by: Tom Rogers Re: PHP3 + session handling limitation 129828 by: Dan Rossi 129829 by: Dan Rossi 129830 by: Tom Rogers 129831 by: Justin French Re: Alternatives for Meta Refresh 129832 by: Justin French 129833 by: Timothy Hitchens \(HiTCHO\) Securing areas of a web site with PHP 129834 by: Jean-Christian Imbeault 129837 by: Tularis 129838 by: Jean-Christian Imbeault 129846 by: Michael J. Pawlowsky 129848 by: michael kimsal Need Help. 129835 by: thkiat 129851 by: Jason Sheets error on include_path=(''c:\php4\pear") 129836 by: anand.texsurat.com Re: loading a db table into a php array from mysql 129839 by: David T-G Re: How To Delete Multiple Items Of Multiple Tables Using PHP and MySQL 129842 by: . Nilaab 129843 by: Thomas Seifert Windows XP 129844 by: Stephen 129847 by: Mat Harris call_user_method_array 129845 by: Boget, Chris 129849 by: Marco Tabini 129850 by: Boget, Chris error when conecting to mysql 129852 by: Paul Roberts 129853 by: Michael J. Pawlowsky Re: Php 4.3.0 and Mail() function 129854 by: Carl Bélanger 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 --- Example of an Array: $my_first_array = array(1 => 'first', 2 => 'second', 3 => 'third'); You can now access these like so: echo $my_first_array[1]; etc etc of if you had this: $my_first_array = array('first_name' => 'Philip', 'last_name' => 'Newman'); You could do this: echo $my_first_array['first_name']; The thing to remember is that array's start at 0 "see below!!" (I started at 1 at the top to make it easier). You can also make an array like so: $first[] = 'Philip'; $first[] = 'John'; $first[] = 'Paul'; Now you can simply do: echo $first[0]; // this could output 'Philip'; You can then look at multi dimensional etc... I trust this get's you on your way. Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] HiTCHO | Open Platform Web Development Consulting - Outsourcing - Training - Support - Original Message - From: "Philip J. Newman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 01, 2003 2:57 PM Subject: [PHP] makeing an array > Can someone help me make an array ... > > I have $foo amount of loops to preform (1-20), and would like to make the > veriable work for me like $comment_1, $comment_2 etc etc. > > http://nz.php.net/manual/en/function.array.php makes no sence to me after i > read it and read it ... > > help me please > > --- > Philip J. Newman. > Head Developer. > PhilipNZ.com New Zealand Ltd. > http://www.philipnz.com/ > [EMAIL PROTECTED] > > Mob: +64 (25) 6144012. > Tele: +64 (9) 5769491. > > VitalKiwi Site: > Philip J. Newman > Internet Developer > http://www.newman.net.nz/ > [EMAIL PROTECTED] > > * > Friends are like Stars, > You can't always see them, > But you know they are there. > > * > > ICQ#: 20482482 > MSN ID: [EMAIL PROTECTED] > Yahoo: [EMAIL PROTECTED] > AIM: newmanpjkiwi > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > --- End Message --- --- Begin Message --- So in saything that I could do this ... $s = 10 $comment[1] = '$comment_1'; $comment[2] = '$comment_2'; $comment[3] = '$comment_2'; for($i = 0; $i <= $s; $i++) { echo $comment[$i].""; } - Original Message - From: "Timothy Hitchens (HiTCHO)" <[EMAIL PROTECTED]> To: "Philip J. Newman" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 01, 2003 6:12 PM Subject: Re: [PHP] makeing an array > Example of an Array: > > $my_first_array = array(1 => 'first', 2 => 'second', 3 => 'third'); > > You can now access these like so: > > echo $my_first_array[1]; etc etc > > of if you had t
php-general Digest 2 Jan 2003 17:55:50 -0000 Issue 1799
php-general Digest 2 Jan 2003 17:55:50 - Issue 1799 Topics (messages 129918 through 129966): help with script!! 129918 by: Karl James 129919 by: Michael J. Pawlowsky 129920 by: Justin French help with script 129921 by: Karl James 129922 by: Michael J. Pawlowsky Re: How To Delete Multiple Items Of Multiple Tables Using PHP and MySQL 129923 by: . Nilaab Re: loading a db table into a php array from mysql 129924 by: Rick Widmer 129926 by: Rick Widmer Re: Using mail() for mailist list app 129925 by: Rick Widmer 129940 by: Manuel Lemos Re: creating a .doc file in php 129927 by: Chris Hewitt Re: send page with https and php sessions problem 129928 by: Chris Hewitt prevent session_replay 129929 by: scott 129934 by: Michael J. Pawlowsky 129941 by: Marek Kilimajer 129945 by: Michael J. Pawlowsky 129953 by: Chris Shiflett Re: makeing an array 129930 by: Sean Malloy 129939 by: Ford, Mike [LSS] 129942 by: Gerald Timothy Quimpo 129947 by: Ford, Mike [LSS] mail attachments 129931 by: Edward Peloke 129932 by: Marco Tabini 129933 by: Edward Peloke 129935 by: Michael J. Pawlowsky 129936 by: Manuel Lemos 129937 by: Adam Voigt 129943 by: Michael J. Pawlowsky Re: Text repeating problem 129938 by: Ford, Mike [LSS] killing child process 129944 by: gamin 129946 by: Michael J. Pawlowsky 129952 by: Marek Kilimajer 129955 by: Michael J. Pawlowsky Index page 129948 by: thkiat 129949 by: Michael J. Pawlowsky Re: receiving XML stream as server via PHP 129950 by: Kristopher Yates 129951 by: Kristopher Yates 129954 by: Kristopher Yates phpinfo() and HTTP_RAW_POST_DATA 129956 by: Kristopher Yates 129957 by: Chris Shiflett Multidimensional Array manipluation... 129958 by: Dhaval Desai 129963 by: Chris Shiflett 129964 by: Dhaval Desai 129965 by: Chris Shiflett 129966 by: Dhaval Desai Re: accelerator and Apache 2 129959 by: Gyozo Papp 129960 by: Gyozo Papp Re: func_get_args() and call-by-reference? 129961 by: Atahualpa Jones Re: mcrypt 129962 by: J Smith 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 --- HYPERLINK "http://host.makethewebsecure.com/~admin12/do_adduser.phps"http://host.m akethewebsecure.com/~admin12/do_adduser.phps can someone take a look at this and see why this wont work. karl --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- End Message --- --- Begin Message --- Without the error message you are making it kind of tough. What's the response that you get. Also you should use long HYPERLINK >"http://host.makethewebsecure.com/~admin12/do_adduser.phps"http://host.m >akethewebsecure.com/~admin12/do_adduser.phps > > >can someone take a look at this >and see why this wont work. > >karl > >--- >Outgoing mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- End Message --- --- Begin Message --- on 02/01/03 7:54 AM, Karl James ([EMAIL PROTECTED]) wrote: > can someone take a look at this > and see why this wont work. why don't you start by telling us what's wrong, or HOW it "doesn't work"? Justin --- End Message --- --- Begin Message --- Sorry guys!!! Well im trying to add the form to my database table. Which is this link!! HYPERLINK "http://host.makethewebsecure.com/~admin12/show_adduser.html"http://host .makethewebsecure.com/~admin12/show_adduser.html then when I hit add user!!! I get this error message Added to auth_users: Access denied for user: 'kjames@localhost' to database ' ultimatefootballleague_com' Which is this site HYPERLINK "http://host.makethewebsecure.com/~admin12/do_adduser.php"http://host.ma kethewebsecure.com/~admin12/do_adduser.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- End Message --- --- Begin Message --- There's your answer... You do not have permission to insert into the database with that user. Contact your DBA! :-) and if that's you read the MySQL manual. Especi
php-general Digest 4 Jan 2003 18:21:57 -0000 Issue 1803
php-general Digest 4 Jan 2003 18:21:57 - Issue 1803 Topics (messages 130209 through 130241): Re: true ip tracking 130209 by: electroteque 130212 by: Jason Wong Re: Still executing afte die()? 130210 by: Jason Wong 130213 by: Leif K-Brooks Re: exec() not exec-ing? 130211 by: Jason Wong 130215 by: gilrain 130217 by: Jason Wong 130220 by: gilrain 130221 by: gilrain 130240 by: gilrain Avoiding Repeat Posts 130214 by: OrangeHairedBoy 130218 by: Justin French 130219 by: OrangeHairedBoy 130223 by: Tularis 130225 by: Michael J. Pawlowsky 130233 by: Charles likes PHP 130237 by: Gyozo Papp Re: Hello and help 130216 by: OrangeHairedBoy PHP and MySQL bug 130222 by: Nuno Lopes 130226 by: Michael J. Pawlowsky 130239 by: OrangeHairedBoy 130241 by: Michael J. Pawlowsky Re: Javascript broken! 130224 by: Sean Burlington how to determine if the output has been flushed normally... 130227 by: Gyozo Papp 130229 by: Gyozo Papp PHP vs. ASP 130228 by: Anthony Rodriguez 130234 by: Leon Mergen REPOST: installation problems (php 4.2.3/mcrypt/curl) 130230 by: Michael Geier 130238 by: Michael J. Pawlowsky help with preg_match 130231 by: Anders Thoresson 130235 by: Tracy Finifter Rotton security in guest book and user forums 130232 by: Anders Thoresson upgrading WAMP environment 130236 by: Anders Thoresson 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 --- its a bit tedious to make anonymous visotors register on the site to vote a poll , so there is no other workaround then ? "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Saturday 04 January 2003 12:38, electroteque wrote: > > hi i was wondering if there was a way to get the clients ip's behind > > proxies that hide the HTTP_X_FORWARDED_FOR header ? > > No. > > > this is most important > > for checking ips for polls except some proxies dont send this important > > header ?? > > It's not that important. In many cases it could very well be a private IP > address and hence of dubious value. > > If the accuracy of the poll is important then only let registered and logged > in users take part in the poll. Even then, depending on your registration > procedures, you may have people registering multiple times to cast multiple > votes. > > In short there is no surefire way of preventing people from voting more than > once. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > "From there to here, from here to there, funny things are everywhere." > -- Dr. Seuss > */ > --- End Message --- --- Begin Message --- On Saturday 04 January 2003 14:32, electroteque wrote: > its a bit tedious to make anonymous visotors register on the site to vote a > poll , so there is no other workaround then ? No. You could make them people pay a substantial sum of money for each vote they place -- that'll make them think twice before putting in multiple votes :) But seriously, look in the archives the hows and whys have been covered quite comprehensively in the past. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* VMS is like a nightmare about RXS-11M. */ --- End Message --- --- Begin Message --- On Saturday 04 January 2003 13:44, Leif K-Brooks wrote: As I understand it, your situation is this: a) all your pages are named in lowercase b) if someone tries to access a non-existent page on your site (eg using a URI which is not fully lowercase) they'll hit your 404.php > But I only want it to insert if the page was all lowercase when they > went to it. But if the page was all lowercase they wouldn't be hitting your 404.php page in the first place? Or am I missing something? > I understand it continuing after redirecting, but why after > die()ing too? Putting the insert code into an else statment solved the > problem, but it's ugly, and the question still remains... why does it do > this? It cannot continue after a die(), unless there's a bug in PHP. If you still think that it does then post your full code and the circumstances under which it
php-general Digest 5 Jan 2003 09:19:52 -0000 Issue 1804
php-general Digest 5 Jan 2003 09:19:52 - Issue 1804 Topics (messages 130242 through 130301): No Global Code Fixing 130242 by: Michael J. Pawlowsky 130244 by: Rasmus Lerdorf 130245 by: Michael J. Pawlowsky 130248 by: Michael J. Pawlowsky 130249 by: Tularis 130250 by: Jason Sheets Re: security in guest book and user forums 130243 by: Seraphim 130246 by: Tularis 130254 by: Jason Wong 130285 by: Justin French 130286 by: Justin French mssql functions 130247 by: Duncan Re: One more form question 130251 by: Ford, Mike [LSS] Re: PHP and MySQL bug 130252 by: Stefan Hinz, iConnect \(Berlin\) 130253 by: Michael J. Pawlowsky You gotta love it... 130255 by: Michael J. Pawlowsky 130256 by: Andy Turegano Re: [PEAR-DEV] Announcing open CVS for phpDocumentor project 130257 by: Greg Beaver I can't code today to save my life! :( 130258 by: Phil Powell 130259 by: Chris Hayes 130260 by: Michael J. Pawlowsky 130261 by: Michael J. Pawlowsky Re: upgrading WAMP environment 130262 by: David T-G counter problem 130263 by: Anthony Ritter 130265 by: Michael J. Pawlowsky 130266 by: Michael J. Pawlowsky 130270 by: Anthony Ritter 130281 by: Michael J. Pawlowsky Second (Bizarre) Question regarding PHP and ASP 130264 by: Phil Powell 130267 by: Michael J. Pawlowsky 130268 by: Andrew Brampton 130273 by: Gerald Timothy Quimpo 130280 by: Phil Powell 130284 by: Michael J. Pawlowsky Perl > PHP 130269 by: Sam 130275 by: Leif K-Brooks web visitor viewing a script? 130271 by: Larry Brown 130277 by: Timothy Hitchens \(HiTCHO\) 130282 by: Michael J. Pawlowsky 130294 by: Larry Brown PHP and empty() if form value is 0 130272 by: Phil Powell 130278 by: Michael Sims 130279 by: Phil Powell 130300 by: Michael Sims Re: exec() not exec-ing? 130274 by: Brendon Gearin Read-only gif support in 4.3.0 130276 by: Adam Plocher 130283 by: Michael J. Pawlowsky 130287 by: Adam Plocher 130288 by: Michael J. Pawlowsky 130289 by: Adam Plocher 130292 by: Rasmus Lerdorf 130293 by: Michael J. Pawlowsky Function to catch all mySQL errors? 130290 by: Jeff Lewis 130291 by: Adam Plocher 130296 by: Michael J. Pawlowsky 130298 by: Tom Rogers pack, unpack and little endian double values 130295 by: timmer Re: Recommend payment processors? 130297 by: Jonathan Rosenberg \(Tabby's Place\) 130299 by: David McInnis php4.3.0 & GD library 130301 by: thkiat 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 --- Well I've been fixing up all my code (and other peoples which is worst) getting ready to do an upgrade to 4.3. and turning off globals and warnings on. I very often move parameters that were once POSTed as a GETs. For instance... some one does a search but is not logged in, they can see the results but don's see the "Edit" results button. So they log in, and I send them back to the search they just did. The first search is done by a POST and when I redirect them after the login it's done by a GET. So I use to simply not specify if it was a GET or POST and looked to see if the var existed or not to see how to load that page. Now I've been adding alot of: if (isset($_POST['keyword'])){ $keyword = $_POST['keyword']; }elseif (isset($_GET['keyword'])){ $keyword = $_GET['keyword']; } else { unset($keyword); } I suppose I could also do something like this (which is not much different) if(isset($_POST['keyword']) || isset($_GET['keyword'])){ $keyword = isset($_POST['keyword'])?$_POST['keyword']:$_GET['keyword']; }else{ unset($keyword); } I guess I could get rid of the unset, but I like it there just in case something earlier filled that puppy. So I end up with alot of these right now at the top of each page. Especially if the URI is something like http:www.mysite.com/index.php?this=that&id=1&lang=en&so=on&so=on&so=on&so=on&so=on&so=on Know what I mean? So just wondering if anyine had something really elegant to replace it. Cheers, Mike --- End Message --- --- Begin Message --- Why don't you just use $_REQUEST['keyword'] ? On Sat, 4 Jan 2003,
php-general Digest 5 Jan 2003 21:27:01 -0000 Issue 1805
php-general Digest 5 Jan 2003 21:27:01 - Issue 1805 Topics (messages 130302 through 130336): Re: PHP and MySQL bug 130302 by: Nuno Lopes array help please 130303 by: John Fishworld 130304 by: David T-G undefining an array element 130305 by: David T-G 130308 by: Tom Rogers 130309 by: David T-G 'php_network_getaddresses' 130306 by: zzori undocumented OOP feature/bug? 130307 by: Sean Malloy 130313 by: Jurre Thiel php_admin values in httpd.conf 130310 by: Jochen Kaechelin 130311 by: Jurre Thiel 130327 by: Jason Wong Re: security in guest book and user forums 130312 by: Jurre Thiel Re: Perl > PHP 130314 by: Jurre Thiel 130318 by: Marek Kilimajer 130321 by: Jurre Thiel 130323 by: Mark Charette Re: counter problem 130315 by: Anthony Ritter Re: File Modification Date/Time 130316 by: Marek Kilimajer Re: please help me, y have a error 130317 by: Marek Kilimajer JPgraph Font Problems 130319 by: Alexandre Soares [announce] AtomicBoard v0.6.1 130320 by: Vincent Vollers web reload 130322 by: TACKEL 130325 by: Marek Kilimajer 130326 by: Jason Sheets 130329 by: Marek Kilimajer Mysql update problems 130324 by: Jesse Lawrence 130328 by: Rick Emery 130330 by: Jason Wong 130331 by: Jesse Lawrence 130332 by: Rick Emery .doc parsing class or function? 130333 by: James Brennan 130335 by: Sean Burlington system() 130334 by: Richard Baskett Re: php4.3.0 & GD library 130336 by: Philip Olson 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 --- Here is the source code: Seleccione a localização para o download:Localização Principal"; if ($mirrors) { echo " Mirrors"; $m=explode("»",$mirrors); foreach ($m as $v) { $m2=explode("!",$v); echo "$m2[0]"; } echo "Nota: Deve escolher o mirror mais próximo da sua localização, para acelerar o dowload. No caso de um mirror estar indisponível, utilize outro."; } } @MYSQL_CLOSE(); ?> --- End Message --- --- Begin Message --- can someone give me a bit of help / walthrough the following for me ! this first bits is okay $mysql query1 result array[cityid][cityname] mysql query2 result array[cityid][cityname] now what i want to do is kick out any doubles in my array and resort them alphebetically by cityname ?! help ! --- End Message --- --- Begin Message --- John, et al -- ...and then John Fishworld said... % % can someone give me a bit of help / walthrough the following for me ! Let's see if I can help. % this first bits is okay % $mysql query1 % result % array[cityid][cityname] % % mysql query2 % result % array[cityid][cityname] Are CityIDs unique, like US-GA-ATL and CN-QC-MON or 214365 and 214387, or is duplication possible? If the IDs are unique then adding duplicates won't cause duplicate entries. % % now what i want to do is kick out any doubles in my array and resort them % alphebetically by cityname ?! Check out array_merge and array_multisort to put the two together and sort on the second key, respectively. % % % help ! HTH & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg91679/pgp0.pgp Description: PGP signature --- End Message --- --- Begin Message --- Hi, all -- If I have an array like $a1 = array ( 'a' => 'aaa' , 'b' => 'bbb' , 'c' => 'ccc' ) ; and I want to completely remove 'b' from it (not just set $a1[b] to ""), how do I undefine that element? TIA & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg91679/pgp1.pgp Description: PGP signature --- End Message --- --- Begin Message --- Hi, Sunday, January 5, 2003, 9:46:05 PM, you wrote: DTG> Hi, all -- DTG> If I have an array like DTG> $a1 = array ( 'a' => 'aaa' , 'b' => 'bbb' , 'c' => 'ccc' ) ; DTG> and I want to completely remove 'b' from it (not just set $a1[
php-general Digest 6 Jan 2003 10:05:07 -0000 Issue 1806
php-general Digest 6 Jan 2003 10:05:07 - Issue 1806 Topics (messages 130337 through 130374): Advanced PHP Debugger 130337 by: Fredrik Johansson Re: security in guest book and user forums 130338 by: Justin French Re: PHP and MySQL bug 130339 by: David Freeman Good Linux Admin Mail List 130340 by: Michael J. Pawlowsky Unexpected $end error? 130341 by: Vincent Bouret 130342 by: Tom Rogers 130343 by: Rick Emery 130345 by: Michael J. Pawlowsky How to get the mail sending stuff to work on Win2k? 130344 by: Rad Craig 130347 by: Andrew Brampton 130349 by: Rad Craig 130350 by: Rad Craig 130351 by: Manuel Lemos Re: array help please 130346 by: David Freeman Pass Variables 130348 by: Stephen 130352 by: Stephen 130359 by: Greg Beaver Re: locally enabling register_globals? 130353 by: Daevid Vincent Passing Query_String or variables through multiple pages? 130354 by: Noel Wade 130355 by: Justin French Web Based PHP CVS 130356 by: Michael J. Pawlowsky 130357 by: Sterling Hughes Re: undocumented OOP feature/bug? 130358 by: Greg Beaver Zend IDE vs. PhpEd 130360 by: John Wells 130362 by: Sterling Hughes 130363 by: John Wells 130372 by: Mirek Novak 130373 by: Timothy Hitchens \(HiTCHO\) Combine sockets and Header() 130361 by: Bobby Patel Re: system() 130364 by: Jason Wong printer_open 130365 by: Kathy 130366 by: Leif K-Brooks 130367 by: Jason Wong emulate full post wth redirect 130368 by: Bobby Patel emulate Post with redirect 130369 by: Bobby Patel 130370 by: Jason Wong changing uid/gid 130371 by: Pupeno email a web page 130374 by: DC 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 --- Hi, If someone out there has an .dll file for the Advanced PHP Debugger (APD) extension to run i Windows 2000 (PHP version 4.2.2) I would be glad if you could send it to me. I have tried to compile one myself but has failed each and every time :( Regards, Fredrik Johansson --- End Message --- --- Begin Message --- on 05/01/03 11:54 PM, Jurre Thiel ([EMAIL PROTECTED]) wrote: > The bad side of this that all other HTML tags than and will be > removed. So add some more tags!! Gz! Which would you prefer? Pretty colours and bold text, or a page full of unclosed tags, evil javascripts, and other harmfull markup? Let me know where your message board / guestbook's are on the web, and i'll wrap a tag around my whole post... as soon as someone mouses over my guestbook post, the window will close down :) Justin French --- End Message --- --- Begin Message --- > @MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'"); // this > query doesn't work Personally, I'd call it bad programming practice to do a database update and not check to see if it worked or not. In this case, how are you determining that the query did not work? Are you manually checking the database? You don't have anything in your code to check the status of this query. Perhaps this might get you somewhere: $qid = @mysql_query("UPDATE d SET h = '$h' WHERE id = '$id'"); if (isset($qid) && mysql_affected_rows() == 1) { echo "query executed"; } else { echo "query failed: " . mysql_error(); } At least this way you might get some indication of where the problem is. CYA, Dave --- End Message --- --- Begin Message --- Perhaps a weird place to ask.. but, anyone have a really good (advanced without to many newbie questions) Linux System Administrators Mail List? Thanks, Mike --- End Message --- --- Begin Message --- Can someone tell me why I keep getting that error: Parse error: parse error, unexpected $end in D:\Program Files\Apache Group\Apache2\htdocs\proxy\acc_new.php on line 62 line 62 refers to Thanks for your help Vincent Here is the content of acc_new.php Account Management Tools - Add a new account Accounts Management Tools Add a new account Username: Password: Must contain between 4 and 20 characters. Firstname: Lastname: Email address: Usergroup: Back to Account Management Tools and here is the content of auth.php and mysql.php --- End Message --- --- Begin Message --- Hi, Monday, January 6, 2003, 8:56:58 AM, you wrote: VB> Can someone tell me why I keep getting that error: VB> Parse error: parse error, unexpected $end in
php-general Digest 7 Jan 2003 10:38:05 -0000 Issue 1808
php-general Digest 7 Jan 2003 10:38:05 - Issue 1808 Topics (messages 130503 through 130551): Re: mail() not working on Win2k 130503 by: Manuel Lemos 130507 by: Rad Craig 130513 by: Manuel Lemos Directory Listing with php on unix boxes 130504 by: Joe Jeffcoat 130508 by: Joe Jeffcoat re> Save Image? 130505 by: greg R Re: MySQL vs PostgreSQL 130506 by: Jeffrey B. Ferland Empty messages from PHP General... 130509 by: Richard Baskett Parse source for braces 130510 by: Shawn McKenzie 130522 by: Greg Beaver Re: time stamp screwing up 130511 by: Justin French Re: Defaults in drop down list... 130512 by: Justin French 130514 by: Rick Widmer PHP sendmail configuration 130515 by: Richard Baskett 130521 by: Peter Houchin 130545 by: Petre Agenbag Double entry into MySQL.. 130516 by: Altug Sahin m SELECT 130517 by: Bruce Levick 130520 by: Steve Edberg 130523 by: Jason k Larson 130524 by: Bruce Levick Re: Dreaded Return-Path and mail() 130518 by: David T-G 130519 by: Timothy Hitchens \(HiTCHO\) 130547 by: Petre Agenbag 130548 by: Timothy Hitchens \(HiTCHO\) Using VS.NET for PHP Projects 130525 by: Sean Malloy MySQL field to maintain formatting 130526 by: Vernon 130527 by: Jason Sheets Access page via user & password 130528 by: Ezequiel Sapoznik 130529 by: Peter Houchin populate a list menu 130530 by: Bruce Levick 130531 by: Jean-Christian Imbeault 130532 by: Justin French 130533 by: Bruce Levick 130534 by: Jean-Christian Imbeault 130537 by: Justin French Using VS.NET for PHP Projects - Revisit 130535 by: Sean Malloy Text editors 130536 by: Karl James ftp and www 130538 by: Mukta Telang 130539 by: Jason k Larson Re: progress page 130540 by: Nuno Lopes XHTML Validator Problem 130541 by: Michael Egan PHP Editors 130542 by: Nilza Lafayette 130549 by: Neil Freeman 130551 by: Khalid El-Kary InStallation Error Of ZendStudio on win98 130543 by: Steven Seijmonsbergen 130544 by: Timothy Hitchens \(HiTCHO\) Re: PHP and MySQL bug 130546 by: Nuno Lopes Re: Creating an extra library 130550 by: Tom Vandeplas 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 --- Hello, On 01/06/2003 01:21 PM, Rad Craig wrote: I'm running under Win2k, new install of PHP(last week), I have been trying to test the mail() function, but it doesn't seem to work. I host my own mail server on the same machine and I know it works, has been for months, all other mail come/goes just fine. I don't have the default SMTP server for IIS installed since I have my own SMTP/POP3 mail server on this same server. I have tried it with the following: mail("[EMAIL PROTECTED]", "test message", "this is a test"); I have SMTP authentication turned off on my mail server for this testing. It never arrives, I never get an error. I can telnet to port 25, all works fine. phpinfo.php reports that everything looks good, only thing i saw was that the extension directory shows c:\php4 instead of c:\php. I don't have any extra .dll's or anything turned on since it has built-in support for MySQL. Have you tried this alternative as I suggested in this other message to you? Many people solved their problem with it, so can you. http://news.php.net/article.php?group=php.general&article=130351 -- Regards, Manuel Lemos --- End Message --- --- Begin Message --- I can't use that as the program that I need for the email to work with, I don't have access to it's mail() function...yet. Rad... > -Original Message- > From: Manuel Lemos [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 06, 2003 4:28 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: mail() not working on Win2k > > > Hello, > > On 01/06/2003 01:21 PM, Rad Craig wrote: > > I'm running under Win2k, new install of PHP(last week), I have > been trying > > to test the mail() function, but it doesn't seem to work. I host my own > > mail server on the same machine and I know it works, has been > for months, > > all other mail come/goes just fine. I don't have the default > SMTP server > > for IIS installed since I have my own SMTP/POP3 mail server on this same > > server. > > > > I have tried it with the following: > > mail("[EMAIL PROTECTED]", "test mess
php-general Digest 9 Jan 2003 23:44:09 -0000 Issue 1813
php-general Digest 9 Jan 2003 23:44:09 - 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[''] 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:
php-general Digest 11 Jan 2003 12:20:39 -0000 Issue 1816
php-general Digest 11 Jan 2003 12:20:39 - Issue 1816 Topics (messages 131210 through 131239): Re: Make fil downloadable 131210 by: Timothy Hitchens \(HiTCHO\) 131211 by: Stephen 131213 by: Timothy Hitchens \(HiTCHO\) 131214 by: Stephen 131217 by: Timothy Hitchens \(HiTCHO\) 131218 by: Stephen 131219 by: Stephen php with mime magic? 131212 by: Rob Brandt Re: session_destroy problem 131215 by: Tamás Árpád 131232 by: Larry Brown 131239 by: Tamás Árpád Re: Source Guardian 131216 by: UberGoober 131224 by: michael kimsal 131226 by: Sean Malloy 131227 by: michael kimsal Suggestions on FAQ application? 131220 by: Jeff Lewis 131221 by: Timothy Hitchens \(HiTCHO\) 131222 by: Jeff Lewis 131223 by: Sean Malloy 131225 by: michael kimsal Re: Medium to Large PHP Application Design 131228 by: Manuel Lemos Re: how to passing two dimension array 131229 by: Rizki Salamun Re: Encrypt in Javascript and Decrypt in PHP 131230 by: Gerald Timothy Quimpo Binary data confusion 131231 by: Clay Loveless 131233 by: Clay Loveless Session vars vs. POST/GET vars? 131234 by: Noel Wade 131235 by: Noel Wade 131236 by: Jason k Larson Using $vars from include()d functions in the main programm and other functions 131237 by: ben9000 version confusion - please help 131238 by: Christian Stalberg Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- You need to send headers to tell the browser how to handle it see: header(); or.. if it is a php file and you want the visitor to see/download the source you would be better off giving it another extension eg .phps or .txt etc or have a handler file that did a readfile after sending headers. Timothy Hitchens (HiTCHO) Open Platform Consulting e-mail: [EMAIL PROTECTED] -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Saturday, 11 January 2003 10:17 AM To: PHP List Subject: [PHP] Make fil downloadable I need to somehow make it so when a user clicks a link, then get displayed the download dialogue for the file. The file is a .php file so I'm not sure how this is done but I've seen it been done before. How can you do this? Thanks, Stephen Craton http://www.melchior.us "What's the point in appearance if your true love, doesn't care about it?" -- http://www.melchior.us --- End Message --- --- Begin Message --- It's a dynamically created file the user downloads and uses later as a PHP script. If I put header() in it, that would make it downloadable again when the user uses it on his/her server, wouldn't it? - Original Message - From: "Timothy Hitchens (HiTCHO)" <[EMAIL PROTECTED]> To: "'Stephen'" <[EMAIL PROTECTED]>; "'PHP List'" <[EMAIL PROTECTED]> Sent: Friday, January 10, 2003 7:24 PM Subject: RE: [PHP] Make fil downloadable : You need to send headers to tell the browser how to handle it see: : header(); or.. if it is a php file and you want the visitor to : see/download the source you would be better off giving it another : extension eg .phps or .txt etc or have a handler file that did a : readfile after sending headers. : : : Timothy Hitchens (HiTCHO) : Open Platform Consulting : e-mail: [EMAIL PROTECTED] : : : -Original Message- : From: Stephen [mailto:[EMAIL PROTECTED]] : Sent: Saturday, 11 January 2003 10:17 AM : To: PHP List : Subject: [PHP] Make fil downloadable : : : I need to somehow make it so when a user clicks a link, then get : displayed the download dialogue for the file. The file is a .php file so : I'm not sure how this is done but I've seen it been done before. How can : you do this? : : Thanks, : Stephen Craton : http://www.melchior.us : : "What's the point in appearance if your true love, doesn't care about : it?" -- 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 --- eg: Download File Click Here Now in the file.php you have: This won't put the headers into the downloaded file and remember to change the xxx.php into the file to be delivered and the xxx.php in the header to the name you would like them to save as. * the file.php in the top is not the real file but a script that reads into the buffer the real file!! Timothy Hitchens (HiTCHO) Open Platform Consulting e-mail: [EMAIL PROTECTED] > -Original Message- > From: Stephen [mailto:[EM
php-general Digest 12 Jan 2003 00:36:55 -0000 Issue 1817
php-general Digest 12 Jan 2003 00:36:55 - Issue 1817 Topics (messages 131240 through 131286): Change Date 131240 by: Naqashzade, Sadeq 131242 by: Thomas Seifert 131243 by: Naqashzade, Sadeq 131249 by: Thomas Seifert 131272 by: Jason Wong Re: Using $vars from include()d functions in the main programm and other functions 131241 by: Thomas Seifert count characters without space 131244 by: harald.mohring.gmx.de 131246 by: Gerald Timothy Quimpo 131256 by: Jeffrey B. Ferland Make thumbnail online 131245 by: Naqashzade, Sadeq 131250 by: Thomas Seifert 131283 by: Hugh Danaher Date Comparison 131247 by: Dhaval Desai 131248 by: Matt 131273 by: Jason Wong COM object 131251 by: jlord2002.libero.it 131252 by: Marco Tabini How I can get one line from a file? 131253 by: Joskey Liaus 131254 by: Marco Tabini 131258 by: Gerald Timothy Quimpo Re: Suggestions on FAQ application? 131255 by: Jeffrey B. Ferland 131259 by: John Nichel 131262 by: Jeff Lewis 131263 by: Jeff Lewis 131285 by: The Head Sage Problem with Search Engine Friendly URLs under PHP & Windows XP 131257 by: Jonathan Chum 131261 by: Gerard Samuel 131267 by: Jonathan Chum Re: Template tutorials? 131260 by: David Eisenhart XML Cleanup Regex 131264 by: Gerard Samuel Re: Is this possible with php? 131265 by: Rasmus Lerdorf 131268 by: Chris Hewitt 131269 by: Chris Hewitt Sorting arrays 131266 by: Chris Kay Free web-hosting 131270 by: Anton Gladky php5 cvs 131271 by: electroteque 131286 by: Danny Shepherd Re: Session vars vs. POST/GET vars? 131274 by: Jason Wong 131276 by: Jason Wong global to superglobal 131275 by: pippo.bellnet.ca 131278 by: Jason Wong 131282 by: pippo.bellnet.ca Re: version confusion - please help 131277 by: Jason Wong Re: Loading Information into an array. 131279 by: Jason Wong rintones using php 131280 by: Arvindv 131281 by: Arvindv fopen with nasty pathnames 131284 by: Mat Harris 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 --- Hi, How can I find time stamp for example 125 next days. or 03:30 hours next? Regards, S. Naqashzade PS: Sorry for my bad english :-( --- End Message --- --- Begin Message --- http://de.php.net/manual/en/function.mktime.php The most important part is "mktime() is useful for doing date arithmetic and validation, as it will automatically calculate the correct value for out-of-range input." Thomas On Sun, 11 Jan 2004 16:12:01 +0330 [EMAIL PROTECTED] (Sadeq Naqashzade) wrote: > Hi, > How can I find time stamp for example 125 next days. or 03:30 hours next? > > Regards, > S. Naqashzade > PS: Sorry for my bad english :-( > > --- End Message --- --- Begin Message --- So Thanks, but can you get me some example code? Regards, Sadeq "Thomas Seifert" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > http://de.php.net/manual/en/function.mktime.php > > The most important part is > "mktime() is useful for doing date arithmetic and validation, as it will automatically calculate the correct value for out-of-range input." > > > > Thomas > > On Sun, 11 Jan 2004 16:12:01 +0330 [EMAIL PROTECTED] (Sadeq Naqashzade) wrote: > > > Hi, > > How can I find time stamp for example 125 next days. or 03:30 hours next? > > > > Regards, > > S. Naqashzade > > PS: Sorry for my bad english :-( > > > > --- End Message --- --- Begin Message --- i.e. // getting the current time in an array $timeval=localtime(); // we want the time 3 hours in the future $timeval[2] = $timeval[2]+3; // calc the new timestamp $timestamp=mktime ($timeval[2], $timeval[1], $timeval[0], $timeval[4], $timeval[3], i$timeval[5]); An even better solution, you are talking about a unix-timestamp, right? just add or subtract the the seconds from the current timestamp, i.e. // get the current timestamp $timestamp=time(); // 1 minute = 60 seconds, 1 hour = 60 minutes, therefore 1 hour = 60*60 = 3600 seconds // so we add 3600*3 to have the time in 3 hours $timestamp = $timestamp + (3600*3); // you can convert this time back to a readable format using strftime Regards, Thomas On Sun, 11 Jan 2004 16:22:08 +0330 [EMAIL PROTECTED] (Sadeq Naqashzade) wrote: > > So Thanks, but can you get
php-general Digest 12 Jan 2003 12:39:48 -0000 Issue 1818
php-general Digest 12 Jan 2003 12:39:48 - Issue 1818 Topics (messages 131287 through 131328): Simple Form Processing 131287 by: Kyle Babich 131299 by: Justin French 131328 by: Kyle Babich Some help on PHP & HTML please 131288 by: Denis L. Menezes 131289 by: Daniel Kushner Sorry, PHP & HTML 131290 by: Denis L. Menezes 131294 by: Timothy Hitchens \(HiTCHO\) 131298 by: Larry Brown Permission Denied 131291 by: Stephen 131295 by: Stephen 131300 by: jacob.keystreams.com 131321 by: Jason Wong Re: php5 cvs 131292 by: electroteque 131315 by: electroteque 131317 by: Sean Malloy 131323 by: electroteque 131325 by: Zeev Suraski 131327 by: electroteque Re: global to superglobal 131293 by: Greg Beaver Re: fopen with nasty pathnames 131296 by: Gerald Timothy Quimpo 131324 by: Mat Harris displaying in the table problem 131297 by: Denis L. Menezes Re: rintones using php 131301 by: Justin French Uploading images to a particular folder in the server 131302 by: Denis L. Menezes 131303 by: Rick Emery 131320 by: Jason Wong Changing permissions with mkdir? 131304 by: Ben Cheng 131310 by: Timothy Hitchens \(HiTCHO\) 131319 by: Jason Wong Format tables!! 131305 by: Karl James 131309 by: Justin French Amount of data in the database 131306 by: Denis L. Menezes 131307 by: Timothy Hitchens \(HiTCHO\) 131311 by: Denis L. Menezes 131312 by: Timothy Hitchens \(HiTCHO\) OOP for Web Programming Paradigm 131308 by: Victor Re: version confusion - please help 131313 by: Jesse Cablek Re: php-general Digest 27 Mar 2002 13:15:24 - Issue 1251 131314 by: DCnFamily.aol.com test 131316 by: Karl James 131318 by: Philip J. Newman highlight keywords issue 131322 by: Hatem Ben strip php tags from code ? 131326 by: David D 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 just broke skin with php and I'm learning forms, which I'm not good with at all. These are snippets from post.html: and but how would I pass the actual image on because when I do something like this: as you could probably guess only the filename prints. So how do I take the image instead of just the filename? Thank you, -- Kyle --- End Message --- --- Begin Message --- Hi, the files themselves are available in the $_FILES array, but it's not as simple as that. may i recommend you start by copying the Examples 18-1 and 18-2 from this page: http://www.php.net/manual/en/features.file-upload.php Once you've got THAT code working smoothly and understand what's happening, THEN start modifying it to a 3-file form. I'd personally push forms through using POST method rather than get whenever possible -- especially when dealing with files... the manual does it this way too :) Justin on 12/01/03 12:18 PM, Kyle Babich ([EMAIL PROTECTED]) wrote: > I just broke skin with php and I'm learning forms, which I'm not good > with at all. These are snippets from post.html: > > > and > > > > > but how would I pass the actual image on because when I do something like > this: > ?> > as you could probably guess only the filename prints. > > So how do I take the image instead of just the filename? > > Thank you, > -- > Kyle --- End Message --- --- Begin Message --- This is what I tried: if (is_uploaded_file($HTTP_POST_FILES['image1']['image1']) { move_uploaded_file($HTTP_POST_FILES['image1']['image1'], "$DOCUMENT_ROOT/images/$file"); } and also this: if (is_uploaded_file($_FILES['image1']['image1']) { move_uploaded_file($_FILES['image1']['image1'], "$DOCUMENT_ROOT/images/$file"); } and this: if (is_uploaded_file($_FILES['image1']['image1'])) { copy($_FILES['image1']['image1'], "$DOCUMENT_ROOT/images"); } ,the image (which was within the size range) was never uploaded. I have a feeling that I am makeing 1 or 2 of the same mistakes in all three but through my experimenting and reading I am having no luck. I also bought Programming PHP but I trust it less and less as I even find simple mistakes like missing quotes in example code. So what's going wrong? Thank you again, Kyle On Sun, 12 Jan 2003 15:17:42 +1100, "Justin French" <[EMAIL PROTECTED]> said: > Hi, > &g