Re: [PHP] Code for off-site Maintenance?

2002-08-21 Thread Martin Clifford
Good comments made by all, no doubts. Something said by Justin though, sticks out above the rest. I strongly recommend to everyone to never, EVER edit or manipulate LIVE code! I know we're all good at what we do, but accidents happen (perhaps you didn't specify a WHERE clause in your delete

[PHP] Re: passing variable via url ( newbye question)

2002-07-31 Thread Martin Clifford
Because you HAVE to use it if you have register_globals OFF. Only when register_globals is ON can you do what you thought is more efficient, but isn't. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Lord Loh. [EMAIL

Re: [PHP] select multiple

2002-07-31 Thread Martin Clifford
explode() with the same arguments (although replace array with the comma_seperated string) to go back to an array. HTH! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ [EMAIL PROTECTED] [EMAIL PROTECTED] 07/31/02 08:56AM Hello, i

Re: [PHP] Disabling Browser BACK button

2002-07-31 Thread Martin Clifford
the back button without getting mishapen results, then it doesn't sound as if the site is designed very efficiently. Just my opinion. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Petre [EMAIL PROTECTED] 07/31/02 01:16PM HI

Re: [PHP] String Question

2002-07-31 Thread Martin Clifford
the data should be retrieved. 1st loop: 0-7 (8 elements) 2nd loop: 8-15 (8 elements) 3rd loop: 16-23 (8 elements) 4th loop: 24-26 (3 elements) Let me know how it works out for you :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums

[PHP] A Fond Farewell

2002-07-31 Thread Martin Clifford
this last mail. Against my will, no doubt, but leaving just the same. Take care, everyone, and as always... Happy Coding! :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ -- PHP General Mailing List (http://www.php.net

Re: [PHP] passing variable via url ( newbye question)

2002-07-30 Thread Martin Clifford
http://myaddress/php/mypage.php?modo=123color=redsize=3 Just separate name/value pairs with ampersand (). HTH Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Saci [EMAIL PROTECTED] 07/30/02 04:09PM I can pass one variable

Re: [PHP] Array variable in Javascript PHP

2002-07-29 Thread Martin Clifford
element. That string is then passed to the PHP page, where it can be parsed (ala implode/explode) and put into a new array. I hope that made some sense :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Sheni R. Meledath [EMAIL

Re: [PHP] Help Please

2002-07-29 Thread Martin Clifford
You can't send headers after the page has left the server. If you try to write to the HTML file in ANY way, even a hard return in your code, then you are telling the server that the headers have been completed and should be sent to the client (browser). Martin Clifford Homepage: http

Re: [PHP] OT - javascript question..

2002-07-29 Thread Martin Clifford
?php echo body onunload=\opener.window.location='$PHP_SELF';\\n\n; ? Something similar will work fine. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Kelly Meeks [EMAIL PROTECTED] 07/29/02 04:00PM Sorry for the off topic

Re: [PHP] Help Please

2002-07-29 Thread Martin Clifford
That will produce the same error as before, since a hard return was entered before the parser began it's work, therefore finishing the headers and sending the data to the client for rendering. Hope this clears something up :o) Martin Clifford Homepage: http://www.completesource.net

Re: [PHP] Help Please

2002-07-29 Thread Martin Clifford
Copy and paste the code (minus and indisclosurables) and we can take a look at it :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Varsha Agarwal [EMAIL PROTECTED] 07/29/02 04:27PM Hi, I did not find any print or echo

Re: [PHP] How can I get my session variable to pass to anotherpage?

2002-07-26 Thread Martin Clifford
You have to have session_start() in each page in order to carry over session variables. :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ DonPro [EMAIL PROTECTED] 07/26/02 04:06PM Hi, I have a form that calls a PHP script

RE: [PHP] php redirect

2002-07-26 Thread Martin Clifford
are going to use the header() function without output buffering, then it should be just like this: --top of text editor ?php header(Location: blah.php); ? -- End of text editor Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums

Re: [PHP] (newbie) questions abot vars and args

2002-07-26 Thread Martin Clifford
1) To echo the variables name instead of it's value, surround it instead by single quotes, not double. echo '$var' OUTPUTS $var echo $var OUTPUTS the contents of $var 2) Checkout the func_get_args() function. http://www.php.net/manual/en/function.func-get-args.php HTH! Martin

Re: [PHP] still on sessions

2002-07-26 Thread Martin Clifford
I always just register an extra variable to track logged in users. If the user has logged in, it is set to TRUE, if not, FALSE. Then I just do comparisons on that variable. ?php session_start() if($loggedin == FALSE) { header(Location: login.php); } ? Something along those lines.

Re: [PHP] PHP Meetup, how many of you have signed up?

2002-07-25 Thread Martin Clifford
if you haven't all! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Jay Blanchard [EMAIL PROTECTED] 07/25/02 10:15AM Top 10 Locales -- Washington DC (9 members) Amsterdam (7 members) Leeds, UK (7 members) London, England (7

Re: [PHP] pulling records from mysql

2002-07-25 Thread Martin Clifford
You would need to use SQL to identify which columns and rows you need to retrieve, then use various MySQL PHP functions to gather the information. For your two queries, they would appear thus, respectively: SELECT firstname FROM tablename WHERE id=16 and SELECT firstname FROM tablename ORDER

Re: [PHP] Paying Job...

2002-07-25 Thread Martin Clifford
resists the urge to debate ethics Why didn't you just say, Charge by whichever will screw the client the worst.? Jesus. Martin Tyler Longren [EMAIL PROTECTED] 07/25/02 11:44AM Charge by which ever will get you the most money. tyler On Thu, 25 Jul 2002 11:46:38 -0400 Gerard Samuel [EMAIL

Re: [PHP] pulling records from mysql

2002-07-25 Thread Martin Clifford
Yes, that will indeed return the rows specified, but the result is very unstable. By it's nature, MySQL does not have to conform to any sorting method unless you specify it. So it's very good practice when retrieving multiple rows to ALWAYS order them. Just my thoughts :o) Martin Tech

