[PHP] Re: Embedding an image in an email

2003-07-07 Thread Hugh Bothwell
er to stick them on a web server and refer to them from your email. Second, if you really have to know how - look at the source of the posting you just made, and/or look at the relevant RFCs. -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$

[PHP] Re: limit on displaying a LONGTEXT filed from MySQL database

2003-06-23 Thread Hugh Bothwell
IF( LENGTH(mytext) > 150), LEFT(mytext, IF(@first < 1000, @first, 150 ) ), mytext ) AS returntext FROM dbase If you want more flexibility - which I would - I suggest returning the first 170 characters or so, and truncate more accurat

[PHP] Re: Returning TWO variables from function

2003-06-21 Thread Hugh Bothwell
$c, $d) { return array($a, $b, $c, $d); } list($first, $second, $third, $fourth) = ReturnMultiValues(1, 2, 3, 4); -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++ K? w++ M PS+ PE++ Y+ PGP+ t-- 5++ !X R+ tv b DI+++ D-(++

Re: [PHP] securing a graphic

2003-06-19 Thread Hugh Bothwell
ine is, the web page and graphic must be publically available and decryptable in order for people to view it in a browser. If the browser can decode it, so can just about anyone that knows what they're doing. Also note, this scheme adds about 4 1/2 kb to the size of your page and makes it unusa

Re: [PHP] functions, opinion...

2003-06-17 Thread Hugh Bothwell
s. For more info, see some of the links at http://directory.google.com/Top/Computers/Programming/Languages/Functional/ -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++ K? w++ M PS+ PE++ Y+ PGP+ t-- 5++ !X R+ tv b DI+++ D-(++) G+ e(+

Re: [PHP] functions, opinion...

2003-06-16 Thread Hugh Bothwell
til all the answers are obvious and there are no places left for bugs to hide, passing the results back to build your final solution and keeping the pieces generic and reuseable. -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++

Re: [PHP] Formatting issue.

2003-06-16 Thread Hugh Bothwell
they wrap to whatever the page width is. This has the side benefits of simplifying your output logic and making the output more flexible. -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++ K? w++ M PS+ PE++ Y+ PGP+ t-- 5++ !X R

[PHP] Re: Including text with PHP and keeping blanks

2003-06-16 Thread Hugh Bothwell
or do you only care about left-hand spaces, ie for indenting? -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++ K? w++ M PS+ PE++ Y+ PGP+ t-- 5++ !X R+ tv b DI+++ D-(++) G+ e(++) h-- r- y+ -- PHP General Mailing List

[PHP] Re: rows by day

2003-06-16 Thread Hugh Bothwell
ho ""; echo date("l M j", $row['tstamp']) . ""; } echo "{$row['title']}" ."Written by {$row['author']}" ."{$row['text']}"; } if ($first) echo "No re

[PHP] Re: need help on coding

2003-06-15 Thread Hugh Bothwell
ndly, you could escape the quotation marks inside the string, ie $data = " \"message\" "; I find the first method is a little easier to read; however, single-quoted strings are not evaluated for variable substitution, ie $insert = 'test'; // $data = ' "$i

[PHP] Re: How to format a strign with a generic mask??

2003-06-11 Thread Hugh Bothwell
TH! Mask: Content: Maskchar: Result: -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++ K? w++ M PS+ PE++ Y+ PGP+ t-- 5++ !X R+ tv b DI+++ D-(++) G+ e(++) h-- r- y+

[PHP] Re: Random Image Store

2003-06-11 Thread Hugh Bothwell
whether they know the generating script's name? The only important thing is that they can't easily read off (or generate) the password-value passed to the image-creation script. You could store the passcode as a session variable, or send it as an encrypted get- variable, or hash into a st

[PHP] Re: Scalable Vector Graphics

2003-06-06 Thread Hugh Bothwell
e needed information into session variables, then redirects to the page with the graphics. This page then passes the session-id to the script that generates the graphics. -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++ K? w++ M

[PHP] Re: PHP and base32 encryption

