RE: [PHP] to be persistent connected or not to be persistent connected

2001-01-10 Thread Jon Haworth
In your Apache httpd.conf, do you have the line KeepAlive On - this is the Apache directive to turn on persistent connections. You will also want to play with the MaxKeepAliveRequests directive, if you set it to 0 then it will allow an unlimited number of connections. There may be more to it

RE: [PHP] Re: PHP programmer needed.

2001-01-11 Thread Jon Haworth
Wow, 20 worth of domains hooray... | -Original Message- | From: K.Simon [mailto:[EMAIL PROTECTED]] | Sent: 11 January 2001 14:35 | To: nonoy apellido; [EMAIL PROTECTED] | Subject: [PHP] Re: PHP programmer needed. | | | | If you finish it fast and as i want (i will help with the

[PHP] Problem with Exec()

2001-01-12 Thread Jon Haworth
Hello list, I'm having a problem with Exec and Sendmail, on PHP-4 running under Apache 1.3.14 on Windows NT. When I go to a DOS prompt and enter d:\sendmail\sendmail -t -messagefile=d:\sendmail\msg.txt it works fine. When I have any of the lines exec ("d:\sendmail\sendmail.exe -t

RE: [PHP] Problem with Exec()

2001-01-15 Thread Jon Haworth
| | It should also be noted that the system interaction functions (namely, | passthru(), exec(), system() and popen()) are | broken/incorrectly implemented, | actually, its windows that's incorrectly implemented, but be | that as it may, the | functions do not work with windows). Well, I

[PHP] Working out the name of the day given a date

2001-01-16 Thread Jon Haworth
Hello list, Just a quickie. Does anyone have a code snippet for calculating the day of the week given a date? I was hoping I could feed a string like "20010116" to a function and have it return "Tuesday" - it doesn't have to be exactly this date format that is used for the input, but I do need

RE: [PHP] WML/WAP and PHP

2001-01-16 Thread Jon Haworth
I seem to remember reading something very recently, possibly on this list, about WML. IIRC, if you drop out of PHP at any point the rest of the document gets treated as text/html. Try something like ?php header("Content-type: text/vnd.wap.wml"); echo("wmlcardpHello world!/p/card/wml"); ? and

RE: [PHP] Working out the name of the day given a date

2001-01-16 Thread Jon Haworth
break; case 5: $day = "Friday"; break; case 6: $day = "Saturday"; break; } Ugh. I'll try your method. Cheers Jon -Original Message----- From: Andrew Rush [mailto:[EMAIL PROTEC

RE: [PHP] Working out the name of the day given a date

2001-01-16 Thread Jon Haworth
] Sent: 16 January 2001 16:03 To: Jon Haworth Subject: Re: [PHP] Working out the name of the day given a date On Tuesday, January 16, 2001, at 10:56 AM, Jon Haworth wrote: Just a quickie. Does anyone have a code snippet for calculating the day of the week given a date? I was hoping I could feed a s

RE: [PHP] Working out the name of the day given a date

2001-01-16 Thread Jon Haworth
Gah. I read that lower case l as a number 1. Time to get new glasses/switch to 640x480 mode. Thanks to everyone for your help. Cheers Jon -Original Message- From: Andrew Rush [mailto:[EMAIL PROTECTED]] Sent: 16 January 2001 16:03 To: Jon Haworth Subject: Re: [PHP] Working out

RE: [PHP] Mail problems

2001-01-17 Thread Jon Haworth
Have a look at http://www.php.net/mail - you need to do something like $sendto = "[EMAIL PROTECTED]"; $subject = "Oh how I love PHP"; $message = "I really really do.\n\nI mean I REALLY do.\n\nDo be do be do.\n"; mail ($sendto, $subject, $message); HTH Jon -Original Message- From:

RE: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-17 Thread Jon Haworth
But, you know, the look and feel of a site is pretty important and an HTML editor goes a long way toward managing that part. If you can find an editor that helps you set up some style sheets that carry across all your pages without you having to type in all the code for every page, you're

RE: [PHP] how do i hide my .inc files in apache??