Re: [PHP] Re-directing

2002-07-24 Thread Martin Clifford
: index.php); ? That would do the trick. But like I said, once the parser begins to write HTML to the browser, then you can no longer send HTTP headers. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Roberts, Mark [EMAIL PROTECTED] 07

Re: [PHP] Re-directing

2002-07-24 Thread Martin Clifford
Awesome! Learn something new everyday! That's why I love this list :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Chris Sharkey [EMAIL PROTECTED] 07/24/02 11:01AM Well you can actually, If you start your script

Re: [PHP] PHPMyAdmin interface

2002-07-24 Thread Martin Clifford
, but it did... sorry for the length :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ [EMAIL PROTECTED] 07/24/02 12:46PM I have just recently just signed up for virtual hosting with a MySQL database. They do not have a PHPMyAdmin

Re: [PHP] MySQL Backup and Restore

2002-07-24 Thread Martin Clifford
With phpMyAdmin, just scroll down until you see the dumping section. Select the appropriate information, tick the save as file box, then Go. It'll prompt you to save the file. You just use that file, then, as a query to your next database. Martin 1LT John W. Holmes [EMAIL PROTECTED]

Re: [PHP] Help with msql_fetch_array()

2002-07-24 Thread Martin Clifford
Shouldn't it be: $result = mysql_query($sql, $link_id); PHP will be quick to tell you that there is a missing link identifier in the mysql_query() call. It's happened to me plenty of times. HTH! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http

Re: [PHP] Hitting return in a textarea box...

2002-07-24 Thread Martin Clifford
I've never had a problem with this. Even using a textbox with only the required parameters works fine as far as hitting the return key to get a newline. If you're talking about hitting the return key to submit, that's something else entirely, hehe. Martin Clifford Homepage: http