2003-06-05 Thread Hugh Bothwell
rent/msg13890.html I don't know of any php implementation offhand, but it doesn't seem especially difficult. -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++ K? w++ M PS+ PE++ Y+ PGP+ t-- 5++ !X R+ tv b DI+++ D-(

Re: [PHP] Move Decimal Point

2002-12-11 Thread Hugh Bothwell
"Chris Wesley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wed, 11 Dec 2002, Stephen wrote: > > > One other question. How would I find the first 0 of a repeating zero. > > Like 204,000. How would you find the 0 in the 4th column. > > For your repeating zeo

[PHP] Re: An interesting one!!!

2002-10-25 Thread Hugh Bothwell
"Tim Haynes" <[EMAIL PROTECTED]> wrote in message news:20021023162115.16675.qmail@;pb1.pair.com... > Here is a puzzle, infact it is a game that I need to do in PHP, here is the > spec > > 3 prizes to be won every day over a month by clicking on 24 seperate > windowsand thats it > > How could I

[PHP] Re: Quick way to test series of integers

2002-10-25 Thread Hugh Bothwell
"Paul Kaiser" <[EMAIL PROTECTED]> wrote in message news:58851.208.216.64.17.1035495310.squirrel@;illinimedia.com... > I have around 50 checkboxes on an HTML form. Their "value" is "1". So, > when a user check the box, then no problem -- the value returned by the > form is "1" and I can enter that

[PHP] Re: Time/date function MYSQL->UNIX

2002-05-24 Thread Hugh Bothwell
"Peter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is there a built in PHP function which will convert a MySQL type date > (DDMM or whatever) into a unix timestamp so it can be used with the > other PHP time and date functions? > > I'm currently using

Re: [PHP] Email harvesters

2002-05-20 Thread Hugh Bothwell
"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > But then how would newsgroup users write back to people? > > miguel > > On Mon, 20 May 2002, Leif K-Brooks wrote: > > I think it would be a good idea to have whatever software sends list > > messages

[PHP] Re: finding postion of any chat occur first

2002-05-19 Thread Hugh Bothwell
"Prachait Saxena" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a string like $str="Hello World > <<"; > and i want to find the first occurance of any one of the char in " " or "<" > > $sp=strpos($str,">") > Did not work, beacuse in this I can give onl

[PHP] Re: Shoutcast

2002-05-19 Thread Hugh Bothwell
"Johan EkströM" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Anyone that has knowledge about this program, regarding it's XML output and > php fetching that info and placing it on a php-page for user's to view? Take a look at some of the scripts from http:/

[PHP] Re: job payment.

2002-05-19 Thread Hugh Bothwell
"Jule" <[EMAIL PROTECTED]> wrote in message 02051916383210.28871@localhost">news:02051916383210.28871@localhost... > I got an offer to do some php/mysql design > for a local company, basically what it's going > to be is to take the current Access DB and > make it acessible through a webpage (that

[PHP] Re: Non cachable php for use as an

2002-05-19 Thread Hugh Bothwell
"Henry" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello All, > > I want to return a gif from a php script. I want it to not be cachable > "anywhere" not browsers, proxys etc. Actualy what I want to do is pass an > existing .gif file as the output and do s

[PHP] Re: Restricting image height and width in a message

2002-05-17 Thread Hugh Bothwell
"Jeff Lewis" <[EMAIL PROTECTED]> wrote in message 004e01c1fda3$78a91cd0$76a1a8c0@LEWISJCIT">news:004e01c1fda3$78a91cd0$76a1a8c0@LEWISJCIT... > Currently, people can post links to images in an application I am using but > they can post something outrageous like 1000X800 pixels and it messes thing

[PHP] Re: PHP Tag question

2002-05-15 Thread Hugh Bothwell
"Matthew Walker" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm writing a coding standards document for our programmers, > and I need to know if the 'echo' shortcut PHP tags are always > on, or if we need to assume they might not be on. > > (By echo shortcu

[PHP] Re: PHP and mySQL

2002-05-14 Thread Hugh Bothwell
"City Colleges Of Chicago - Mannheim" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > if there is a booktitle and a quantity chosen, then go to that booktitle and > adjust the quantity in the database. 0) { $query = "UPDATE Book2"

[PHP] Question: overlaying PNG-8 w/ transparency

2002-05-13 Thread Hugh Bothwell
I've been reading through the documentation, and before going further I'll ask if someone's done this before: I'm putting a simple 2d tile-based game together; I have a series of tiles saved as 8-bit PNG images with transparency (the lowest tile has no transparent pixels). I have a bit-vector te

[PHP] Re: Referrals

2002-05-13 Thread Hugh Bothwell
> When you select an item to look at, there is a section named: > > Customers who bought this item also bought: > > blah link one - blah description > blah link two - blah description > > How is this done? Is there a reference to a new db which has the links and > references them from there or do

[PHP] Re: Self Destruct code

2002-05-07 Thread Hugh Bothwell
Keep some vital part of the code separate, ie on your own host... such as the ability to add new users, or the calendar-file for next month, or whatever. Their system works fine, and as soon as they pay they get the last module and are on their own, but if they fail to pay you can pull the plug.

[PHP] Re: Javascript function

2002-05-04 Thread Hugh Bothwell
"Morten Nielsen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > Is it possible to call a function in a javascriptpage from a PHP page? > I have a function, which I use when the user press a button. I would like to > call this function just by typing the n

Re: [PHP] Re: I-worm/Klez and a GIF query/question

2002-05-04 Thread Hugh Bothwell
"Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > On Saturday 04 May 2002 04:58, Hugh Bothwell wrote: > > NOTE that for someone sufficiently persistent, they could still > > pattern-match the generated image to retrieve the number and

Re: [PHP] Re: I-worm/Klez and a GIF query/question

2002-05-04 Thread Hugh Bothwell
"R" <[EMAIL PROTECTED]> wrote in message 001501c1f369$060a52a0$0a6da8c0@lgwezec83s94bn">news:001501c1f369$060a52a0$0a6da8c0@lgwezec83s94bn... > Hey, > Thanks for replying, > Do you by any chance have the code or functions that i can use to do this? > even to output on jpeg should be ok. > Cheers,

[PHP] Re: I-worm/Klez and a GIF query/question

2002-05-03 Thread Hugh Bothwell
"R" <[EMAIL PROTECTED]> wrote in message 007501c1f304$3c1607a0$0a6da8c0@lgwezec83s94bn">news:007501c1f304$3c1607a0$0a6da8c0@lgwezec83s94bn... > at the end of the form he wants a "key" gif...(A gif with a number) > that is automatically generated and that number has to be entered into the > text

[PHP] Re: PHP editing environment

2002-05-03 Thread Hugh Bothwell
"Pag" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Anyone know how i can make my work more efficient? Like install MySQL and > PHP and get everything working normally when i preview the code in internet > explorer, that would be perfect, is it possible? How

Re: [PHP] bumping up hour by one

2002-05-02 Thread Hugh Bothwell
"Tom Beidler" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > My mistake. The correct code that works is; > > $display_time = date("H:i"); > > // round time to nearest 15 minute interval > $display_timex = explode (":",$display_time) ; > if (($display_timex[1]

Re: [PHP] Re: why is better?

2002-05-02 Thread Hugh Bothwell
"Steve Bradwell" <[EMAIL PROTECTED]> wrote in message 57A1618E7109D311A97D0008C7EBB3A1CBB2EA@KITCHENER">news:57A1618E7109D311A97D0008C7EBB3A1CBB2EA@KITCHENER... > Hi, > > Sorry to bud in on this, but I was thinking about writing my next php app > oop style to learn. Are you saying that It is goin

[PHP] Re: Question for you guys on best tools for a job

2002-04-29 Thread Hugh Bothwell
"Michael Champagne" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm not even sure this is possible without doing a client side java applet of > some sort. You might be able to munge something using a hidden frame and Javascript polling, but it would be an

[PHP] Re: Translation Request--Altavista Babelfish can't do it

2002-04-26 Thread Hugh Bothwell
"Vins" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > if(!ereg("^#(.)*$", $buffer[$i])) > { > echo "ok"; > } > > what does this mean? It takes a string ($buffers[$i]) and tries to match it with a regular expression. The expression reads "a string beginni

[PHP] Re: 3dim Array problem

2002-04-19 Thread Hugh Bothwell
> while( $res=$UDV -> getDbAns()) {// fetch mains Just checking: On success, $UDV->getDbAns() returns array of string; On fail, it returns false. > if(strlen($res[0]) > 2) { // if result is OK > $menarr[$h]=$res[0]; // put them in array Here is your problem - you set $menarr[$h]

[PHP] Re: Images don't save

2002-04-18 Thread Hugh Bothwell
"Manu Verhaegen" <[EMAIL PROTECTED]> wrote in message E10E651CDD2DD5118912E8E8C70F5513@compuver01">news:E10E651CDD2DD5118912E8E8C70F5513@compuver01... > Hi, > You can right click on a image on your browser and choose save. > I want to disable this option, how can i do this 1. JavaScript

[PHP] Re: Using one submit button (long, rambling, near-total rewrite)

2002-04-17 Thread Hugh Bothwell
"Jennifer Downey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > I have no takers on this one? You would have more help if you didn't glumph a whole whack of code in... it takes five minutes just to sort out what's what. > if I have on item it is fine. If I have two items it

Re: [PHP] Server-side imagemaps?

2002-04-16 Thread Hugh Bothwell
"Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > on 4/16/02 3:26 PM, Uchendu Nwachukwu at [EMAIL PROTECTED] wrote: > >> Is there anyway I can use server-side imagemaps with PHP? I want to build an >> application that lets people click on a pictur

[PHP] Re: How to send an email to everone listed in a file

2002-04-10 Thread Hugh Bothwell
"Anthony Rodriguez" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > (1) You're going to overload the outgoing mail server. I've done it. Now i > use a newsletter-type mailing list. Sure, if you have more than a few hundred emails this is probably the way to go

[PHP] Re: Sub groups ? - Programming structure...

2002-04-10 Thread Hugh Bothwell
"Gordon Stewart" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, - I'm used (in years gone by) to the Qbasic programme, where i can > create 'sub' routines, & view each routine on its own - Without reference / > Viewing the other code.. (I think its good

Re: [PHP] conditionally including classes/functions

2002-04-05 Thread Hugh Bothwell
> -Original Message- > From: Andrew Warner [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 04, 2002 11:29 AM > To: [EMAIL PROTECTED] > Subject: [PHP] conditionaly including classes/functions > > Is it okay practice to condtionally include php files that contain > only classes or functio

[PHP] Notice: recent FAQ discussions

2002-04-05 Thread Hugh Bothwell
For anyone who may have missed the recent debate: We seem to have come down to two groups: the majority seem to be headed for a web-based searchable FAQ, while a small minority - myself and two or three others - want a succint text-based FAQ to post on the newsgroup at regular intervals. As the

[PHP] suggestions on work-arounds to highlight_file() ?

2002-04-03 Thread Hugh Bothwell
using PHP 4.1.3-dev on WinME, I call $a = "str" . highlight_file("file.php", true); and get a warning, Warning: Wrong parameter count for highlight_file() in myfile.php and *don't* get the highlighted source I want. show_source() does precisely the same thing. The manual says that PH

Re: [PHP] Any ideas on combining arrays????

2002-04-03 Thread Hugh Bothwell
I'm not sure I understand what problem you're trying to solve. It looks something like the number of times a given piece of data occurs per user? Where does the data come from and what are you trying to accomplish? > Need some ideas on combining some arrays > into one! I have array for da

[PHP] PHP FAQ (again) ... we have a plan!

2002-04-03 Thread Hugh Bothwell
I'm getting a bit interested in this; here's how I suggest we proceed. First, we have to agree on the scope of the project. I suggest a small number of FAQs directed at specific subjects (rather than one 5000-line monster); my suggested breakdown follows below. Second, I suggest storing these pe

[PHP] Re: PHP FAQ (again)

2002-04-03 Thread Hugh Bothwell
"Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I saw this mentioned a few times recently, but I'd really like to put out > the call again. > > This group needs an FAQ *specific to this list* which helps new members / > posters integrate seamless

[PHP] Re: $PHP_SELF

2002-04-01 Thread Hugh Bothwell
In php.ini, there is a setting called short_open_tag which controls whether I have a question that could be Apache, could be > php, but I'm so new to this I have to ask: what is > wrong with my code for the form action? Apache > does not recognize the code and gives an error "filename is not va

[PHP] Re: Help with nested if statements, is this possible?

2002-04-01 Thread Hugh Bothwell
... an old C trick: when comparing a variable to a constant, put the constant first, ie if ("Completed" == $payment_status) { } that way, if you accidentally use 'assignment-equals' instead of 'equivalence-equals', you get a syntax error. "Martinahingis" <[EMAIL PROTECTED]> wrote in me

[PHP] Re: Changing black to blue (2)

2002-03-31 Thread Hugh Bothwell
> I have a map of the world with all countries. I have > 250 maps of the same size as png where only one > country is black, rest is transp. > Now I neeed to set this country color to blue or red > to indicate a special spot. > I just don't want to save the same map double or tripple. Good! Make

[PHP] Re: Disabling the Back Button?

2002-03-30 Thread Hugh Bothwell
You're asking the wrong question. 'Disabling the back button' changes the expected behaviour of the browser and as such is an *EVIL* thing to do, roughly on par with driving the wrong way down one-way streets or spray-painting your neighbor's cat. What you want is to 'prevent the user from acces

[PHP] Re: Nead Help With A Php Script

2002-03-30 Thread Hugh Bothwell
Aaargh! typo... > if(!session_is_registered("username")) "])) { should be if(!session_is_registered("username")) { -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Nead Help With A Php Script

2002-03-30 Thread Hugh Bothwell
> I need a php script that checks if the there is a > cookie set with the users username and if not it > brings you to an other page and telling you that > you are not loged in! (a) Don't cross-post all over. (b) Cookies 'automagically' become global variables, so a simple version is

[PHP] Re: problems trying to use PHP to choose CSS

2002-03-30 Thread Hugh Bothwell
> I am trying this method: Register a global variable ($CSS) using a FORM. > [snip] > I wonder if I am not doing something stupid/overlooking something obvious, > but I am very new @ PHP so that is possible. > > // in my global PHP file > > // Now what I am trying to do here is set a default that

[PHP] Re: changing the color from black to blue on an image. Help on imagecolorset.

2002-03-30 Thread Hugh Bothwell
"Andy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi there, > > I would like to change the color on a png file from black > to blue. This png file is transparent and contains only a > spot which is black. It is needed to stay transparent > because I am gon

[PHP] Re: Has anyone written such a function?

2002-03-30 Thread Hugh Bothwell
(shrug) convert to unixtime, subtract, and reformat In fact, you could do the conversion and subtraction in your SQL query, returning just 'elapsed seconds since date', and reformat from there. > I need a function that will get a date in the past and return how much > time has passed since that

[PHP] Re: OT - representing data

2002-03-29 Thread Hugh Bothwell
How about a hierarchical tree? Strip the common precursor stuff ([http[s]://][www.]) and proceed from there, splitting on '.', '/', '?' and '&'. I would also put a Yahoo-style split-level back-out link on the page, ie [nandotimes].[com]/[news]/[current]/ article2001.html(1 re

[PHP] Re: Is this code safe?

2002-03-28 Thread Hugh Bothwell
"Richard Ellerbrock" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > $result=mysql_query("DELETE FROM customer > WHERE customer=$cust", > $ds) and > $result=mysql_query("DELETE FROM custinfo > WHERE customer=$cust

[PHP] Re: Advice needed

2002-03-23 Thread Hugh Bothwell
Actually, it looks pretty straight-forward: "; } function add_price_point($num, $price) { global $points, $prices; // this saves us from div-by-0 and automatically // discards invalid quantities if ($num < 1) return; $per = $price / $num; foreach($points as $va

[PHP] Re: PHP for 3D scatterplots

2002-03-20 Thread Hugh Bothwell
"Simon De Deyne" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > is there any code for this available yet? > I am looking for a way of plotting gif images of objects > in a 3D space... > > thank you! > Simon Don't know of any offhand, but it doesn't sound all

[PHP] Re: Storing Newsletter in Database

2002-02-19 Thread Hugh Bothwell
"Kevin Old" <[EMAIL PROTECTED]> wrote in message 030701c1b988$cf93df30$0701a8c0@KOLD">news:030701c1b988$cf93df30$0701a8c0@KOLD... > Hello all, > > I have a challenge that has been put on me. I have built a website for my > church and we are now wanting to put our newsletter online. It is curren

[PHP] Re: [PHP-DB] I cant get the logic for this...

2002-02-19 Thread Hugh Bothwell
"; // while there is data... while($row = mysql_fetch_object($res)) { // begin new row if appropriate. // NOTE: Of necessity, I separate this from the // end-of-row test; otherwise, a query returning // an exact multiple of the table width would // result in a table with an em

[PHP] Re: problem with working with dates

2002-02-15 Thread Hugh Bothwell
> but for some reason, no matter what the month, the first if statement > (if current_month = 1) is seen as true and executes... any suggestions? Try using 'equivalence-equals' (==) instead of 'assignment-equals' (=). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

[PHP] Re: How can I open URL using HTTP POST instead of HTTP GET?

2002-02-10 Thread Hugh Bothwell
"Zlutarch G." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi everyone, > > PHP fopen function opens URL using the HTTP GET method. But what if one > could only open the web page using the HTTP POST method? In this case, fopen > won't work. Is there a PHP fu

Re: [PHP] Need high bandwidth provider for my Asian community site

2001-12-16 Thread Hugh Bothwell
"Webleycity" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > If one creates a file outside the web space on a server. How doe's one > connect to this from a HTML or PHP page? > > As I understand it. It is not as simple as normal html link. >From an HTML page

[PHP] Re: Webcam on websites? Ugh!!!

2001-12-16 Thread Hugh Bothwell
"Webleycity" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > A client wants a webcam on his site. Does any body know what script is used > and how it works. The camera should come with a prog to take a snapshot. Write a batch file that takes a snapshot, then

[PHP] Re: time stuff

2001-12-10 Thread Hugh Bothwell
<[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > suppose the date is 12-10-01 > -- > $timestamp = time(); > > //this is the "sent on" date > $yd_expl = explode(':',08-01-01); Uh, better make that ... = explode('-', '08-01-01

[PHP] Re: Redirect function

2001-12-10 Thread Hugh Bothwell
"Steve Osborne" <[EMAIL PROTECTED]> wrote in message 000901c181db$bfca1f40$[EMAIL PROTECTED]">news:000901c181db$bfca1f40$[EMAIL PROTECTED]... > Is there a function or command in php that will redirect a user to another > page, similar to Response.Redirect(URL) in ASP? > header("Location: http://

[PHP] Re: eval on a form

2001-12-10 Thread Hugh Bothwell
"Paul Roberts" <[EMAIL PROTECTED]> wrote in message 000d01c18101$5dbb2220$01f8883e@laptop1">news:000d01c18101$5dbb2220$01f8883e@laptop1... > Hi > > I'm trying to pre-fill a form ( the data is passed via sessions or from > another script). > > i have some check boxes on the form that i would like

Re: [PHP] Store locator / postcode proximity

2001-12-10 Thread Hugh Bothwell
"Rich Buggy" <[EMAIL PROTECTED]> wrote in message 018a01c18160$c463c180$[EMAIL PROTECTED]">news:018a01c18160$c463c180$[EMAIL PROTECTED]... > > I'm wondering if anyone has any information about how to get the > > proximity data for postcodes in Australia? Or is it safe to assume > > that if a post

Re: [PHP] How to compute time to load page...

2001-12-09 Thread Hugh Bothwell
"Alex Shi" <[EMAIL PROTECTED]> wrote in message 006b01c18063$336e9f90$0105050a@pony">news:006b01c18063$336e9f90$0105050a@pony... > Basically I agree with you. But the second time to get time must be done > after the page is rendered on local browser. So I suggest to use Javascript > for the secon

[PHP] Re: Application servers / job priorities ?

2001-10-24 Thread Hugh Bothwell
"Lee" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am developing a portal that will allow users to perform various > calculations on their data sets. These calculations (handled by C / > Fortran programs) will be run as external processes (and may take up

[PHP] Re: cleaning up the uri

2001-09-09 Thread Hugh Bothwell
"Jon Thompson Coon" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I don't want to ask all these silly questions constantly time, but being > lazy overcomes the urge not to do so. > > Having a page somethin/somewhere/index.php?do=this&and=that. This page > doe

[PHP] Re: new to php

2001-09-09 Thread Hugh Bothwell
"Kostis Mentzelos" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > is it possible to create a table that automatically > updates its contents every 30 seconds? I would use JavaScript to make the page reload itself. Note: this could generate a LOT of traffic.

Re: [PHP] Re: Error handling and the usage of "@"

2001-09-07 Thread Hugh Bothwell
"Seb Frost" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > So I should chuck it on all mysql functions? Done. Don't ya just love > search and replacing a whole directory of scripts :-) Still works fine > too - bonus! er... I should have noted - if you are

[PHP] Re: Error handling and the usage of "@"

2001-09-07 Thread Hugh Bothwell
"Seb Frost" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Could someone give me an example of the sort of error handling you put in > your php scripts? Cheers. Should I be preceding every command with @? > Anything where this would be harmful? Just looking

Re: [PHP] Statement Confusion

2001-09-06 Thread Hugh Bothwell
"Pavel Jartsev" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Jordan Elver wrote: > > > > Hi, > > Could any one explain what this statemnt means? > > > > $i = (!$i)?"0":$i; Well, literally, "if not-$i is equivalent to true then $i becomes string "0", otherwi

[PHP] Re: Pulling a random image

2001-09-03 Thread Hugh Bothwell
"Brad R. C." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > But what my goal was is to make it where it goes through all the images > before showing a random twice. ... if you actually want to do this, you will have to keep track of which items you have seen

[PHP] Re: database searching

2001-09-03 Thread Hugh Bothwell
"Melih Onvural" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > i want to randomly choose a column in a database with a quote in it, by the > number of the column. > i have a random seed working, but it won't pull only one column, but all > columns. How can I c

[PHP] Re: EDI with PHP?

2001-09-03 Thread Hugh Bothwell
"Jon Farmer" <[EMAIL PROTECTED]> wrote in message 003f01c1345c$53e385e0$[EMAIL PROTECTED]">news:003f01c1345c$53e385e0$[EMAIL PROTECTED]... > The company I work for is starting to lose contracts because they are not > capable of EDI. As I seem to be the only person in the company who has heard > o

[PHP] Re: how to get all the records of a particular month....

2001-09-03 Thread Hugh Bothwell
"Sagar" <[EMAIL PROTECTED]> wrote in message 001b01c1347e$b58e2580$6dfb7ccb@ravella">news:001b01c1347e$b58e2580$6dfb7ccb@ravella... > I hope some one will solve my problem. > I have a table in which a field is of date type. > i want a mysql query to get all the records of the table > into an arra

[PHP] Re: Database Function

2001-09-02 Thread Hugh Bothwell
"Georgie" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a simple php script that searchs a MySQL database and returns results > that I made myself and I'm trying to implement code that splits the results > into x amount of pages, buts it really tricky.

Re: [PHP] number to word converter

2001-08-31 Thread Hugh Bothwell
Here is a slightly more readable number-to-English converter. It will deal with negative numbers and recognizes zero; it's table-driven, so it shouldn't be too hard to convert to other languages. It will convert anything in +/- 10^30. This should be pretty comprehensive; if not, extend the trip

[PHP] Re: Random number

2001-08-30 Thread Hugh Bothwell
"Rosen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > I'm using PHP code from manual: > srand( (double) microtime() * 100); > // Get random User ID > $uid=rand(); > > but it dowsn't work ! ... I would make sure that microtime() is doing what you th

[PHP] Re: Databases, arrays and woes

2001-08-30 Thread Hugh Bothwell
"Kath" <[EMAIL PROTECTED]> wrote in message 015301c13156$2c273500$[EMAIL PROTECTED]">news:015301c13156$2c273500$[EMAIL PROTECTED]... > I have a MySQL table which stores information like this: > > | Type | Place Name | Place Abbrv | > > and lets say I have data in the table like: > > Example #1: >

[PHP] Re: If-statement

2001-08-29 Thread Hugh Bothwell
"Niklas lampén" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is it possible to write this shorter: > > if ($Var != "No1" && $Var != "No2" && $Var != "No3") { > code > }; $badValues = array("No1", "No2", "No3"); if (!in_array($Var, $badValues)) { cod

[PHP] Re: script preprocessor?

2001-08-29 Thread Hugh Bothwell
<[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Is there a macro preprocessor that can be used to substitute arbitrary > sections of code with different code? define is documented as working > for rvals only and my attempts to produce something more meaty

[PHP] Re: double check query statement??

2001-08-28 Thread Hugh Bothwell
"Gerard Samuel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > $query = "SELECT mpn_job.ID, job, assigned_to, status_date, category"; > $query .= "FROM mpn_job, mpn_job_category WHERE CID = > mpn_job_category.ID"; > $query .=

[PHP] Re: Developer

2001-08-28 Thread Hugh Bothwell
"Vincent - D. Ertner" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi phpers, > > I'm looking for a PHP Developer ... what is probably the > best way to go for it? General procedure is to give a rough sketch of what you want to accomplish, what development

[PHP] Re: What is it with _vti?

2001-08-26 Thread Hugh Bothwell
"Seb Frost" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have these _vti_pvt _vti_cnf directories on my website. Why? I never put > them there... can I delete them? > > I tried searching for this but it's impossible to search for since it seems > a lot o

[PHP] Re: How to show specific records of a Dbase file

2001-08-26 Thread Hugh Bothwell
"Er GalvãO Abbott" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > foreach ($drec as $nome) > { > echo "$nome"; > } > But I'm trying (unsucessfully) to show only one or two fields of each > records.. Instead of foreach(), try something like echo $drec[0]

Re: [PHP] & help

2001-08-25 Thread Hugh Bothwell
"Tyler Longren" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > On Sat, 25 Aug 2001 15:03:49 +1000 > "GaM3R" <[EMAIL PROTECTED]> wrote: > > > can anyone explain to me exactly what this would do differently? > > > > $data = fread($fp, filesize($file)); > > > >

Re: [PHP] $i % 2 ? 0:

2001-08-25 Thread Hugh Bothwell
"Mike Cullerton" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > it's an if/else shortcut. > > the part before the '?' is tested. '$i % 2' in your case. > > the part after the '?' is returned if the test evals to true. '0' in your > case. Documentation at http

[PHP] Re: sizeof(int)

2001-08-25 Thread Hugh Bothwell
"Saurabh Kapoor" <[EMAIL PROTECTED]> wrote in message 001901c12d63$b1b62100$9e2823d9@killer666">news:001901c12d63$b1b62100$9e2823d9@killer666... > I am a C programmer, looking to migrate some code to PHP (Unusual, but my > colleagues request it). > > Can someone tell me the size (in bytes) of the

[PHP] Re: global variable.

2001-08-25 Thread Hugh Bothwell
"Nafiseh Saberi" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > hi. > > I want to use glabal variable. > > global $a; > > ?> > but it doesnot work?? ... why do you think you need to use global here? global is used *in a function* to let it see external va

[PHP] Re: Timestamps operations

2001-08-24 Thread Hugh Bothwell
"Alberto" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have 2 timestamps like mktime(0,0,0,10,10,2001) and > mktime(0,0,0,9,9,2001), I want to know how many days are from timestamp1 to > timestamp2 or how many hours, or how many seconds, thnx define("SECO

[PHP] Re: How to download a picture thru http://?

2001-08-24 Thread Hugh Bothwell
"Tamas Bucsu" <[EMAIL PROTECTED]> wrote in message 012c01c12c8b$49cf6750$1100020a@domain1">news:012c01c12c8b$49cf6750$1100020a@domain1... > Is there any special way to get some pics from > the web? Cos' what I wrote just does not work. > Thanks > > > if (file_exists($kepnev)){ > > $kepnev="http:

  1   2   >