2001-01-17 Thread Jon Haworth
I take it you're talking about normal html .inc files, and not the PHP include() function? If so, this is well off-list, try the comp.infosystems.www.servers heirarchy for this sort of thing. But... You can't, AFAIK. The whole *point* of an include file is that the entire contents of that file

RE: [PHP] Calendar program

2001-01-18 Thread Jon Haworth
This should achieve a similar effect as that URI: ?php echo "404 Document Not Found"; ? ;-) Cheers Jon -Original Message- From: Todd Cary [mailto:[EMAIL PROTECTED]] Sent: 18 January 2001 13:56 To: [EMAIL PROTECTED] Subject: [PHP] Calendar program Does a calendar program

RE: [PHP] Print vs. Echo

2001-01-18 Thread Jon Haworth
From www.php.net/print : The print() function returns a boolean indicating the status of the call. If the write was successful, print() returns 1. If not, it returns 0. This can be used to detect when the client has closed the connection, and appropriate measures taken. The builtin echo does not

RE: [PHP] apache doubt!!!!

2001-01-23 Thread Jon Haworth
If you're running on a unix-type system you can set up a cron job for this. If you're running on Windows you may be able to do something via the task scheduler, but I'm not sure about this. HTH Jon -Original Message- From: Bruno Freire [mailto:[EMAIL PROTECTED]] Sent: 23 January 2001

RE: [PHP] multple select forms... going to hit my head against a wall ..

2001-01-23 Thread Jon Haworth
Sorry, my bad. I should have spotted the cunning way he used the word "array", really :-) Eyes closing. More coffee. glug aahaahhhrrrghhh Cheers Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 23 January 2001 12:45 To: J

RE: [PHP] Sending a mail in HTML format

2001-01-24 Thread Jon Haworth
I can't understand why you don't just use: $address = "[EMAIL PROTECTED]"; $subject = "This is an HTML message"; $headers = "Content-Type: text/html\n"; $message = "htmlbody\n"; $message .= "h1This should use H1/h1\n"; $message .=

RE: [PHP] Beginner in php!

2001-01-24 Thread Jon Haworth
Hi, welcome to the wonderful world of PHP... grin You can use any text editor you like to write your PHP, my personal favourite is EditPlus 2 (www.editplus.com), but this is holy war territory so try a few out and see which one you get on with best. There are loads of great tutorials all over

RE: [PHP] Checking if files are there?