Re: [PHP] Help with msql_fetch_array()

2002-07-24 Thread Martin Clifford
It is on whatever installation my host is running :o) I know it's 4.x, though I should really make them upgrade. Phillip S. Baker [EMAIL PROTECTED] 07/24/02 02:34PM At 11:26 AM 7/24/2002 Wednesday, Martin Clifford wrote: Shouldn't it be: $result = mysql_query($sql, $link_id); Actually

Re: [PHP] control structure question

2002-07-23 Thread Martin Clifford
. Hope that helps! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Javier Montserat [EMAIL PROTECTED] 07/23/02 10:03AM is there a more programmatically elegant way of saying... $isError = ; function main() { doStep1

Re: [PHP] Using PHP with MySQL - Can I supress MySQL errors?

2002-07-23 Thread Martin Clifford
Put an ampersat symbol (@) in front of the function name to suppress errors. $link = @mysql_connect(host, user, pass); Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ DonPro [EMAIL PROTECTED] 07/23/02 12:08PM Hi, I'm using

Re: [PHP] PHP creating table for HTML layout

2002-07-23 Thread Martin Clifford
PHP is server-side, so it can't do anything that would help with the layout of HTML on the client-side. You might want to look into Cascading Style Sheets (CSS) to format the page so that it validates the way you want it to :o) HTH! Martin Clifford Homepage: http://www.completesource.net

[PHP] Re: Using Javascript

2002-07-22 Thread Martin Clifford
Just my opinion, but it is ALWAYS a good idea to terminate statements with semicolons, no matter if there is or isn't additional statements. But thanks Chris for at least using standardized HTML coding practices. I can't stand it when I see tags and the like that don't cooperate with

Re: [PHP] Newbie's question about \n

2002-07-22 Thread Martin Clifford
regards, KK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do You Yahoo!? Yahoo! Health - Feel better, live better Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http

Re: [PHP] What does register_globals do?

2002-07-22 Thread Martin Clifford
variable types. I'm sure there's a much better way to explain it, but it works for me :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Matt Babineau [EMAIL PROTECTED] 07/22/02 03:59PM I have never had a clear understanding

RE: [PHP] What does register_globals do?

2002-07-22 Thread Martin Clifford
unless defined otherwise was what I said. When I said that, I simply meant that you declare the variables as global within the function and/or class. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Matt Schroebel [EMAIL

[PHP] Re: Arrays and Regs

2002-07-19 Thread Martin Clifford
Firstly, many thanks to Richard and Dan... A quick test script in PHP would have been faster than asking... :-) It was just one of those questions that I had burning in my mind at the time, and since I don't have access to PHP at work (As if the Government would allow that!), I had to ask :o)

Re: [PHP] Check for Associative Array

2002-07-18 Thread Martin Clifford
Try this: while($row = mysql_fetch_assoc($result)) { // code here } This way, the resulting array will ONLY be associative. HTH! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Henning Sittler [EMAIL PROTECTED] 07/18/02

Re: [PHP] Check for Associative Array

2002-07-18 Thread Martin Clifford
Oh well. And HTH means Hope to Help. For some unknown reason the OP specifically does not want to use mysql_fetch_assoc()! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ -- PHP General Mailing List (http://www.php.net

Re: [PHP] spawning scripts to different graphical targets

2002-07-18 Thread Martin Clifford
= screen.height; var width = screen.width; document.location = index.php?height= + height + width= + width; } body onload=getScreen(); :babbles on and on and on...: Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Alberto

[PHP] Arrays and Regs

2002-07-18 Thread Martin Clifford
reason, hehe. Any help would be great! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $HTTP_SESSION_VARS ? Have I got it wrong

2002-07-17 Thread Martin Clifford
Define the value of $count before registering it, and it should work fine :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Henry [EMAIL PROTECTED] 07/17/02 10:14AM The answer is probably yes. I do a session_start

Re: [PHP] $HTTP_SESSION_VARS ? Have I got it wrong

2002-07-17 Thread Martin Clifford
Ignore that, I'll just go grab my copy of Hooked on Phonics so I can learn to read before replying. :trots off: Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Martin Clifford [EMAIL PROTECTED] 07/17/02 10:15AM Define

Re: [PHP] querying for one specific row number

2002-07-17 Thread Martin Clifford
certain columns from the row, then list those columns in place of the wildcard. SELECT first_name, last_name FROM table WHERE id=1 LIMIT 1 HTH! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Phil Schwarzmann [EMAIL PROTECTED] 07

[PHP] Of Jobs and Certs

2002-07-17 Thread Martin Clifford
to do it as a career. I just don't know where the hell to start, and I know that some of you might be able to offer some advice in this area. Thanks in advance! This is very important to me, so I thought I'd ask the people that would know best :o) Martin Clifford Homepage: http

Re: [PHP] $_SESSION - autostart, or session_start() ?

2002-07-17 Thread Martin Clifford
to the browser (the comment line), which is after the HTTP headers have already returned from the server. HTH Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Matt Babineau [EMAIL PROTECTED] 07/17/02 11:20AM If I set the SESSION

Re: [PHP] how to access javascipt variables in PHP

2002-07-17 Thread Martin Clifford
You can blend the two... sort of. script language=javascript !-- hide me function checkWidth() { var width = screen.width; var height = screen.height; document.location = filename.php?width= + width + height= + height; } //-- /script body onload=checkWidth(); I'm not aware of any

RE: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Clifford
), then those two properties can be readily accessible to any method within the class. At least I think that's how it works. I'm not all that knowledgeable on the subject :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Jay

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Clifford
to it's make and model, using the methods setMake and setModel. I'm sure this is right, but I'm sure I'm probably wrong (hehe, confused?). I'm also sure someone will correct me if I am! :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Clifford
with the procedural side of things (using functions). It's all a matter of preference, and just yet I haven't decided which is more useful :o) Good luck! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Chris Crane [EMAIL PROTECTED

Re: [PHP] strange beahaviour with a mysql query in php

2002-07-16 Thread Martin Clifford
If you only want to update the row if it exists, then you need to use a WHERE clause to make sure it does exist. Blah blah blah WHERE row_id='$id' LIMIT 1 might work. I'm lazy and didn't want to retype what you had. :o) Martin Clifford Homepage: http://www.completesource.net Developer's

