[PHP] Does the URL influence if the page/data gets cached?

2003-08-24 Thread Richard Davey
Hi all, We've recently released a significantly sized new web site coded entirely in PHP. One of the things done on the site is to link to various sections of it as follows: http://www.domain.com/?m=orders http://www.domain.com/?f=index As you can see we're neglecting to include the index.php in

[PHP] preg_replace pains

2002-06-27 Thread Richard Davey
Hi all, I've been having a wonderful night trying to solve this one, but I'm going to throw in the towel and see if anyone else can shed some light on it. The scenerio is quite simple, I'm parsing some form input from a user and looking for the following: [details]...[/details] where the ..

Re: [PHP] preg_replace pains

2002-06-27 Thread Richard Davey
"John Holmes" <[EMAIL PROTECTED]> wrote in message 000a01c21e45$92b64270$b402a8c0@mango">news:000a01c21e45$92b64270$b402a8c0@mango... > Wouldn't you want to use preg_match() before you replace it? In this instance, no I don't think so. I've already performed the task I needed with the tags in que

[PHP] Friendly dates

2003-12-01 Thread Richard Davey
Hi, I'm just wondering if anyone knows of a class/function (or easy way) to do the following: At the moment I display dates like this: Last message received: 30th Nov 2003 16:07 This is fine, but I would like to make them more friendly like so: Last message received: Yesterday, 16:07 I would

Re[2]: [PHP] header("Location: page.php") not redirecting

2003-12-01 Thread Richard Davey
Hello rogue, Monday, December 1, 2003, 10:39:02 PM, you wrote: r> echo looks fine (no error in the URL). I am stumped. Is there anything r> besides output to the screen before header() that breaks it? Other than browser incompatibility, not usually. You can use the following to determine if a h

Re: [PHP] Refreshing in forms using post

2003-12-01 Thread Richard Davey
Hello Matt, Monday, December 1, 2003, 10:31:23 PM, you wrote: MG> Suppose I have a form. Upon submission, the metadata is posted to a MG> processing script (a separate PHP file), which parses it and then sends the MG> user back to a particular page using the header function. If said user MG> cl

Re: [PHP] Working as a PHP/database developer..

2003-12-01 Thread Richard Davey
Hello Video, Tuesday, December 2, 2003, 1:04:34 AM, you wrote: VPeO> Now, how do you charge your services? Do you do it on a VPeO> time-slot basis (seems kind of awkard to me since much PHP code VPeO> can be reused a l o t!) or do you do it on the basis of the size VPeO> of projects and whether n

Re: [PHP] Picture Width and Height in $_FILES

2003-12-01 Thread Richard Davey
Hello Dimitri, Tuesday, December 2, 2003, 2:40:27 AM, you wrote: DM> I've seen the code somewhere but can't remember what it is exactly. DM> Basically I need to know what the PHP is to get the picture width and DM> height. Use getimagesize() on the uploaded file. See PHP manual for details. --

Re: [PHP] Upload issue - The 2MB barrier...

2003-12-02 Thread Richard Davey
Hello Kim, Tuesday, December 2, 2003, 12:34:22 PM, you wrote: KS> As the default setting for file upload is set to 2MB, we usually get KS> a problem since we cant always access the php.ini on every server KS> our scripts should be run from. Can you modify the httpd.conf for your site? If so you

Re: [PHP] replace %rand[x]-[y]% macro in string with random string

2003-12-02 Thread Richard Davey
Hello Daniel, Tuesday, December 2, 2003, 10:46:33 PM, you wrote: dh> For generation of a random string with length 1.000.000 it takes about dh> 13 seconds on my xp 1600+.. that's quite a lot, imho, so suggestions dh> are very welcome.. Just so we're clear on this - you're creating a string (an e

Re: [PHP] " " in a Variable

2003-12-02 Thread Richard Davey
Hello Dimitri, Wednesday, December 3, 2003, 3:28:19 AM, you wrote: DM> I'm sure this is an easy fix, but how do you either prevent users from being DM> able to input " " in a field or make it so that it doesn't affect the code? Assuming you mean the double quote marks, and not a blank space, use

Re: [PHP] refresh data

2003-12-02 Thread Richard Davey
Hello BigMark, Wednesday, December 3, 2003, 6:04:03 AM, you wrote: B> At the moment this code accepts changes and deletes from the Db but when the B> submit button is pressed it echos- 'Record updated/edited' and i B> have to go back and refresh to view the updated list, how can i jus

Re: [PHP] Re: refresh data

2003-12-03 Thread Richard Davey
Hello BigMark, Wednesday, December 3, 2003, 6:29:41 AM, you wrote: B> Nope that didnt work! You need to remove the fact the list is inside the check for the $submit value too. Same sentiment as before. -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP Gener

Re: [PHP] function problems...