2001-01-24 Thread Jon Haworth
Yep. $file = @fopen (. The @ sign suppresses the warning messages. Should work fine after this. HTH Jon -Original Message- From: Sam [mailto:[EMAIL PROTECTED]] Sent: 24 January 2001 12:19 To: 'php' Subject: [PHP] Checking if files are there? Hi all, I was wondering if

[PHP] Integration of PHP with MS Outlook?

2001-01-24 Thread Jon Haworth
Hi list, Is it possible to get PHP to create entities in Outlook, specifically tasks and calendar entries? TIA Jon Please visit us on the Internet: http://www.witanjardine.co.uk 'The information included in this e-mail is of a confidential nature and is intended only for the addressee. If

RE: [PHP] MySQL email function

2001-01-25 Thread Jon Haworth
Something like this (OTOH so may need some tweaking but should be generally ok): ?php $counter = 0; $starttime = time(); $subject = "Spam!"; $message = "This is a genuine money-making opportunity.\n"; $message .= "blah blah blah blah\n"; $query = mysql_query("SELECT * FROM

RE: [PHP] mail( ) question

2001-01-30 Thread Jon Haworth
If you've copied-and-pasted that script, you might want to correct this line: scrip language="JavaScrip" Both the words "script" and "Javascript" have a T on the end of them :-) On the other hand, why don't you just use PHP for the whole thing? Get the e-mail address from a form, make the

RE: [PHP] upload_max_filesize

2001-02-01 Thread Jon Haworth
It's usually in your system root, but you could have put it somewhere else when you installed PHP. If you're on Windows it's liable to be in \windows\system, \windows\system32, \winnt\system, or \winnt\system32. Most OSes come with a Find Files command these days (just a thought). Once you have

RE: [PHP] Pricing for PHP programming???

2001-02-01 Thread Jon Haworth
Of course, this might also be something to do with the fact that if one place is charging 80p/litre and one is charging 90p/litre, where are you going to spend your cash, given there's no difference between the petrol? -Original Message- From: thor [mailto:[EMAIL PROTECTED]]

[PHP] RE: test

2001-02-01 Thread Jon Haworth
No, I didn't get it -Original Message- From: ybcat [mailto:[EMAIL PROTECTED]] Sent: 01 February 2001 15:47 To: [EMAIL PROTECTED] Subject: test OK? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: [PHP] For My Information

2001-02-02 Thread Jon Haworth
Over 60% of websites use Apache. Many people using MySQL and PHP also run Apache for the complete open source solution. This is cheap to set up, and easy to get support for (there's even a mailing list called AMP - Apache/MySQL/PHP). And, IIRC, those on NT 4.0 Workstation don't *have* IIS. It's

RE: [PHP] no-resubmit on reload/refresh

2001-03-06 Thread Jon Haworth
Javascript? (I know it's generally horrible, but it's good for this sort of thing) Stick this in your head.../head: script language="JavaScript" type="text/javascript"!--Begin var submitcount=0; function jsCheck() { if (submitcount == 0) { submitcount++;

RE: [PHP] dates from db

2001-03-07 Thread Jon Haworth
If it's stored as a unix timestamp you can format it any way you like. [www.php.net/date] If it's stored as a string in the -MM-DD hh:mm:ss format, you can use substr(0,10) [www.php.net/substr] to get the first 10 characters and only display those. HTH Jon -Original Message- From:

RE: [PHP] Dynamic Links..

2001-03-08 Thread Jon Haworth
As a quick caveat you need to be *very* careful you're not obfuscating the target site copyright infringement, anyone? -Original Message- From: Richard S. Crawford [mailto:[EMAIL PROTECTED]] Sent: 08 March 2001 00:02 To: Ashwin Kutty; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject:

RE: [PHP] Print form variables in PHP

2001-03-12 Thread Jon Haworth
If the ACTION attribute of the form points to your PHP script, the variables should automagically appear, i.e. $result would be "1", $age would be "23", and $name would be "john". Failing that you could investigate the explode() function. However, if the form isn't controlled by you, how come is

RE: [PHP] install

2001-03-14 Thread Jon Haworth
It's truly amazing what you can find three clicks away from the main page of www.php.net. http://www.php.net/manual/en/installation.php HTH Jon -Original Message- From: hananet [mailto:[EMAIL PROTECTED]] Sent: 14 March 2001 12:53 To: [EMAIL PROTECTED] Subject: [PHP] install how to

RE: [PHP] get filename?

2001-03-20 Thread Jon Haworth
$FileName = $PHP_SELF; HTH Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 13:20 To: [EMAIL PROTECTED] Subject: [PHP] get filename? Hi Whats the best method to get the filename of the file I am using. E.G if the file is called

RE: [PHP] Response.Write [OK]

2001-03-21 Thread Jon Haworth
You could investigate www.php.net/echo, I think it's what you're after. Cheers Jon -Original Message- From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]] Sent: 21 March 2001 12:05 To: [EMAIL PROTECTED] Subject: [PHP] Response.Write [OK] Hi, I have built a shopping cart and have made

RE: [PHP] include virtual, file or exec cgi?

2001-03-21 Thread Jon Haworth
Wow, error messages are getting better these days ;-) Are you running PHP as a CGI interpreter or a server module? -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: 21 March 2001 16:20 To: [EMAIL PROTECTED] Subject: [PHP] include virtual, file or exec cgi?

RE: [PHP] Free Web Space

2001-03-22 Thread Jon Haworth
Head on over to http://members.evolt.org/ and have a look at what the wonderful folks over there are offering. HTH Jon -Original Message- From: PIS Alaiddin Tayeh [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 13:23 To: [EMAIL PROTECTED] Subject: [PHP] Free Web Space Is there any

RE: [PHP] Form help

2001-03-22 Thread Jon Haworth
You could have a check for the HTTP_REFERER variable, if it doesn't contain "application.php", chances are they didn't come from that page. There might be a neater way to do it, but I don't know it :-) HTH Jon -Original Message- From: Good Fella [mailto:[EMAIL PROTECTED]] Sent: 22

RE: [PHP] Form help

2001-03-22 Thread Jon Haworth
You could have a check for the HTTP_REFERER variable, if it doesn't contain "application.php", chances are they didn't come from that page. it's not a good idea to rely on $HTTP_REFERER for anything, and especially for this. a referer is only reported when the user follows a hyperlink, so

RE: [PHP] Check URL Mail

2001-03-23 Thread Jon Haworth
Hi, How can I check for existing site (e.g. http://www.somehost.com/someone) and check for existing mail (e.g. [EMAIL PROTECTED])? You will most likely find the answer at: http://marc.theaimsgroup.com/?l=php-generalr=1w=2 If you don't get any joy at this address I'd also suggest visiting

RE: [PHP] php or phtml???

2001-03-28 Thread Jon Haworth
Whenever you're working on a server that only parses .php as PHP files, you should use .php. Whenever you're working on a server that only parses .phtml as PHP files, you should use .phtml. If you run your own server, or your server parses both .php and .phtml, you can use either. HTH Jon

RE: [PHP] Best way to check if a query succeeded

2001-03-29 Thread Jon Haworth
What about: $sql = "SELECT something FROM table"; $result = mysql_query($sql) or die ("Query failed!"); do_something(); //the query has succeeded if we get to this line HTH Jon -Original Message- From: Jordan Elver [mailto:[EMAIL PROTECTED]] Sent: 29 March 2001 12:00 To: PHP Database

Re: [PHP] Passing through Array's to another script

2001-12-18 Thread Jon Haworth
If you need to POST a form, but include some variables, you can use hidden fields. form action=script.php method=post input type=hidden name=a value=foo input type=hidden name=b value=bar input name=c /form Assuming someone now enters baz into the input called c, your POST data is

RE: [PHP] carriage returns

2002-01-07 Thread Jon Haworth
Inserting data from a textarea or something? If so, have a look at http://www.php.net/nl2br - probably what you're after. Cheers Jon -Original Message- From: Rodney Davis [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 17:47 To: [EMAIL PROTECTED] Subject: [PHP] carriage returns

RE: [PHP] no one can find solution to my problem??

2002-01-08 Thread Jon Haworth
$headers .= Cc: [EMAIL PROTECTED]\r\n; $headers .= Bcc: [EMAIL PROTECTED]\r\n; $headers['User']='bankem'; $headers['Password']='narayana'; /* and now mail it */ mail($to, $subject, $message, $headers); ? Warning: Server Error in c:\www/email1.php on line 45 You do not need to

[PHP] Regex question

2002-01-09 Thread Jon Haworth
Hi all, I've got a regex that's working fine, apart from one little problem. $tags = array (script, !--!\[CDATA\[, \]\]--); foreach ($tags as $currentTag) if (preg_match (/^\/. $currentTag. /, $content)) // do something (checking to see if anything in the

RE: [PHP] Regex question

2002-01-09 Thread Jon Haworth
If you want the [ to be escaped in the regex you have to double-escape it: $x = \ \[; (sorry, the two \ should be together without a space but my stupid mail-app converts the string thinking it's an network address) so $x will contain \[ as you want ( the first backslash escapes the second).

RE: [PHP] Regex question

2002-01-09 Thread Jon Haworth
As far as I can see (notice: I'm not a regex-king ;) the regex seems correct to me. The only thing I'm wondering about is the /^ (second last line of the citation). Together with your expression in the array it results in preg_match(/\/!\[CDATA\[/, ...) I'm wondering if that (/![CDATA...) is

RE: [PHP] Finding PHP Developers for Remote Project

2002-01-10 Thread Jon Haworth
Does anyone know of a good source of PHP developers where I can advertise my needs? mailto:[EMAIL PROTECTED] :-) While advertising isn't very welcome, we often see emails along the lines of I have a project involving foo and bar, and I need someone who understands xyzzy to work on it. Please

RE: [PHP] HTTP_X_FORWARDED_FOR?

2002-01-10 Thread Jon Haworth
Okay, thanks. 'Cause I mean, the REMOTE_ADDR is still there. So you mean that the HTTP_X_FORWARDED_FOR isn't working while I'm working localhost? REMOTE_ADDR contains the IP of the computer that requested your page. If it was a proxy doing the request, you'll have the proxy's IP in this

RE: [PHP] php and sqlserver2000

2002-01-16 Thread Jon Haworth
i have many problems with my web site. i have sql server 2000 and php4 but i not connect with my server and the result pages don't show. somebody help me :-( I use PHP 4.1 and SQL Server 2000 together with no problems - please post your code and explain exactly what you're trying

RE: [PHP] apache authentication

2002-01-17 Thread Jon Haworth
SECURITY WARNING: This code uses a hard-coded user-name and password, which begs the question of where they would come from in the real world. You could collect them via a form, but then they will be sent to the PHP script as arguments and so the password will be visible in the URL box

RE: [PHP] htmlspecialchars() alias

2002-01-18 Thread Jon Haworth
I was wondering if it would be feasible to create an alias for this function, say hsc() or something short. function hsc ($foo) { $foo = htmlspecialchars ($foo); return $foo; } HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: [PHP] Mod function

2002-01-18 Thread Jon Haworth
I am looking for a mod() function in PHP but unfortunately I am unable to find one. Please help... As in modulus? if ($foo % 2 == 0) { // if there's no remainder after dividing by 2 } if ($foo % 5 != 0) { // if there is a remainder after dividing by 5 } HTH Jon -- PHP General

RE: [PHP] Rand function

2002-01-22 Thread Jon Haworth
Can anyone tell me why, when I run this $number = rand (1,12); The only number that ever appears is 5? Not really a random number... You need to seed the random number generator first. http://www.php.net/srand HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] eval on php embedded html

2002-01-24 Thread Jon Haworth
TD valign=centerinput type=radio name=radiobutton1 value=reg1 ? if ($radiobutton1==on) { print selected; ? /TD You either need to remove the opening {, or put a corresponding } at the end of the if() statement. So, either: ? if ($radiobutton1 == on) { print selected; } ? Or ? if

RE: [PHP] A link

2002-01-25 Thread Jon Haworth
snip Don't click the above link. Don't be so rough - we all tried this at some time - remember, just before it became an old joke? :-) And I didn't click on it either... Agreed, what a tit. For anyone vaguely interested, it's a redirect followed by a lame javascript. Have a look at the

RE: [PHP] A link

2002-01-25 Thread Jon Haworth
What does that function do? What was he trying to achieve? From a quick scroll up and down, it looks like it's similar to the click this form submit button with an onhover event that scoots it across the screen - the really sad thing is it then spawns a bunch of windows that open the page

RE: [PHP] Server Loading Question...

2002-02-07 Thread Jon Haworth
Does anyone know of a Really Good way to determine what kind of loads your Webserver/network can handle before degrading performance or flaking out? I would like to find this out about our server before it fails us under heavy load. If you're running Apache it comes with a handy tool

RE: [PHP] Preventing Identical Form Fields

2002-02-07 Thread Jon Haworth
With javascript onSubmit, but that ain't php, so with if($form1==$form2){sendthembackwitherrors()} Thanks Chris, but I have about 10 different fields and want to make sure none of those are the same. You could brute force it: $ok = true; if ($field1 == $field2 || $field1 == $field3 ||

RE: [PHP] probs w/ pass vars as fake directories

2002-02-07 Thread Jon Haworth
I tried it out on my site by deleting the get parameters and typing the mock directories in on the url. Very cool, my website is still being displayed even with the fake directories. BUT, I noticed that the server was not finding my css page or my images. You need to exclude certain

RE: [PHP] error_reporting(E_ALL) and undefined vars

2002-02-07 Thread Jon Haworth
I develop with error_reporting(E_ALL). It's a major pain to type everytime if(isset($some_var)) To avoid undefined variable errors. Any tips? If you turn E_ALL on error_reporting, what do you do? Generally I make sure my variables are defined, and if I can't be sure I use... if (isset

RE: [PHP] Convert a string to an array w/o spliting or exploding

2002-02-13 Thread Jon Haworth
Hi, thanks for reading this novice question, I'd be grateful if someone could email me and tell me if its possible to convert a string to an array whithout using the split[] or explode[] function, as these aren't appropriate for the task. What are you trying to achieve? Why isn't

RE: [PHP] Retaining data across multiple sites

2002-02-20 Thread Jon Haworth
Write it to a database from one server, and then read it from another? webserver 1 -- db server -- webserver 2 HTH Jon -Original Message- From: Ben Sinclair [mailto:[EMAIL PROTECTED]] Sent: 20 February 2002 16:25 To: [EMAIL PROTECTED] Subject: [PHP] Retaining data across multiple

RE: [PHP] Count

2002-02-25 Thread Jon Haworth
Hi, I want to make this sql query visual does anybody have any idea :-) SELECT date_format(t_timestamp_opened,'%Y %m %d'), count(date_format(t_timestamp_opened,'%Y %m %d')) FROM crm.ticket group by date_format(t_timestamp_opened, '%Y %m %d') order by t_timestamp_opened; Visual? What

RE: [PHP] Substr and HTML tags - Problem...

2002-02-25 Thread Jon Haworth
Personally when I'm doing teasers I strip all HTML from the content before using substr: $teaser = strip_tags($content); $teaser = substr($teaser, 0, 100); $teaser .= '...'; // Nice touch to have a '...' on the end :) You don't have a handy way to check that your substr() doesn't

RE: [PHP] creating dropdown lists from fetched arrays.

2002-02-25 Thread Jon Haworth
while ($row = mysql_fetch_array($results){ ITYM while ($row = mysql_fetch_array ($results)) { Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] bouncy mail();

2002-02-25 Thread Jon Haworth
if i set the return-path of a email to be [EMAIL PROTECTED], will bounced be returned here? You may want to investigate the Errors-To header as well (although you never know your luck - have you tried it?) Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] How to get information about the php installation

2002-02-26 Thread Jon Haworth
I saw on the website of my provider that he is displaying environment variables about his php installation. Not only the version with phpversion() but also about installed libraries etc.. phpinfo(); HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] CheckBoxes....

2002-03-04 Thread Jon Haworth
Alternatively, is there any plans to change the DTD for XHTML Strict to allow brackets? IMO it's not something that cause problems if it were to be supported. Kind of lame that it's not, actually. Subscribe to the www-html list at w3.org and ask the guys who look after this sort of

RE: [PHP] Reading A file

2002-03-06 Thread Jon Haworth
I have a TEXT file that I want to make visual via the web using php ?php include (my_text_file.txt); ? HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Is there a GoTo Page Function?

2002-03-06 Thread Jon Haworth
My wife knows I spend too much time in here. What's a wife? // Wife class class Wife extends Human () { // Constructor function Wife () { if ($developer-priorities[0] == usenet) die (Can't create wife: must be higher priority than usenet); } } HTH Jon -- PHP General

RE: [PHP] Can no one help with this opendir problem?

2002-03-11 Thread Jon Haworth
I don't think anyone's about to wade through your incredibly obfuscated code. I tried to have a look, and got as far as while (($file = readdir($banners)) != FALSE) before thinking you must be joking. You also have bits like this: // $l != 0 } // $banner != FALSE How are we supposed to know

RE: [PHP] Probleme de lien hypertexte

2002-03-11 Thread Jon Haworth
Bonjour Jerome, Vous avez besoin de replacer If ($val = 1) { avec If ($val == 1) { Parce que = signifie une allocation, et == signifie une comparaison Je fais des excuses pour mon francais - je ne le parle pas tres bien :-) Regards Jon -Original Message- From: Jérome Moisy

RE: [PHP] Newbie Question

2002-03-13 Thread Jon Haworth
I'm sure it's something simple, but what's the php function that will let me connect to the SQL Server? mssql_*, instead of mysql_* See them all at http://www.php.net/manual/en/ref.mssql.php HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Hi what is diff. Between mktime() and UNIX_TIMESTAMP()

2002-03-14 Thread Jon Haworth
Unixtimestamp from Mysql :1016679600 Unixtimestamp from PHP :953699601 y this much difference? A PHP timestamp is the number of seconds since 1st Jan 1970 A MySQL UNIX_TIMESTAMP is the date in MMDDHHMMSS format. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] using a counter in a foreach loop

2002-03-26 Thread Jon Haworth
Hi Erik, I have a foreach loop, where I execute some commands for each element in a certain array. One thing I would like to add to this loop is a counter, so that on each iteration of the loop I have a next higher number. The following does not work: foreach ($months) { $i =

RE: [PHP] functions

2002-04-12 Thread Jon Haworth
Hi Alia, i would like now how can we call a function within another function in php? The same way you'd call it from outside a function :-) ?php function hello () { echo hello ; } function world () { hello (); echo world; } hello(); echo br; world(); ? ...should output hello

RE: [PHP] mysql problems, need help quick

2002-06-11 Thread Jon Haworth
Hi Hawk, (snip auto-incrementing PKs) is there somewhere the next number is located ? No. Why would you care, anyway? The thing about PKs is that they have to be unique, not sequential. If you're *really* bothered by it, you'll have to dump the contents of the table to a file, drop the

RE: [PHP] Line breaks...

2002-04-16 Thread Jon Haworth
Hi Phil, I have a form inserting data into a database. I'm using nl2br to add br to the data enetered where appropriate. The data is then pulled out of the database and inserted into text fields for editing. Can anyone tell me how to remove the br tags while maintaining the line breaks

RE: [PHP] doubt...

2002-05-01 Thread Jon Haworth
Hi, When i'm using the declare construct i'm getting an error Cannot open the site. The connection with the server was reset. Culd u please help me in this... Show us some code! Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Re: PHP with MySQL

2002-05-03 Thread Jon Haworth
Hi Ben, John, presumably I can leave the error reporting on - but pipe it into a file if i wanted, rather than displaying on screen, and then redirect the user to another page? Of course you can - I generally have my pages send me email when they throw an error, but that's because I'm

RE: [PHP] Secure user authentication

2002-05-03 Thread Jon Haworth
Hi, but the password is put through my own fairly unbreakable (yes.. I am serious) password key system.. SO basically you'll end up with a nice 32 char string which is QUITE safe to pass around and the chance anyone's gonna decrypt it IMHO is about zilch, And all you have to do, is when

RE: [PHP] Secure user authentication

2002-05-03 Thread Jon Haworth
Hi, The method I was thinking about before was to pass the md5 hash of the password around, as the passwords are already md5'ed in the DB. Your method seems more secure as you use a totally spiced-up and personalized encryption engine. *boggle* Why are you passing the password around,

RE: [PHP] Getting only 255 chars from SQL Server

2002-05-13 Thread Jon Haworth
Hi Niklas, So can varchar be longer than 255 chars in MSSQL (or in any SQL)? Yes. SQL Server can handle varchars up to 8,000 characters - I assume Oracle and DB/2 are similar, but I don't know for sure. Getting 255 characters back is a common problem that does have workarounds:

RE: [PHP] Changes in 4.2.1

2002-05-14 Thread Jon Haworth
Hi Steve, I don't know what I did wrong. I just installed 4.2.1 and can NOT do: ? echo hi; ? What, you mean Bill Gates comes round and beats you up whenever you try it? Can you be more specific about what I cannot do means? (an error message would be particularly handy at this point)

RE: [PHP] Changes in 4.2.1

2002-05-14 Thread Jon Haworth
Hi Steve, Your right. I should give more specifics. Ok. I have a page called main.php. The only thing in it is: ? echo hi; ? That's it. I tried to run it and it gave me an HTTP 500 - Internal server error. Are you sure you've got short tags turned on? What happens if you try

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Jon Haworth
Hi Henry, Is this possible? yup. Set your cron job up as lynx -dump http://www.myserver.com/myscript.php /dev/null (or pipe it to a logfile if you fancy) - obviously, you'll need lynx installed for this to work :-) Cheers Jon -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Jon Haworth
Hi Michael, Set your cron job up as lynx -dump http://www.myserver.com/myscript.php /dev/null (or pipe it to a logfile if you fancy) - obviously, you'll need lynx installed for this to work :-) but this is only needed only if you compile php into apache or am i wrong? if i have the

RE: [PHP] Whats Function like response.redirect

2002-05-22 Thread Jon Haworth
Hi Roy, what function in PHP like response.redirect http://www.detik.com; in ASP? header (Location: http://www.detik.com/;); HTH Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Confusion with UNIX date/time

2002-05-24 Thread Jon Haworth
Hi JJ, What php functions should I use to convert a UNIX timestamp to a human - legible format and back again? gmdate()/date() and mktime()/gmmktime() (depending on whether you need to calculate them as GMT or not) HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] Replacing Number with Month(newbie)

2002-05-31 Thread Jon Haworth
Hi JJ, Is there a magical function that I can use to convert 4 into April and 5 into May etc? can I use mktime() One yes no answer will do fine Yes and no ;-) You might want to use a combination of mktime() and date(). i.e. ?php $month = 4; echo date (jS F Y, mktime (1, 0, 0,

RE: [PHP] Cache Control

2002-05-31 Thread Jon Haworth
Hi Jeroen, Where i can find more help about cache control Here: http://www.google.com/search?q=help+about+cache+control (495,000 results) Or did you mean something a bit more specific? Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Cache Control

2002-05-31 Thread Jon Haworth
Hi Jeroen, Where i can find more help about cache control http://www.google.com/search?q=help+about+cache+control Or did you mean something a bit more specific? indeed more specific Well, seeing as you're not sharing the actual question with the mailing list, this answer may not be

RE: [PHP] mktime parameters (Was: Replacing Number with Month(newbie))

2002-05-31 Thread Jon Haworth
Hi Mike, Is there a magical function that I can use to convert 4 into April and 5 into May etc? can I use mktime() One yes no answer will do fine Yes and no ;-) Ha! I was just about to say exactly that myself! It was just too tempting :-) Except, to get just the month

RE: [PHP] Cache Control

2002-05-31 Thread Jon Haworth
Hi Jeroen, I want info on the internet where i can find a manuel. http://www.google.com/search?q=http+cache+control+headers the page is a php script and sometimes it comes out of a proxy but that is not allowed. It's not something you have absolute control over - some proxies are

RE: [PHP] unix timestamp

2002-09-06 Thread Jon Haworth
Hi Andy, I am trying to create a unix timestamp which dates back a certain amount of days. Lets say I would like to have a unix timestamp from 7 days ago. what I tryed is just to subtract values since this are counted s since the start of the unix epoche, but this does not work in

RE: [PHP] Low Cost PHP Hosting

2002-09-06 Thread Jon Haworth
Hi Phil, I am trying to find a low cost host for testing out PHP web applications on the Internet. http://34sp.com/ are pretty good, and at £15 a year (about US$20 I believe), they're certainly low cost :-) I'd stay away from http://zenithtech.com/ though, lots of people I know have had a

RE: [PHP] which version to use?

2002-09-06 Thread Jon Haworth
Hi Anil, What version combinations of php and mysql should be used? PHP 4.2.2 is the latest and is highly recommended. For MySQL it depends somewhat on which features you need - if you can live without the stuff in the 4.x versions, you're probably best off with 3.23.52. Cheers Jon --

RE: [PHP] Web based FTP client

2002-09-06 Thread Jon Haworth
Hi Mark, I am trying to build or find a web FTP client. I want it to look like a windows based FTP client a list box on one site for the user's file system and a list box on the other for the ftp server. A couple of iframes side by side should let you do that. The biggest problem I can

RE: [PHP] Calculating Totals from table columns without a second query to the DB

2002-09-06 Thread Jon Haworth
Hi Jay, while($row = mysql_fetch_object($result)){ print(td . $row-value . /td\n); print(td . $row-another_value . /td\n); $value1 = $value1 + $row-value; $value2 = $value2 + $row-another_value; } Challenge; Can this be made as simple for rows too? thinking out loud :-)

RE: [PHP] How to pass null as value?

2002-09-11 Thread Jon Haworth
Hi Chuck, how do you pass null on to a page as a value. Let say in a field where you have a yes and no. Null needs to equal no. Pass from where? If it's a checkbox on a form, just use isset() to test for the existence of the variable: true means it's ticked, false means it isn't. If

  1   2   3   4   >