Re: [PHP] Exit script early

2002-07-16 Thread Martin Clifford
RTFM re: Exit and Continue. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Michael Zornek [EMAIL PROTECTED] 07/16/02 01:08PM Ok, So I'm creating a details.php page where I'm expecting the url to be something like

Re: [PHP] I can't echo object variables

2002-07-16 Thread Martin Clifford
Try enclosing it in curly braces. echo p${db-field('name_long')}; Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Michael Zornek [EMAIL PROTECTED] 07/16/02 01:45PM We all know this works: echo p$someVar; However this does

Re: [PHP] Is there a way?

2002-07-16 Thread Martin Clifford
It's called here doc formatting, and follows the pattern below: $chunk = EOF; // stuff here EOF; Hmm. For some reason that just doesn't look right. I'm sure someone will correct it if I'm wrong though :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http

Re: [PHP] Session and output buffering

2002-07-16 Thread Martin Clifford
if you include those in your message so that we might be able to deduce the error from it's cryptic nature :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Divyank Turakhia [EMAIL PROTECTED] 07/16/02 02:46PM I have set

Re: [PHP] Newbie Question on Efficiency

2002-07-16 Thread Martin Clifford
Unless the file is getting retartedly big (10-20K), then I wouldn't separate them. Though if you have enough functions, you could justify making separate files for your database functions, output functions, backend functions, etc. Martin Clifford Homepage: http://www.completesource.net

[PHP] Re: Good Forum...

