Re: [PHP] control structure question

2002-07-23 Thread Martin Clifford
t is what section of code will execute. 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 pro

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/ >>> &

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.completesourc

Re: [PHP] Re-directing

2002-07-24 Thread Martin Clifford
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

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 >>&g

Re: [PHP] PHPMyAdmin interface

2002-07-24 Thread Martin Clifford
yours. BTW, I hadn't intended this to become a chapter, 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 ju

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 PROTECT

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'

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

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

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

2002-07-25 Thread Martin Clifford
Sign up now 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)

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
<> 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 PROTECTED]> wrote: >

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] 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 >&

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 —-- End of text editor Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ >>> "Ty

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-g

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. Something along those lines. >>> "Tyler Durdin" <[EMAIL PROTECTED]> 07/26/02 03:28PM >>> alrigh I have switched eve

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/ >>> &quo

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:

Re: [PHP] OT - javascript question..

2002-07-29 Thread Martin Clifford
\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 post, but thi

Re: [PHP] Help Please

2002-07-29 Thread Martin Clifford
or 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 Developer's Forums: http://www.com

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

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

2002-07-30 Thread Martin Clifford
http://myaddress/php/mypage.php?modo=123&color=red&size=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 PROT

[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/ >>>

Re: [PHP] select multiple

2002-07-31 Thread Martin Clifford
ally is no limit to how you want to do this. Then just use 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/

Re: [PHP] Disabling Browser "BACK" button

2002-07-31 Thread Martin Clifford
cannot use 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 &l

Re: [PHP] String Question

2002-07-31 Thread Martin Clifford
that starts at $i (0, 8, 16, 24, etc) and grabs 8 characters. So here is how 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 H

[PHP] A Fond Farewell

2002-07-31 Thread Martin Clifford
directly, as I'm unsubscribing after I send 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/

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

RE: [PHP] redirection

2002-06-05 Thread Martin Clifford
You can pretty much use ANY JavaScript event handler to accomplish the redirection. I'm new to PHP, so the header is the only place I know of to redirect. onclick onmouseup onmousedown onmouseover onmousemove onkeydown onkeypress onkeyup onchange etc. -- PHP General Mailing List (http://www.

Re: [PHP] days between two timestamps

2002-06-05 Thread Martin Clifford
Use substr() to extract the appropriate information, then format it and compare it. 20020603 is obviously June 3, 2002 and 20020605 is obviously June 5, 2002 which means there was 1 day (plus x hours) between the two. Hope to help! Martin >>> "Tyler Longren" <[EMAIL PROTECTED]> 06/05/02 11:01

Re: [PHP] days between two timestamps

2002-06-05 Thread Martin Clifford
Well, I had the right idea... John is just more advance than me. :o) >>> "1LT John W. Holmes" <[EMAIL PROTECTED]> 06/05/02 11:09AM >>> Since those look like MySQL timestamps, I would suggest you do it in your query. SELECT TO_DAYS(column1) - TO_DAYS(column2) AS Difference FROM table Adapt to

Re: [PHP] Sessions question (-enable-trans-sid)

2002-06-05 Thread Martin Clifford
I'm sure this is not a definitive answer, but I would assume that since you would be passing the information through both the URI and Cookies, it will work regardless of cookies enabled or disabled. On the other hand, if you are passing the session id through the URI in the first place, you do

Re: [PHP] php and javascript question

2002-06-05 Thread Martin Clifford
As far as I'm aware you can't create a javascript variable and use it within PHP on the same page. You can add that variable's value to a hidden form element to be passed to the next page, but I don't think so with the same page. martin >>> "kemu" <[EMAIL PROTECTED]> 06/05/02 02:30PM >>> I ha

[PHP] Emptying a Single Array Value

2002-06-12 Thread Martin Clifford
Howdy, If someone out there could tell me how to get rid of a single key/index pair within an array, it would be great. I've tried both unset() and empty(), but both destroy the entire array. Please CC me directly, as I'm on the digest. Thanks in advance! Martin -- PHP General Mailing Lis

Re: [PHP] Emptying a Single Array Value

2002-06-12 Thread Martin Clifford
st a short test script that misbehaves for you. $arr = array('foo','bar'); unset($arr[0]); print_r($arr); // only $arr[1] = 'bar' exists now See also: http://www.php.net/unset http://www.php.net/array_splice Regards, Philip Olson On Wed, 12 Jun