2003-12-03 Thread Richard Davey
Hello Jas, Wednesday, December 3, 2003, 6:15:20 PM, you wrote: J> I call this function it checks a session variable then displays 1 of 3 J> menus... for some reason it will only display the first menu regardless J> of the results of my decoded session var. Any help or just a new pair J> of eyes

Re: [PHP] File - Success Warning Message

2003-12-04 Thread Richard Davey
Hello [-^-!-%-, Thursday, December 4, 2003, 9:54:31 AM, you wrote: > $_html = implode('',file('http://myaddress.com')); Sorry, just noticed you're bringing it back via file which (should) convert it to an array. In which case the bad argument would be the lack of a delimeter (the first value). T

Re: [PHP] File - Success Warning Message

2003-12-04 Thread Richard Davey
Hello [-^-!-%-, Thursday, December 4, 2003, 9:54:31 AM, you wrote: > $_html = implode('',file('http://myaddress.com')); > Warning: Bad arguments to implode() in > $_html is empty, even though the remote page exist and is working > properly. implode creates a string from an array. Your web page

Re[2]: [PHP] related products, how to's best practices

2003-12-04 Thread Richard Davey
Hello Jon, Thursday, December 4, 2003, 12:59:17 PM, you wrote: JB> They are in groups (type, category) but the problem is the way their JB> products relate doesn't correspond to their type (book, video etc) or JB> their category (like Classic Books, Rewarding Social Skills etc) and JB> some produ

Re: [PHP] related products, how to's best practices

2003-12-04 Thread Richard Davey
Hello Jon, Thursday, December 4, 2003, 12:42:28 PM, you wrote: JB> I don't think getting the info into the db will be a problem, what I JB> see as a problem is how an admin will select 3 out of 200+ products. JB> Obviously a drop down is a bad idea, but so would a alphabetical list. JB> has anyon

Re[2]: [PHP] related products, how to's best practices

2003-12-04 Thread Richard Davey
Hello Jon, Thursday, December 4, 2003, 1:08:36 PM, you wrote: JB> Why should I not use drop downs ?? are they generally out of favour now JB> ?? why ??? Not at all. JB> I ask because I was thinking of having each categories products listed JB> in a drop down ! You said there were over 200 of t

Re[2]: [PHP] related products, how to's best practices

2003-12-04 Thread Richard Davey
Hello Jon, Thursday, December 4, 2003, 3:43:53 PM, you wrote: JB> Would I be right in thinking that php alone can't change the content of JB> a dropdown once the browser has loaded the file without a page refresh Right. JB> ??? In which case I need to source out some javascript, anyone got JB>

Re[2]: [PHP] International Addresses and Telephones

2003-12-04 Thread Richard Davey
SM> I can tell you for France : SM> zip code : 5 digits (may begin by '0') SM> state : not relevant SM> phone number : 10 digits or +33 and 9 digits For the UK you'll need (on average!) 8 characters for the postal (zip) code and it must allow letters and a space: BS15 7HL for example. Some postcod

Re: [PHP] DB / Tables Question

2003-12-04 Thread Richard Davey
Hello Pushpinder, Thursday, December 4, 2003, 4:38:13 PM, you wrote: PSG> I want to be able to create a similar CRM package for other clients. My PSG> question is should I create a separate DB for each client. PSG> or is it a better design practice to create 2 tables (Admin and PSG> Contacts) p

Re: [PHP] PHP, MySQL and datetime

2003-12-04 Thread Richard Davey
Hello Jough, Thursday, December 4, 2003, 6:39:13 PM, you wrote: JJ> Greetings all, I'm working on a message-board-type JJ> application that will use time stamps to sort part of the JJ> messages. I was wondering what everyone's favorite way to JJ> transfer dates between PHP and MySQL was? Seeing

[PHP] hmm.. anyone else get a "friendly" message from Kenneth Uzzi?!

2003-12-04 Thread Richard Davey
Hmm.. I swear I get more spam and crap-mail thanks to posting to this list than from anywhere else! Did anyone else get a wonderfully abusive message from one bonehead "kenneth uzzi <[EMAIL PROTECTED]>"? as a result of posting here? -- Best regards, Richard mailto:[EMAIL

Re[2]: [PHP] What do you say to someone who says...

2003-12-04 Thread Richard Davey
Thursday, December 4, 2003, 8:21:44 PM, you wrote: CJWH> Please tell me in what world is 6 figures considered cheap?? A Japanese one? :) Although mind you, that's still not exactly "cheap" being at least just over $9200. -- Best regards, Richardmailto:[EMAIL PROTEC

Re: [PHP] how to determine if shopping cart has been abandoned?

2003-12-04 Thread Richard Davey
Hello Chris, Thursday, December 4, 2003, 9:09:57 PM, you wrote: CWP> The problem I see is that a cart could be considered abandoned for 4 CWP> days but then become active again because the customer has come back to CWP> it and has added more products to it. In this case I'd say it was never CWP>

Re: [PHP] What is PHP equivalent to JavaScript's charAt()....

2003-12-04 Thread Richard Davey
Hello Scott, Thursday, December 4, 2003, 10:49:05 PM, you wrote: SF> The function in JavaScript which is charAt(), I am wondering what would SF> be this same function in PHP? I couldn't find it so it is in a different SF> function name I don't know about. Wild guess (no knowing 100% what ch

Re: [PHP] PHP Web Services

2003-12-04 Thread Richard Davey
Hello Jamie, Thursday, December 4, 2003, 10:45:17 PM, you wrote: JA> I am wondering if it is possible to create web services using php? If so, JA> where would I go to find some resources about it? This one isn't bad: http://www.nusphere.com/products/library/webservices_whitep_012502.pdf -- Be

Re: [PHP] Check type of uploaded file

2003-12-06 Thread Richard Davey
Hello Bob, Sunday, December 7, 2003, 1:00:44 AM, you wrote: BH> I want to test an uploaded file to see if it is a text file, but I don't want BH> to rely on the presence of an os command such as 'file.' Is there a BH> straightforward way to do this within PHP? Thanks in advance. Yes, check the

Re: [PHP] for statement weirdness, no echo

2003-12-09 Thread Richard Davey
Hello Jay, Tuesday, December 9, 2003, 1:31:35 PM, you wrote: JB> for($i = 2; $i < 0144; $i++){ JB> echo $i . "\n"; JB> } JB> does not echo anything. Even put the numbers in quotes (single and JB> double). What has being brain-dead caused me to miss this morning? Look at your val

Re: [PHP] Operator question

2003-12-09 Thread Richard Davey
Hello Jeff, Tuesday, December 9, 2003, 4:11:10 PM, you wrote: JM> In PHP, what does the operator "-=" do? I can't find a ref to it's JM> function in the online manual or any books I have. Set's a negative value: $a = 10; $b -= $a; or $b -= 10; In both cases $b will equal -10. -- Best rega

Re: [PHP] Images in MySQL vs directory/file?

2003-12-10 Thread Richard Davey
Hello Derrick, Wednesday, December 10, 2003, 3:56:32 PM, you wrote: DF> 1. The only way I can store the files in a directory on the server is DF> to make that directory "wide open" as in chmod 777. I don't have quite DF> enough control of the server to make that a better situation. Why is this?

Re: [PHP] header, also stumped

2003-12-10 Thread Richard Davey
Hello Bart, Wednesday, December 10, 2003, 3:34:31 PM, you wrote: B> I've got the following header-problems. How can I get this to work: B> header("Location: h--p://user:[EMAIL PROTECTED]/securedir/"); B> I have a directory with password-protection to wich I want to redirect B> without the login-

Re: [PHP] Undefined variable using hyperlink

2003-12-10 Thread Richard Davey
Hello, Wednesday, December 10, 2003, 4:53:18 PM, you wrote: P> I can retrieve email from the email account, but when I click on a link in P> the email.php to open the email in body.php, $msgid is not defined in P> body.php. It's got to be something basic, but right now, it escapes me. P> Right n

Re: [PHP] HTML Form with method="POST" and enctype="multipart/form-data" is not working for passing data to the web server.

2003-12-10 Thread Richard Davey
Hello prashant, Wednesday, December 10, 2003, 5:20:18 PM, you wrote: p> p> p> p> p> You should have set the max_file_size here, but it's not included. This must come BEFORE the input type=file and remember the value is in bytes (not KB), so the above will only let you upload a file of ap

Re[2]: [PHP] Undefined variable using hyperlink

2003-12-10 Thread Richard Davey
Hello, Wednesday, December 10, 2003, 5:45:17 PM, you wrote: >> $msgid = $_GET['msgid']; P> That seems to have corrected the problem. Thank you very much. Cool - do you understand why though? I don't mean to sound patronising, so please don't take offence at my question, just making sure. --

Re[2]: [PHP] ARRAY

2003-12-10 Thread Richard Davey
Hi, Wednesday, December 10, 2003, 6:29:43 PM, you wrote: RM> Because it's and array! print and echo take strings, not RM> arrays, I believe. Anyway, print_r() or a foreach loop will do it RM> for you. Agreed.. print_r() is the best, but if you're outputting all of this text into the browser (w

Re[2]: [PHP] HTML Form with method="POST" and enctype="multipart/form-data" is not working for passing data to the web server.

2003-12-10 Thread Richard Davey
Hello Jason, Thursday, December 11, 2003, 12:29:07 AM, you wrote: >> You should have set the max_file_size here, but it's not included. JW> Why? (see archives). Because it's good practise, not to mention sensible? -- Best regards, Richardmailto:[EMAIL PROTECTED]

Re[4]: [PHP] HTML Form with method="POST" and enctype="multipart/form-data" is not working for passing data to the web server.

2003-12-10 Thread Richard Davey
Hello Jason, Thursday, December 11, 2003, 12:52:55 AM, you wrote: JW> Possibly, if and when it is supported by most browsers. IE and Mozilla recognise and support it, where are these other "most browsers" ? It might be an advisory, but it's still good practise. JW> But in the context of the OP'

Re: [PHP] What is a XSS attacks?

2003-12-12 Thread Richard Davey
Hello orlandopozo, Saturday, December 13, 2003, 12:04:02 AM, you wrote: oicv> What is a XSS attacks? Cross Site Scripting Attack I think. Like when people insert malicious HTML/JS code into your site as a result of your code not checking inputs properly. -- Best regards, Richard

Re: [PHP] PHP IDE?

2003-12-13 Thread Richard Davey
Hello Jough, Saturday, December 13, 2003, 5:06:56 PM, you wrote: JJ> Was wondering what everyone's favortie IDE is for JJ> coding in PHP. I've got a big PHP project in the JJ> works. I'll be doing alot with it and am looking for JJ> ways to boost my productivity. I use NuSphere's phpED - it wa

Re: [PHP] mysql update query

2003-12-19 Thread Richard Davey
Hello Enda, Friday, December 19, 2003, 4:32:44 PM, you wrote: E> which returns the following SQL query: E> UPDATE cdr200311 SET Price=0.225 WHERE (A_Number = 61210146 AND E> StartDateTime = 2003110216502400 AND Duration=15.0167 AND SMSDestinationName E> = '1010') E> The query executes successful

Re: [PHP] need a little help all

2003-12-28 Thread Richard Davey
Hello, Wednesday, December 17, 2003, 11:50:52 AM, you wrote: wmc> Here is what i have i call 2 cookies in the top of my script, now i need to wmc> call another when another script is called but it keeps givin me the error wmc> headers already sent, wmc> now ive seen this done in other scripts but

Re: [PHP] Still Racking My Brain

2003-12-30 Thread Richard Davey
Hello stiano, Tuesday, December 30, 2003, 3:24:04 PM, you wrote: son> Okay, I got my pathname straightened out, but I'm still showing the son> "unexpected $" message. The following works fine for me (on a Windows XP box + PHP4 + Apache) Image List

Re[3]: [PHP] Having problems with a while loop

2004-01-01 Thread Richard Davey
Hello Richard, Thursday, January 1, 2004, 5:56:35 PM, you wrote: RK> Ok I changed it to look this way but it still is not working RK> $filenum="test"; RK> $fpHt = fopen($filenum, "r"); RK> while(feof($fpHt)) { RK> $fpLine = fgets($fpHt,512); RK> $fpLine = trim($fpLine); RK> $fpData = explode(":",

Re: [PHP] example of posting board or shoutbox

2004-01-03 Thread Richard Davey
Hello Austin, Saturday, January 3, 2004, 1:29:14 AM, you wrote: A> how do i make something where some1 enters text, a name, and email A> address, etc. and can post it onto a textarea or something, in a format of http://www.hotscripts.com/cgi-bin/search.cgi?bool=AND&query=shoutbox&catid=2 -- B

Re: [PHP] Counting back 90 days...

2004-01-05 Thread Richard Davey
Hello Tristan, Monday, January 5, 2004, 11:29:16 AM, you wrote: TPrsc> But is there an easy was to calculate 90 days from the timestamp... Based on the current time: $previous_90_days_timestamp = strtotime ("-90 day"); All in one: $previous_90_days_date = date("Y-m-d", strtotime("-90 day"));

Re[2]: [PHP] Counting back 90 days...

2004-01-05 Thread Richard Davey
Hello Tristan, Monday, January 5, 2004, 11:55:36 AM, you wrote: TPrsc> My word... TPrsc> 6 odd lines, to one... TPrsc> you're a genius... TPrsc> Cheers for that... Glad to help. I too have spent ages messing with mktime and min/sec additions, etc - but strtotime() does it all for you. There are

Re[2]: [PHP] Counting back 90 days...

2004-01-05 Thread Richard Davey
Hello Paul, Monday, January 5, 2004, 2:26:16 PM, you wrote: PC> For example, strftime("%+",0) returns "Wed Dec 31 19:00:00 EST 1969" in PC> my timezone, and strftime("%+",-1) returns a blank. Yet, doing a PC> strtotime("1969-12-31 23:59:59 GMT") will get you a -1, and the date() PC> function app

Re: [PHP] Retrieve key from $_POST

2004-01-05 Thread Richard Davey
Hello Robin, Tuesday, January 6, 2004, 12:31:24 AM, you wrote: RK> Is there any way to retrieve a key value from $_POST when there is more than RK> one $_POST array entry? Do this: echo ""; print_r($_POST); echo ""; If you can see it, you can retrieve it. Otherwise, you can't. -- Best regard

Re: [PHP] [Fwd: failure notice] Why??

2004-01-05 Thread Richard Davey
Hello Rolf, Tuesday, January 6, 2004, 1:26:31 AM, you wrote: RB> Whenever I submit a message to this list, I get a bounce back saying its RB> a dupe, anyone have any ideas? I get exactly the same - it's highly annoying and happens every time. Do you use Pair Networks by any chance? (I do and po

Re: [PHP] Newbie with sorting problem

2004-01-06 Thread Richard Davey
Hello Bart, Tuesday, January 6, 2004, 12:40:38 PM, you wrote: BK> This scripts works, but.. my desire is now to be able to sort the BK> output, wich is generated by the 'while' loop, for instance on 'name', BK> or on 'surname' . sort(), ksort()? I couldn't understand the BK> explanations i found

Re: [PHP] str_replace to ignore commas

2004-01-06 Thread Richard Davey
Hello Vernon, Tuesday, January 6, 2004, 2:29:31 PM, you wrote: V> I'm trying to use str_replace to ignore sertain characters from a recordset V> field and it seems I am having difficulties with ignoring commas and V> carriage returns. I've gotten the following but when searching for, let's Nowhe

Re[2]: [PHP] str_replace to ignore commas

2004-01-06 Thread Richard Davey
Hello Vernon, Tuesday, January 6, 2004, 3:56:18 PM, you wrote: >> Nowhere in your replacement array do you check for, or remove, >> carriage returns. >> Add this \n to it: >> $replacement = array("\"", "\,", ".", "!", "?", "\n"); >> Your exploded array should now be correct. V> When I do this I

Re[2]: [PHP] [Fwd: failure notice] Why??

2004-01-06 Thread Richard Davey
Hello Chris, Tuesday, January 6, 2004, 4:13:09 PM, you wrote: CS> I think it happens for everyone, and Pair hosts a lot of the php.net CS> stuff, including handling the email, so I doubt it matters whether you use CS> Pair for SMTP. CS> I assume (I could be wrong) that they're working on the pro

Re: [PHP] How can a module find a resource in its environment.

2004-01-06 Thread Richard Davey
Hello Jost, Sunday, January 4, 2004, 3:09:41 PM, you wrote: JB> For example I have a module foo/a.php which is required by b.php via JB> require ("foo/a.php"). Unfortunately within the module a.php the cwd() JB> is not foo but the context of b.php. The easiest way to fix this would Makes sense.

Re: [PHP] counting charactors

2004-01-06 Thread Richard Davey
Hello Philip, Tuesday, January 6, 2004, 6:25:34 PM, you wrote: PJN> can someone point me to the right place for a thing that PJN> would count charactors in a string? count_chars() and strlen() -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP General Mailin

Re: [PHP] if("NANC" < 0) - always evaluates TRUE...

2004-01-06 Thread Richard Davey
Hello Ivo, Tuesday, January 6, 2004, 6:57:52 PM, you wrote: IP> ...no matter what follows the NANC...seems like a bug. IP> // output IP> err 3 IP> err 4 Not for me it doesn't. It outputs nothing (as it should). -- Best regards, Richardmailto:[EMAIL PROTECTED] --

Re[2]: [PHP] session issues for unauthorized access?

2004-01-06 Thread Richard Davey
Hello Scott, Tuesday, January 6, 2004, 7:19:55 PM, you wrote: SF> Sure the bank can prevent it or otherwise my bank would never use the SF> website in the first place. My bank doesn't use PHP, it use JAVA and SF> surprisely, it work very well. Really? How would your bank determine the differenc

[PHP] Syntax Highlighting

2004-01-06 Thread Richard Davey
Hi all, I'm after a technique/method that will allow me to syntax highlight source code on my web site. PHP already does a brilliant job of this for PHP code, but I need to extend this to ANY form of source code. Does anyone know of a way to do this (even in pseudo-code) or even better, a class/f

Re[2]: [PHP] Bizzare form problem - Please Help!

2004-01-06 Thread Richard Davey
Hello Paul, Wednesday, January 7, 2004, 1:45:20 AM, you wrote: P> Thanks. The problem exists either way! For some reason that is beyond me, P> the combination of a javascript being called and the document being parsed P> through php is the cause. Again if I simply rename to .htm then it is P> "fi

Re: [PHP] supressing include warnings....

2004-01-06 Thread Richard Davey
Hello Ryan, Wednesday, January 7, 2004, 2:17:11 AM, you wrote: RA> [EMAIL PROTECTED]("http://www.site.com/product/check.php?ver=2&update=0";);} RA> else{} RA> $test_once=1; RA> One problem, if something goes wrong instead of doing nothing its displaying RA> warningseven though I have put a

Re: [PHP] Verifying a url

2004-01-06 Thread Richard Davey
Hello Thomas, Wednesday, January 7, 2004, 2:49:48 AM, you wrote: TA> My web site has two different ways to be accessed. One is through a SSL TA> connection and the other not. TA> Does anyone know how to check either the URL that is being used (https would TA> give away the SSL) or if you can ch

Re[2]: [PHP] supressing include warnings....

2004-01-06 Thread Richard Davey
Hello Ryan, Wednesday, January 7, 2004, 3:07:16 AM, you wrote: RA> Warning: RA> fopen(http://www.site.com/a/check.php?ver=2&update=0): failed to RA> open stream: HTTP request failed! HTTP/1.1 404 Not Found in /blah/i.php on RA> line 74 For me simply using the @ sign as you did before (with inclu

Re: [PHP] Problem with Picture Name

2004-01-06 Thread Richard Davey
Hello Dimitri, Wednesday, January 7, 2004, 4:06:25 AM, you wrote: DM> I had it perfect so that when someone uploaded a picture in a form, it DM> uploaded to my server and saved the image name etc. in the database. The DM> problem is, what if someone tries saving a picture with an apostraphe ie (

Re: [PHP] i need help help with include

2004-01-07 Thread Richard Davey
Hello, Wednesday, January 7, 2004, 2:13:03 PM, you wrote: P> now i need to include my function file out of the root P> root/dir/funtionfile P> How do i do this? P> I cannot create a htacess file on this server nor set my include path. Err.. include("/root/dir/functionfile.php"); :) You cou

Re: [PHP] localhost mail

2004-01-07 Thread Richard Davey
Hello Anthony, Wednesday, January 7, 2004, 1:53:51 PM, you wrote: AR> In my php.ini file I have configured the SMTP to the name of the ISP's email AR> server. AR> However, when testing the same script out locally on Apache Server: I get AR> the form box, enter the data but I do not receive an em

Re: [PHP] Is there a way to protect PHP's $_POST, $_GET when user tamper with post string in URL toolbox???

2004-01-07 Thread Richard Davey
Hello Scott, Wednesday, January 7, 2004, 5:43:31 PM, you wrote: SF>I noticed when I use the hidden html input tag with hidden data in it SF> then when I click the submit button to submit the webpage, the hidden data SF> then show up in the URL address. Fine, no problem. But I noticed one O

Re: [PHP] Timezone and time() and date()

2004-01-07 Thread Richard Davey
Hello Manuel, Wednesday, January 7, 2004, 5:48:27 PM, you wrote: MVA> How does the timezone of the server affects the behavior of the functions MVA> time and date. Quite simply, if you don't provide date() with a timestamp then it will use the local servers timestamp instead. This will be whatev

Re: [PHP] upload picture

2004-01-07 Thread Richard Davey
Hello Matt, Wednesday, January 7, 2004, 7:26:31 PM, you wrote: MH> Well, it's a start :) The size attribute isn't any use though. MH> but don't know how to specify how to store the pictures on the server... MH> thanks! See: Chapter 18. Handling file uploads of the PHP Manual for source code e

[PHP] PHP Magazine Download version

2004-01-07 Thread Richard Davey
Hi all, Has anyone managed to download the Electronic (PDF) free first issue of the PHP Magazine? (https://www.entwickler.com/ssl/phppdf/) I have registered fine but in the email they sent me, the URL to download just doesn't work. It takes ages (30+ seconds) to connect which I think is the gener

Re: [PHP] PHP code documentation tool

2004-01-08 Thread Richard Davey
Hello Karam, Thursday, January 8, 2004, 3:41:36 PM, you wrote: KC> Is there any tool like doc-o-matic for PHP or anybody KC> developing something like that? http://www.phpdoc.de/ -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http:/

Re: [PHP] Buffalo'ed, stumped, confused...

2004-01-08 Thread Richard Davey
Hello Robin, Friday, January 9, 2004, 12:31:16 AM, you wrote: RK> I'm trying to read using $_POST, 4 radio buttons named "miles". I tried RK> reading the selected value with $_POST['miles[0]'], etc. with no success. Radio buttons can only have 1 eventual outcome (hence the whole point of them) a

Re: [PHP] Please check this program (its working)

2004-01-09 Thread Richard Davey
Hello Ryan, Friday, January 9, 2004, 7:20:09 AM, you wrote: RA> Its working perfectly well...but will I have problems if I try it on a large RA> email list or RA> will it hog resourcesetc? ANY advice appreciated. Stick this at the bottom of your loop (INSIDE the loop!): set_time_limit(30);

Re: [PHP] Rand() problem

2004-01-10 Thread Richard Davey
Hello nefar, Friday, January 9, 2004, 6:05:34 AM, you wrote: n> After moving my PHP files to a new hard drive and a new windows n> installation, my rand function gets stuck and only gives you one number over n> and over. It worked a few times then got stuck. I tried using IIS 5.1 (I n> was usin

Re: [PHP] Exception number: c0000005 (access violation

2004-01-11 Thread Richard Davey
Hello Gunter, Saturday, January 10, 2004, 10:06:03 PM, you wrote: GS> I have 4.3.5-dev (Build Dec-22-2003) installed on a W2K Dell Inspiron 7500 GS> and I am getting an error which I don't get with 4.1.1 and 4.3.4. Would like GS> to learn how to debug things like that. Here is a dump of Dr. Watso

Re: [PHP] Caps or No caps

2004-01-11 Thread Richard Davey
Hello Frank, Sunday, January 11, 2004, 2:51:55 PM, you wrote: FK> When you have output in the database like this: "HeLlo WorlD" FK> then you convert it to all caps "HELLO WORLD" or just the first FK> character that is only caps "Hello world". All uppercase = strtoupper() First letters capped = u

Re: [PHP] How do I write to an XML file

2004-01-12 Thread Richard Davey
Hello Tim, Monday, January 12, 2004, 7:20:07 AM, you wrote: TB> I'm new to PHP - I've just figured out how to basically write data to a TB> text file. TB> What I want to do is have a user submit data (email address & a question) TB> via a form that is written to the xml file, then have a suppor

Re: [PHP] Did I choose the correct download?

2004-01-12 Thread Richard Davey
Hello, Monday, January 12, 2004, 10:58:56 AM, you wrote: F> Why doesn't it mention Windows XP? Do I need to download another program? The readme hasn't been updated. XP is a modified 2K/NT core anyway. It'll work just fine. -- Best regards, Richardmailto:[EMAIL PRO

Re: [PHP] file upload - But outside of web directory...?

2004-01-12 Thread Richard Davey
Hello Tristan, Monday, January 12, 2004, 2:30:15 PM, you wrote: TPrsc> What I want to do now, is allow the other site users to upload files to TPrsc> that same directory... TPrsc> From what I'v estudied on line, I can't do this, but I'm not convinced... TPrsc> Anyone know if this os possible, via

Re: [PHP] how to open a webpage

2004-01-12 Thread Richard Davey
Hello bernard, Monday, January 12, 2004, 1:47:39 PM, you wrote: b> I have a field with an URL b> The value of this in a variable $launch. b> How can I open this URL automatically ?? PHP itself cannot open a web page, it's a server-side language and doesn't have any control over the client like

Re[2]: [PHP] how to open a webpage

2004-01-12 Thread Richard Davey
Hello Chris, Monday, January 12, 2004, 5:00:16 PM, you wrote: >> PHP itself cannot open a web page, it's a server-side language and >> doesn't have any control over the client like that. CS> Well, that's not exactly true if the allow_url_fopen directive is enabled. CS> You can open Web pages jus

Re[2]: [PHP] view outputed headers?

2004-01-12 Thread Richard Davey
Hello Ivo, Monday, January 12, 2004, 6:41:49 PM, you wrote: IP> I've been using mozilla firebird as a test browser with the 'Live HTTP IP> Headers' extension. I've found it most useful. It's not free, but I use "HTTP Interceptor" for Windows which is extremely good. -- Best regards, Richard

Re: [PHP] MySQL query

2004-01-12 Thread Richard Davey
Hello Ashley, Monday, January 12, 2004, 8:21:01 PM, you wrote: AMK> What I'd like to do is search for records that are between AMK> 2004-01-09 and 2004-01-04. The time is to be ignored, just the date is AMK> what I need to search by. Is there a way to do this within an sql AMK> query, or do

Re[2]: [PHP] MySQL query

2004-01-12 Thread Richard Davey
RD> SELECT whatever FROM table WHERE date_column_name BETWEEN '2004-01-09 RD> 00:00:00' AND '2004-01-04 23:59:59' Actually sorry, inverse the seconds (put the 00:00:00 onto the lower date, the 4th) so it encompasses the whole period. You might actually be able to not even include the seconds, try

Re[2]: [PHP] MySQL query

2004-01-12 Thread Richard Davey
Hello Ashley, Monday, January 12, 2004, 8:43:07 PM, you wrote: AMK> Assume I don't know what those dates are. I need to search based on AMK> whatever the current date is, and search between 2 and 7 days back. The AMK> dates in my previous post were simply an example. Somewhat important fac

Re: [PHP] File Upload Name Mangling Question

2004-01-12 Thread Richard Davey
Hello Peter, Tuesday, January 13, 2004, 12:25:14 AM, you wrote: PV> Instead of it being "picture.jpg" it was PV> "/tmp/progtemp/php/uploads/phpeZQiXd".  Can anyone shed some light PV> as to how I could check to make sure that only JPEG images get PV> uploaded ?  Thanks in advance... The filename

Re: [PHP] iteration of $GLOBAL

2004-01-12 Thread Richard Davey
Hello Chris, Tuesday, January 13, 2004, 12:38:40 AM, you wrote: CS> I feel a little stupid asking this but I have tried multiple CS> searches on google and on php.net and cant seem to find the CS> snippet of code that will iterate through all the global variables CS> for the session I don't beli

Re: [PHP] class functions where the function name == class name

2004-01-13 Thread Richard Davey
Hello Glenn, Tuesday, January 13, 2004, 7:36:18 AM, you wrote: GY> I know that "$object = new classname;" will automatically run $object->>classname();. But is it neccessary for every class to have this GY> function? I read all these scripts and they all have them. I made one GY> simple database

Re: [PHP] Sending session ID without cookie

2004-01-13 Thread Richard Davey
Hello Børge, Tuesday, January 13, 2004, 9:54:27 AM, you wrote: BS> I'm trying to send my session ID using POST/GET auto-inserted by PHP. BS> This works like a charm in a .php file. But in a .cgi file, a new BS> PHPSSID appears in the Address field of my browser every time I follow BS> the link fr

Re: [PHP] Accessing a website from within a php script

2004-01-13 Thread Richard Davey
Hello Børge, Tuesday, January 13, 2004, 10:05:10 AM, you wrote: BS> My php program uses sends send some information to a .cgi file BS> possibly on a different site. That file uses GET to fetch the BS> information and prints it out as it would if accessed through a BS> browser. But instead I want

Re[2]: [PHP] Accessing a website from within a php script

2004-01-13 Thread Richard Davey
Hello Børge, Tuesday, January 13, 2004, 10:32:08 AM, you wrote: BS> Do you see something that it obviously wrong here? You need to loop through the data as it comes back from the fopen function. ' . "\n"; print 'test6.php'; $fp = fopen("http://www.boggle.no/message.txt";, "rb");

Re[2]: [PHP] Accessing a website from within a php script

2004-01-13 Thread Richard Davey
Hello Børge, Tuesday, January 13, 2004, 12:19:24 PM, you wrote: BS> thaks for clarifying that to me. The only problem now is that I get a BS> timeout in my script because fopen() failed to open the stream. You can increase the timeout limit of a script. If you cannot be sure the other web site

Re: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Richard Davey
Hello Dave, Tuesday, January 13, 2004, 12:34:33 PM, you wrote: DC> sql = mysql_query("select *, count(id) as cnt from table where DC> somefield=\"somevar\""){ It's nothing to do with your function, simply that your SQL is invalid. -- Best regards, Richardmailto:[E

Re[2]: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Richard Davey
Hello Dave, Tuesday, January 13, 2004, 12:57:35 PM, you wrote: DC> If I use this sql in my func: DC> $sql = mysql_query("select count(fieldtocount) as cnt, sum(fieldforsum) as DC> total from $tab3 where fieldtocompare =\"$varcomparedwith\""); DC> Then all is fine and works as expected. Is this

Re[2]: [PHP] Re: jpeg Uploader issue

2004-01-13 Thread Richard Davey
Hello Mike, Tuesday, January 13, 2004, 2:55:44 PM, you wrote: >> In PHP you would set the Content-type header like so: >> header("Content-type: image/jpeg"); MR> So, should I write that header to the actual image file prior to the image MR> itself? You should output it to the browser prior to t

Re: [PHP] Empty Reference to an Object

2004-01-13 Thread Richard Davey
Hello Sebastian, Tuesday, January 13, 2004, 3:09:39 PM, you wrote: SO> I cannot believe that there is no way of making an object parameter SO> optional. function ($parameter1, $parameter2 = NULL) { // etc } If passed to your function, $parameter2 will be your object (or string or whatever you

Re: [PHP] Newbie question

2004-01-13 Thread Richard Davey
Hello James, Tuesday, January 13, 2004, 3:37:17 PM, you wrote: JM> The book I'm learning from had some simple examples pages that I created JM> early on and they work; however this is the first attempt at trying to use JM> php to connect. Post your code (if it's from a book I'm guessing it isn't

Re: [PHP] Destroy all session data...

2004-01-13 Thread Richard Davey
Hello Tristan, Tuesday, January 13, 2004, 3:59:05 PM, you wrote: TPrsc> I've just asked my host to set my session time limit to 30 days... From 0 TPrsc> I'm now running into problems, and I think that destroying all session TPrsc> data sill help... TPrsc> Until I get this sorted, can I kill ever

Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-13 Thread Richard Davey
Hello Mike, Tuesday, January 13, 2004, 5:31:47 PM, you wrote: MR> That's what I kind of thought, but this is a case where the browser is MR> opening the image directly - there is no html code or placement in an html MR> page. It doesn't matter, it's still being served via HTTP and that's what yo

  1   2   3   4   5   6   7   8   9   10   >