2002-07-15 Thread Martin Clifford
a sample of what it can do in the forums link below. Good Luck! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ [EMAIL PROTECTED] 07/15/02 06:26AM phpbb is a good forum or phorum both are free to use :) i hope you can use one

[PHP] Alley-OOP! ... or not?

2002-07-15 Thread Martin Clifford
about the Pros and Cons to OOP, and why you prefer to use it/not use it! Personally, I've always used regular functions to accomplish my repetetive tasks, and OOP seems rather daunting for me, but I'm always open to new (and hopefully, more efficient) ideas! Thanks! Martin Clifford Homepage

Re: [PHP] newbie: mysql statement

2002-07-15 Thread Martin Clifford
of the posted column equals itself, thereby being the latest date. Just an idea. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Alexander Ross [EMAIL PROTECTED] 07/15/02 02:56PM I want to update the most recent record (based

Re: [PHP] newbie: mysql statement

2002-07-15 Thread Martin Clifford
You're right Andrew, got a little ahead of myself :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Andrew Brampton [EMAIL PROTECTED] 07/15/02 03:23PM Shouldn't this be UPDATE header SET parent='$this-parent' WHERE posted

[PHP] [PHP-DB] RE: PHP meetup [CROSS-POST] Meet other PHP Developersin Your Area

2002-07-15 Thread Martin Clifford
Yes, everyone please join up! I would love to find more developers in the Maryland area, and I'm sure others would in their areas as well! Let's do the great american get togeth... err... the great php get together! Martin Clifford Homepage: http://www.completesource.net Developer's Forums

Re: [PHP] ^k ? -- how do I match that?

2002-07-15 Thread Martin Clifford
Just try eregi_replace(\^k[.+], , $container); Regular expressions are the MASTERS of the INTARWEB! :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Jimmy Brake [EMAIL PROTECTED] 07/15/02 04:32PM Hi! I keep getting

Re: [PHP] A question of style ...

2002-07-12 Thread Martin Clifford
my $20.00 (big mouth, you know) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Jay Blanchard [EMAIL PROTECTED] 07/12/02 09:40AM Howdy group, Over the past couple of days I have come under some fire for my style of coding

Re: [PHP] ' giving problem while inserting in table.

2002-07-12 Thread Martin Clifford
Use addslashes() on ALL strings before inserting them into your database. Then, on your frontend, extract the data and use stripslashes() on all strings. Hope to help! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Anil

Re: [PHP] Final Year Computer Science Project involving PHP

2002-07-12 Thread Martin Clifford
that find solutions? That could be anything from a Weight Loss Tracking System to an advanced encryption/decryption algorithm. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Serdar Sokmen [EMAIL PROTECTED] 07/12/02 11:14AM Hi

RE: [PHP] PHP meetup

2002-07-12 Thread Martin Clifford
to pass! :o) I emplore all PHP Developers to sign up for MEETUP. You have nothing to loose, and everything to gain! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Jay Blanchard [EMAIL PROTECTED] 07/12/02 11:48AM [snip] Want

RE: [PHP] Development Tools

2002-07-11 Thread Martin Clifford
I usually always have my content dynamically generated by functions, or displayed in include files. I'm not a fan of cluttering up my apps with content. Martin Clifford http://www.completesource.net (Now Open!) Lazor, Ed [EMAIL PROTECTED] 07/10/02 05:38PM I am too. I've developed

Re: [PHP] Newbie Logical opertaor question

2002-07-11 Thread Martin Clifford
You'd have to separate it like so: if($var1 == 1 AND ($var2 == a OR $var2 == b OR $var2 == c) { // do stuff here if true } else { // do stuf here if false } HTH Martin Clifford http://www.completesource.net (Now Open!) Rw [EMAIL PROTECTED] 07/11/02 09:11AM I have been trying

Re: [PHP] Newbie Logical opertaor question