[PHP] Regular Expression Problem

2002-07-02 Thread Martin Clifford
Hey all! I'm trying to get this darn eregi_replace() to work, but it doesn't produce any results at all. I want it to find all occurances of PHP variables. Here is the regexp $output = eregi_replace("^[\$]{1,2}[a-zA-Z][0-9]+$", "\\1", $var); As you might guess this is for a syntax highlighti

Re: [PHP] Regular Expression Problem

2002-07-02 Thread Martin Clifford
. $var, $$var or &$var to $var. Any ideas on how to do that? >>> [EMAIL PROTECTED] 07/02/02 01:50PM >>> On Wednesday 03 July 2002 01:40, Martin Clifford wrote: > Hey all! > > I'm trying to get this darn eregi_replace() to work, but it doesn't produce > any

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. HTH

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Martin Clifford
Try stripslashes() before addslashes(), to ensure that it doesn't already contain slashes. HTH Martin >>> Jean-Christian Imbeault <[EMAIL PROTECTED]> 07/03/02 09:40AM >>> I am trying to make my PHP safe against malicious data user inputs. Reading up on this most people suggest using addslashe

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 "\n"; echo "$field1\n"; echo "\n"; echo "$field2\n"; echo "\n"; } This will cycle through the rows, adding the values of field1 and field2 to the respective variables, th

[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 [a-zA-Z]

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 wrong

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 thing

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

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

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 abou

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 fro

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. 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 selected in the drop down. thanx and rega

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 session_start(

Re: [PHP] newbie: question about question marks

2002-07-09 Thread Martin Clifford
In that case, the question marks are part of the PHP opening and closing tags. There are several ways to open and close sections of PHP script, mainly being , , and <% %>. What the below equals is , since http://www.completesource.net (Now Open!) >>> "Alexander Ross" <[EMAIL PROTECTED]> 07/09/0

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 a

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 doz

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] 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 us

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 leas

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

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 Mar

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: Click here Page 2: Hope this helps! Martin >>> "Alexander Ross" <[EMAIL PROTECTED]> 07/10/02 11:23AM >>> I'm trying to understan

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 f

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" <[

Re: [PHP] Accessing multiple List/Menu values

2002-07-10 Thread Martin Clifford
Have you tried like this? Yahoo! ... PHP.net 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. I have a fairly large List/Menu on a form, which allows for multiple selections. I

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

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 uniqu

RE: [PHP] Development Tools

2002-07-10 Thread Martin Clifford
WYSIWYG does nothing more for me than screw up my code. I'm very anal about how my code looks, firstly. Secondly, most WYSIWYG editors add superfluous markup into code which not only inflates the file size of your documents, but also slows down processing of them. I'm not saying that WYSIWYG

[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 corr

[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 ma

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

2002-07-10 Thread Martin Clifford
e 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 (Now Open!) >&

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/

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

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 ==

[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 de

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 sup

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]>

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

2002-07-12 Thread Martin Clifford
being helpful, and it being a hinderance. Just 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 gr

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/ >

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

2002-07-12 Thread Martin Clifford
been done. Projects 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

RE: [PHP] PHP meetup

2002-07-12 Thread Martin Clifford
ll come 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 P

[PHP] Re: Good Forum...

2002-07-15 Thread Martin Clifford
heck out 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

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

2002-07-15 Thread Martin Clifford
? Tell me 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! Mart

Re: [PHP] newbie: mysql statement

2002-07-15 Thread Martin Clifford
Y the row where the maximum value 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]

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

[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 Develope

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 PROTECT

RE: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Clifford
"Make" and "Model"), 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

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Clifford
ssigns the new object, "passat", the properties relating 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)

Re: [PHP] Classes vs. Functions

2002-07-16 Thread Martin Clifford
ethod, while others stay 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.completes

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.

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

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

2002-07-16 Thread Martin Clifford
Try enclosing it in curly braces. echo "${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 >>>

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.comp

Re: [PHP] Session and output buffering

2002-07-16 Thread Martin Clifford
d be helpful 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" <

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.completesourc

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 >>&

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" <[EM

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

[PHP] Of Jobs and Certs

2002-07-17 Thread Martin Clifford
d want to be able 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)

  1   2   >