2002-07-11 Thread Martin Clifford
Fixing the below, since it would produce a parse error (I forgot a parenthesis, hehe) Martin Clifford http://www.completesource.net (Now Open!) Martin Clifford [EMAIL PROTECTED] 07/11/02 09:29AM You'd have to separate it like so: if($var1 == 1 AND ($var2 == a OR $var2 == b OR $var2 == c

[PHP] Re: Customise Index page using PHP????

2002-07-11 Thread Martin Clifford
The easiest way to accomplish that is by using switches. Here is an example: switch($pageid) { default: include(default_page.inc); break; case 18: include(page_18.inc); break; } With that in your index.php page, it will look for the variable $pageid, and

Re: [PHP] Re: session error ... I think

2002-07-11 Thread Martin Clifford
When you request a page, for instance, php.net, your web browser sends HTTP headers to the server that holds php.net on it. When the server receives these HTTP headers, it knows which page is needed, and sets up it's own headers to send back to the browser, such as location, file types, etc.

Re: [PHP] Newbie continued..wrong datatype

2002-07-11 Thread Martin Clifford
As far as I'm aware, the first argument to the in_array() function is the needle (what you're searching for) and the second is the array to be searched through (the haystack). So if $type represents what you're searching for, then it would be written as: in_array($type, $CheckArr); If you

RE: [PHP] MAIL() Trouble. Need your eyes.

2002-07-11 Thread Martin Clifford
I would think that there would only be a limit on the SMTP server that the mail function sends the mail through. I'm no expert on the subject though, just makes sense. :o) Martin Clifford http://www.completesource.net (Now Open!) Shane [EMAIL PROTECTED] 07/11/02 02:42PM Nope, no luck

Re: [PHP] Now a Question for all you ARRAY Junkies

2002-07-10 Thread Martin Clifford
Since it's not an associative array, you can just use sort($Lang); and that should work just fine. Martin vins [EMAIL PROTECTED] 07/10/02 08:36AM I have an array $Lang = array('English','German','French','Zulu'); I want it in alphabetical order do i reset the arrray first or usort it

Re: [PHP] Display criteria

2002-07-10 Thread Martin Clifford
You're gonna have to give me quite a bit more to go on than that. What are you using to store the data? An array, flatfile, database, etc? Also, we're not really all about telling you what code you need, as much as helping you to find the answer (without GIVING the answer), you know? At

Re: [PHP] cookies

2002-07-10 Thread Martin Clifford
Set the cookies expiration to a date that has already passed. The cookie will only last until the browser is closed, since the browser must have just created it. Then it's deleted from the computer since it's past due. Martin Alexander Ross [EMAIL PROTECTED] 07/10/02 09:43AM How can I set

Re: [PHP] if syntax

2002-07-10 Thread Martin Clifford
There are no brackets necessary if you only have one line of code to be executed in the case. For example: if($var == 1) echo Var equals 1; } else { echo Var does not equal 1; } But this is not valid: if($var == 1) echo Var equals ; echo 1; } else { } HTH Martin

Re: [PHP] sessions

2002-07-10 Thread Martin Clifford
Hi Alexander :o) You have to have session_start() at the top of EACH page that will hold session registered variables. So just rewrite it like this: Page 1: ? session_start(); $test_var = froggy; session_register('test_var'); ? a href=page2.phpClick here/a Page 2: ? session_start(); print

Re: [PHP] Development Tools

2002-07-10 Thread Martin Clifford
I use the almighty Notepad for my coding. When I'm at home, however, I typically use Macromedia Homesite 5 (simply because it has PHP syntax highlighting). I tried using PHPEdit, but I thought it was horrible. It was buggy, and annoying. PHP Master Editor is VERY good, and you can probably

Re: [PHP] Development Tools

2002-07-10 Thread Martin Clifford
Exactly. Homesite is, in essence, Dreamweaver MX without the WYSIWYG. Syntax highlighting and code completion make it a very viable editor. I can't stand that WYSIWYG crap. I'm plenty good at messing up my own code without assistance, thank you very much! :o) Martin Bret L Conard [EMAIL

Re: [PHP] Accessing multiple List/Menu values

2002-07-10 Thread Martin Clifford
Have you tried like this? select name=list[] size=5 multiple option value=yahooYahoo!/option ... option value=phpnetPHP.net/option /select Then access the array on the processing page. Martin Joseph Szobody [EMAIL PROTECTED] 07/10/02 02:02PM This is sorta OT, but involves PHP.

Re: [PHP] Automatic Form creation

2002-07-10 Thread Martin Clifford
That all depends on what the form is for, what it has to do, how many fields it needs, etc. You'd be better off writing a function to create your forms, if you ask me. Just my $20.00 (big mouth) Martin CM [EMAIL PROTECTED] 07/10/02 01:14PM Are there any php scripts or classes that do

Re: [PHP] SQL field problem

2002-07-10 Thread Martin Clifford
SELECT DISTINCT kat FROM tablename; should work. Martin [EMAIL PROTECTED] 07/10/02 01:40PM Hello I have a problem with mysql.I create a table with a field kat.In this field are entries like this : Light Dark Dark Light Robot Find Dark Light You see that all entries are not unique.So i

[PHP] Re: Forms not passing variables

2002-07-10 Thread Martin Clifford
Did you restart your server after changing register_globals? Try that. Derick Rethans [EMAIL PROTECTED] 07/10/02 02:30PM Hai, did you check the setting of register_globals really changed? See the phpinfo(); output if it's really set to on. If not, place your php.ini file in the correct

[PHP] Re: Development Tools

2002-07-10 Thread Martin Clifford
Homesite (at least version 5.0) has support for more languages than DW4. Though I believe in DW4 you can customize the syntax highlighting to match any languages that *aren't* supported. I love Homesite 5. Not to mention that it runs a lot faster than DW because it doesn't have to load as

Re: [PHP] Dumb session / cookie / password questions

2002-07-10 Thread Martin Clifford
information was sent to the page from the $_GET superglobal, and if it was, reload the page without any URL extensions. It sounds good in theory, though I haven't tested it, so it might not work as I think it should (it NEVER does!). My $20.00 (big mouth) Martin Clifford http://www.completesource.net

Re: [PHP] newbie: question about question marks

2002-07-09 Thread Martin Clifford
. Hope that wasn't too jumbled. :o) Martin Clifford http://www.completesource.net (Now Open!) Alexander Ross [EMAIL PROTECTED] 07/09/02 09:54AM How bout the question marks in the following line of php generated html: input type = hidden name = parent value = ?=$parent;? what do they mean

Re: [PHP] Build-up of MySQL Sessions

2002-07-09 Thread Martin Clifford
My advice is to use mysql_connect(). The only instance I would consider using mysql_pconnect() would be if I had to access multiple databases and servers at the same time. Martin SpamSucks86 [EMAIL PROTECTED] 07/09/02 10:26AM I'm running windows 2000 and the latest releases of PHP and

Re: [PHP] can I call a variable... using variables?

2002-07-09 Thread Martin Clifford
You would have to set up a dummy variable to hold the value of two concatenated variable names. I'd love to write an example, but work is draggin' me down, sorry! Martin Joseph Szobody [EMAIL PROTECTED] 07/09/02 02:12PM So here's what I'm trying to do: I have a form submitting dozens of

Re: [PHP] ??????????????????????????????????????????????????????````````````````````ØØØØØØØØØØØØØØØØØØÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ

2002-07-09 Thread Martin Clifford
Dear Lord, where is the admin to boot this guy? Martin Erik Hegreberg [EMAIL PROTECTED] 07/09/02 03:25PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HTTPS vs. HTTP ?

2002-07-08 Thread Martin Clifford
How do you know their certificate hasn't been stolen, and they haven't even figured it out yet? How do you know they were trustworthy people in the first place? Why do you ASSUME that they're NOT trustworthy people? Do you go through your entire life in that shell? The more I think about

Re: [PHP] phpBB Info

2002-07-08 Thread Martin Clifford
I'm sure there is a phpBB specific userbase out there that could answer this question for you. My guess would be... I don't know, something like http://www.phpbb.com. Martin BrettM [EMAIL PROTECTED] 07/06/02 12:35PM I wanna be able to do some stuff, which involves getting data from my

Re: [PHP] hide a select tag

2002-07-08 Thread Martin Clifford
Just create a hidden form field with the value you want to pass. input type=hidden name=name value=value to pass / HTH Martin Anil Garg [EMAIL PROTECTED] 07/08/02 01:35PM Hi, sorry for going a lil out of way of php. can i hide a drop down menu.(as i always want to pass the default value

Re: [PHP] Checking for a successful login and setting a globalflag.

2002-07-08 Thread Martin Clifford
No need to open a new window to reset the cookies. Just have a function that is trigged onunload(). Martin Pete James [EMAIL PROTECTED] 07/08/02 03:18PM You could also try using Javascript to popup a window when they close the current one, and reset your cookies (and/or destroy your

Re: [PHP] UNSETing Session Variables

2002-07-08 Thread Martin Clifford
You only have to register the session variables once. If you need to register the same variables again (such as for a different user), then you should use session_destroy() before registering the variables again. The variables should be available throughout your pages as long as

Re: [PHP] localhost - passing variables

2002-07-05 Thread Martin Clifford
If you're using one of the more recent releases of PHP4+, then register_globals is set to OFF by default in your php.ini file. Change this to ON or use $_GET['variable']/$_POST['variable'] to access the values. Martin Tony Tzankoff [EMAIL PROTECTED] 07/05/02 12:43PM Is it possible to pass

Re: [PHP] How do I split an alphabetical list (array) into A-Mand N-Z?

2002-07-03 Thread Martin Clifford
Try using a regular expression to go through each of the array elements, sending to one array if the first letter is [a-mA-M], to another if the first letter is [n-zN-Z]. If you're not searching by first letter in the array elements, and they are comma-delimited name sets, do it that way.

Re: [PHP] V basic newbie problem

2002-07-03 Thread Martin Clifford
while($row = mysql_fetch_array($result_set)) { $field1 = $row['field1']; $field2 = $row['field2']; echo trtd width=\50%\\n; echo $field1\n; echo /tdtd width=\50%\\n; echo $field2\n; echo /td/tr\n; } This will cycle through the rows, adding the values of field1 and field2 to

[PHP] Another Regex Question (General)

2002-07-03 Thread Martin Clifford
This may sound like a stupid question, but... within a regular expression, are the values in brackets evaluated consecutively, or no? For example: Does [a-zA-Z0-9] (yes, I know [:alnum:] is the same) mean that there can be a number, but it has to follow a letter? Or would you just do

Re: [PHP] Authentication

2002-07-03 Thread Martin Clifford
Sessions make life so much eaiser, in my opinion. I used to do what you do, passing from one page the next. Now, when a user successfully logs in, ONE line of code passes all the necessary variables from page to page without me having to do a damn thing. I don't personally see TOO much

Re: [PHP] How to start hello program

2002-07-03 Thread Martin Clifford
What address are you using the run the program? Try using http://localhost/hello.php and see if that works. I don't use IIS, so I couldn't tell you anything relating to configuration. Varsha Agarwal [EMAIL PROTECTED] 07/03/02 03:42PM Hi, I am completely new to PHP and webserver things. I

Re: [PHP] GET data in URL

2002-07-03 Thread Martin Clifford
PHP now comes with register_globals set to OFF by default, as far as I'm aware. You can access the variables using $_POST['variable'] and $_GET['variable'], or turn register_globals back ON. :o) Martin Jay [EMAIL PROTECTED] 07/03/02 03:46PM I just installed php 4.2.1 and i have a couple of

  1   2   >