Re: [PHP] evaluating dynamic variable

2003-09-02 Thread CPT John W. Holmes
From: Stephen Goodman [EMAIL PROTECTED] When I run the code you've attached, with $i iterating up to 3, I get three 'empty!', even if $resolution1 should be 'not empty!'. It seems like the $i in $_POST[resolutions.$i] is not getting parsed into a value, and php is looking for a key

Re: [PHP] Form variables lost when duplicate records are found !

2003-09-02 Thread CPT John W. Holmes
From: Pushpinder Singh Garcha [EMAIL PROTECTED] I am making use of a php form to add company details to a MySQL Database. Before I add the form variables I am checking to see if the SAME company name exists in the DB. If the same company exists, then a notification is provided. In between

Re: [PHP] PHP installation on IIS

2003-09-03 Thread CPT John W. Holmes
From: Sid [EMAIL PROTECTED] This is the first time I am installing PHP on IIS and I don't know what I am doing wrong. I copied the default php.ini file to the winnt dir. Then I added an ISAPI extention with .php to the App Mapings tab. (ISAPI caching enabled) Then I made a test.php file with

Re: [PHP] Q on Class and EXTEND

2003-09-03 Thread CPT John W. Holmes
jsWalter wrote: What I am trying to do is EXTEND the PEAR::Auth Class with new properties and methods. But I still want to use the original instantiation call... $myAuth = Auth(); So, I don't think I can rename the orginal Class in this case. I'm just being particular. Or do I have

Re: [PHP] Get the lowest value out of different fields

2003-09-03 Thread CPT John W. Holmes
From: Frank Keessen [EMAIL PROTECTED] I hope you can help me with this: I have a tabel in my database like this TEST fieldnameValue's testid 1 testf1 3 testf2 4 testf3 0 testf4 2 testf5 0 (so this is one record!)

Re: [PHP] mysql Pattern Matching

2003-09-04 Thread CPT John W. Holmes
From: Ralph Guzman [EMAIL PROTECTED] I know this question is best for the mySQL mailing list, but I am unable to subscribe to their list at this moment so perhaps somebody here can help me out. I have a table with a field where amenities are listed together using a comma delimiter like:

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread CPT John W. Holmes
From: Dan Anderson [EMAIL PROTECTED] But how much overhead is there in: $link = mysql_connect($hostname,$username,$password) or die(); $db = mysql_select_db($database,$link) or die(); Would it be beneficial to run a single one at the beginning of every script? Currently I have a bunch of

Re: [PHP] mysql Pattern Matching

2003-09-05 Thread CPT John W. Holmes
From: Ralph Guzman [EMAIL PROTECTED] Is there an advantage or difference in running FIND_IN_SET() instead of LIKE? Actually no, I guess there isn't. Neither one will use an index. mysql desc test; +---+-+--+-+-+---+ | Field | Type| Null | Key |

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread CPT John W. Holmes
From: Dan Anderson [EMAIL PROTECTED] While multiple connections will just return the first connection, anyhow, why do the extra work, right? Yes that was what I was thinking. But I was also thinking that I would need to global the $link and $db variables and run mysql_query() with them

Re: [PHP] Form data

2003-09-08 Thread CPT John W. Holmes
From: Hardik Doshi [EMAIL PROTECTED] I have a form for adding a university course details. It has some fields for which the parent form calls the child form. For example: Each course is associated with at least one faculty member. So when the user enters faculty member then first user needs

Re: [PHP] Creating a Calender

2003-09-08 Thread CPT John W. Holmes
From: Dan Anderson [EMAIL PROTECTED] Does anybody know how to generate calendars easily? (i.e. print out complete calenders from the current month on) I'd check out PEAR or phpclasses.org. I'm sure something is already written, but I don't know of any personally. ---John Holmes... -- PHP

Re: [PHP] adodb and php5

2003-09-08 Thread CPT John W. Holmes
From: Gilberto Garcia Jr. [EMAIL PROTECTED] Does anyone had tested ADODB with php5? I can make a query, print the recordcount but when i try to show the result i got nothing while (!$qry-EOF) { echo $qry-fields['campo'] . br; $qry-MoveNext(); } You might want to ask on the adodb forums:

Re: [PHP] Session Variables in a Class

2003-09-09 Thread CPT John W. Holmes
From: micro brew [EMAIL PROTECTED] I've been experimenting with sessions. I can make them work just fine in a normal PHP page. But when I create a class and try to define a session variable within a method in the class it won't work. I've tried setting the session variable directly

Re: [PHP] Multiple image buttons

2003-09-09 Thread CPT John W. Holmes
From: Hardik Doshi [EMAIL PROTECTED] I have a page on which there are multiple image buttons. Is there any way to determine which button is pressed by the user? For example, there is a page on which i display all the users of the system with the edit and delete button beside each user

Re: [PHP] Session Variables in a Class

2003-09-10 Thread CPT John W. Holmes
From: micro brew [EMAIL PROTECTED] Here's my class. I start the session in the constructor and in later methods attempt to register session variables. You can see I've tried a couple different methods but none of them maintain the session variable values. Any suggestions? Is

Re: [PHP] divide

2003-09-10 Thread CPT John W. Holmes
From: phpu [EMAIL PROTECTED] I'm new in php and i've got allready a problem. I wanna divide 2 numbers and the result to be an integer separated by comma. For example: $number1=1000; $number2=17; $result=$number1 / $number2; In this case the result is 588235.29411764 And I wanna the

Re: [PHP] How to access a program outside of PHP?

2003-09-10 Thread CPT John W. Holmes
From: Adam Douglas [EMAIL PROTECTED] Hi. I'm trying to develop a web interface to the ghostscript (gs) application. I have the ghostscript syntax down perfectly in the console. Now when I go to try and do it in PHP I get nothing. No errors, nothing just a blank page with PHP logs turned on

Re: [PHP] Can't use strtotime for dates before 1970. Why not??

2003-09-10 Thread CPT John W. Holmes
From: Free Grafton [EMAIL PROTECTED] We provide a MySQL, PHP solution to customers. One of the fields that we store for the customers are birthdates. We just recently upgraded from Red Hat 7.1 to Red Hat 9.0 and now have realized that at version 7.3 they changed it where strtotime no longer

Re: [PHP] reverse lookup/domain lookup in PHP

2003-09-11 Thread CPT John W. Holmes
From: Tim Baker [EMAIL PROTECTED] Is it possible to reverse lookup (like here http://www.whatismyipaddress.com/reverse.asp) to find the domain with PHP? I assume a DNS lookup requires an external server somewhere? That's be great if there was a PHP function to do this, something like

Re: [PHP] Mysql Authentication problem

2003-09-11 Thread CPT John W. Holmes
From: James Hamilton [EMAIL PROTECTED] current testing code: $link = mysql_connect(localhost, user, pass ) or die(Could not connect : . mysql_error()); print Connected successfully; mysql_select_db(name) or die(Could not select database); print connected; with user = null

Re: [PHP] reverse lookup/domain lookup in PHP

2003-09-11 Thread CPT John W. Holmes
From: Tim Baker [EMAIL PROTECTED] Expensive? In server/processor time, money or bandwidth (doubt the latter?) server/processor time. It can take a while to get a response. Same as doing it from command line. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] New Session Ids generated with each page request

2003-09-11 Thread CPT John W. Holmes
From: Golawala, Moiz M (IndSys, GE Interlogix) [EMAIL PROTECTED] My problem is that I get a new Session Id with every request I send to the server. For that reason I am unable to share variables between pages using sessions. (I get a new session Id even I refresh the same page). The code

Re: [PHP] Mailing List Programme

2003-09-11 Thread CPT John W. Holmes
From: Sheni R. Meledath [EMAIL PROTECTED] Many thanks for the details. Now the problem is Flush() is not working on my server (UNIX/Apache 1.3). Are there any issues with Unix servers. The page displays the title and then waits for teh complete script to execute. I am using IE 6.0 to browse

Re: [PHP] Problem with HTML Text box and PHP variable.

2003-09-11 Thread CPT John W. Holmes
From: murugesan [EMAIL PROTECTED] This will help you ?php $dins=Dinesh; echo input type=text name=dins class='textbox' value='$dins' ; ? Use double quotes for HTML attributes. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] some kind of redirection (not the header function)

2003-09-11 Thread CPT John W. Holmes
From: Juan Nin [EMAIL PROTECTED] The beheaviour I want to acomplish is the same as in yahoorgoups. You can access a mian page, where you login and have a list of all the groups you are subscribe to. You click on the link to each one and it redirects you to:

Re: [PHP] rename()

2003-09-11 Thread CPT John W. Holmes
From: Edward Peloke [EMAIL PROTECTED] This is probably an easy question Yep.. ;) I have an uploaded image in a temp file that I want to rename and put in another folder. I am using rename() which works fine, the problem is, I want to force an overwrite if the file already exists. [snip]

Re: [PHP] Simple (?) var_dump question

2003-09-12 Thread CPT John W. Holmes
From: Thomas Panzarella [EMAIL PROTECTED] Hi. I'm new to the list so sorry if this has already been asked before ... I want to find a way to capture the var_dump output as a string so I can write it to a log file ... (for example): $logger-debug(var_dump($foo)); So, the above line

Re: [PHP] Simple (?) var_dump question

2003-09-12 Thread CPT John W. Holmes
From: Wouter van Vliet [EMAIL PROTECTED] aiaiaia ... you are all pretty right, for another function was forged. var_export has a return flag as second argument where print_r and var_dump both have other variables as second (and third, and fourth, and sixth) .. So you can do:

Re: [PHP] Simple (?) var_dump question

2003-09-12 Thread CPT John W. Holmes
From: CPT John W. Holmes [EMAIL PROTECTED] The only difference between print_r() and var_export() produces valid PHP code. That should say var_export() produces valid PHP code, while print_r() does not. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Calling a function.

2003-09-12 Thread CPT John W. Holmes
From: Vincent M. [EMAIL PROTECTED] Is there any way to call a function with a variable inside the call. ie: if($preferences != ) { dis_display$$preferences() ; $functon = dis_play$preferences; $function(); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] error cannot instantiate non-existent class

2003-09-12 Thread CPT John W. Holmes
From: Golawala, Moiz M (IndSys, GE Interlogix) [EMAIL PROTECTED] I am newbie with php and I am trying to instantiate a class. Welcome to PHP. this-$config = $config; $this-config = $config; Parse error: parse error, unexpected T_OBJECT_OPERATOR in C:\Program Files\Apache

Re: [PHP] Calling a function.

2003-09-12 Thread CPT John W. Holmes
From: Jason Wong [EMAIL PROTECTED] On Saturday 13 September 2003 01:40, CPT John W. Holmes wrote: From: Vincent M. [EMAIL PROTECTED] Is there any way to call a function with a variable inside the call. ie: if($preferences != ) { dis_display$$preferences() ; $functon

Re: [PHP] How do I squelch warnings (without editing php.ini)?

2003-09-15 Thread CPT John W. Holmes
From: Dan Anderson [EMAIL PROTECTED] I am running a script that occasionally utters a few warnings when the user does something dumb (but it does not kill the script). Is there a way to turn off warnings within a script? I really don't want my users to see them. Short of fixing your code,

Re: [PHP] How to comment out chunk of html/php mixed code?

2003-09-15 Thread CPT John W. Holmes
From: Wei Wang [EMAIL PROTECTED] This may sound very newbie. But since html comment uses !-- -- which doesn't comment out the php code. And the php comment /**/ // apparently doesn't work on html. So how do I comment out a chunk of html/php mixed code? /* and */ appears to work: ?php /*

Re: [PHP] multiple FORMS on same page problem.

2003-09-15 Thread CPT John W. Holmes
You can only use one form, as you've figured out. You can have PHP determine the action for each button, though.. In a form with two buttons, say names submit1 and submit2, only one variable will be set when the form is submitted, the actual button that was clicked. So you can use logic like this

Re: [PHP] Code check please

2003-09-17 Thread CPT John W. Holmes
From: James Johnson [EMAIL PROTECTED] Can anyone see why this code isn't working $SID = $_SESSION['svUserID']; $AdID = $_GET['AdID']; // get the campuses assigned $qCampusID = SELECT inst_id FROM ads_campuses WHERE ad_id = $AdID; You say down below that this query only selects one

Re: [PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread CPT John W. Holmes
From: esctoday.com | Wouter van Vliet [EMAIL PROTECTED] So, since I'm not quite a newbie I did not read all the guides .. RTFM (Read The F*ck!ng Manual) and STFW (Search The [EMAIL PROTECTED] Web) I already knew, but what does STFA stand for ;).. Hi newbie. Why don't you search the archives

Re: [PHP] Another code check

2003-09-18 Thread CPT John W. Holmes
From: James Johnson [EMAIL PROTECTED] Can anyone see what's wrong with the following code? It produces the following in the browser: Warning: Cannot add header information - headers already sent by (output started at /home/.paco/campuscb/campuscorkboard.com/AdPay_MC.php:11) in

Re: [PHP] Form CheckBox question

2003-09-18 Thread CPT John W. Holmes
From: Yves Arsenault [EMAIL PROTECTED] I have this in my form the checkUnCheck(this); will uncheck values 1,2,3 if None is chosen... Now when I submit this form, the output I get from $Avail is the word Array and not the actual content ('1,2,3' if I choose 1,2,3) td input

Re: [PHP] PHP and MYSQL don't shake hands

2003-09-18 Thread CPT John W. Holmes
From: Frank Tudor [EMAIL PROTECTED] The problem I am having is that when I try to pass values to the database the php fails. I think I have singled it down to the connection string but I am not sure. [snip] function db_connect() { global $dbhost, $dbusername, $dbuserpassword,

Re: [PHP] when clients go bad

2003-09-18 Thread CPT John W. Holmes
From: Tim Thorburn [EMAIL PROTECTED] I've done freelance web design for about 7 years now off and on. Just recently I've found myself dealing with the worst clients in the history of the world - ok, maybe not, but they've been pretty awful. After about a year of working together, the

Re: [PHP] Splice problem

2003-09-18 Thread CPT John W. Holmes
From: Stevie D Peele [EMAIL PROTECTED] My problem is that I am splicing an array and then echoing the array [code] ?php $input = array(red, green, blue, yellow); array_splice($input, 2); echo $input; ? [/code] and all that is echoed is Array. I want red green to be echoed. That's

Re: [PHP] config file

2003-09-19 Thread CPT John W. Holmes
From: Payne [EMAIL PROTECTED] I have a project that I need to write and in the past I would hard code a lot of information in pages that I should have put into a config file. I am wanting to know if there a website that example how to write a config file and how to the php call them. You can

Re: [PHP] Session and Server variable problem

2003-09-19 Thread CPT John W. Holmes
From: Stephen Schneider [EMAIL PROTECTED] Have an interesting problem. Worked on a web site for a client. They have the server (IIS) set up and we are using php. Have been working with their domain with a .net extension. To go live, they repointed their .com domain to the web folder.

Re: [PHP] problem passing variable between forms.

2003-09-23 Thread CPT John W. Holmes
From: Angelo Zanetti [EMAIL PROTECTED] therefore I can register this variable on the same page as the checkboxes? So therefore is it posssible for php to determine which checkboxes have been selected (or are the ones that are selected added to the array)? The ones that are selected are added

Re: [PHP] Logged Out of Seesion, Then use back button

2003-09-23 Thread CPT John W. Holmes
From: Roger Spears [EMAIL PROTECTED] 1) How can I prevent the use of the browser back button after someone logs out? You don't. You never prevent the use of the back button. When someone logs in, then a session should be started with some content, like you've already mentioned. So, thoughout

Re: [PHP] Script that pulls several pages from list?

2003-09-24 Thread CPT John W. Holmes
- Original Message - From: MIKE YRABEDRA [EMAIL PROTECTED] I want to create a php script that will... 1. Take a list of URLs separated by commas 2. Covert that to an array 3. Then go through and pull the content from each page in a loop I am doing this so I can set up a cron job

Re: [PHP] How can I auto upload a file to the server?

2003-09-24 Thread CPT John W. Holmes
From: Raditha Dissanayake [EMAIL PROTECTED] My Impression from Jane's mail was that she was thinking of using a PHP script on the client side and not the server side. Am i correct jane? If so there would not be security concerns. Obviously as john has so rightly pointed out php on the server

Re: [PHP] Casting nulls

2003-09-24 Thread CPT John W. Holmes
From: Carl Furst [EMAIL PROTECTED] IF $int is null and I have a test If($int 1) { //do some foobar } will $int be evaluated as a zero? IF I cast (int) $int.. will that turn a null $int into a zero?? Documentation aint too clear. No idea what you're doing here, but you may want to

Re: [PHP] 3 mins of your time please...logic problem

2003-09-24 Thread CPT John W. Holmes
From: Ryan A [EMAIL PROTECTED] Basically trying to limit the vote to just 1 per person, first am checking if the the person with username has voted, if that comes back as false then am checking his ip (because i dont know if the person changed his username and is trying to vote again) now

Re: [PHP] 3 mins of your time please...logic problem

2003-09-25 Thread CPT John W. Holmes
From: [EMAIL PROTECTED] A different approache for the captcha.. instead of using a blurred image use some text and than ask a question about the text like What does the 2nd word in the first line of the 4thparagraph say? Reading images can still be automated, it just takes a lot more time to

Re: [PHP] What to use?

2003-09-25 Thread CPT John W. Holmes
From: Robert Cummings [EMAIL PROTECTED] On Thu, 2003-09-25 at 16:28, Jeff McKeon wrote: Correct me if I'm wrong please, but I think number_format() has the adverse effect of changing the value type from numeric to char and therefore baring you from using it in mathematical equation later

Re: [PHP] What to use?

2003-09-25 Thread CPT John W. Holmes
From: Jeff McKeon [EMAIL PROTECTED] Correct me if I'm wrong please, but I think number_format() has the adverse effect of changing the value type from numeric to char and therefore baring you from using it in mathematical equation later in the script. You're correct (kind of). The _result_

Re: [PHP] PHP coders spare time [OT}

2003-09-29 Thread CPT John W. Holmes
From: Marek Kilimajer [EMAIL PROTECTED] CPT John W. Holmes [EMAIL PROTECTED] and John W. Holmes [EMAIL PROTECTED] is the same address, just a different name (in and out of office ;) John made it to be second. Maybe this list shouldn't be public, since it appears I send just as much email from

Re: [PHP] php and checkboxes.

2003-09-29 Thread CPT John W. Holmes
From: Angelo Zanetti [EMAIL PROTECTED] I dont actually want to delete the record from the database, perhaps I wasnt very clear in my explanation, but I just need to remove that entry from the table. kinda like when deleting mail from your web email account like hotmail. Same idea... input

Re: [PHP] Export resultset

2003-09-29 Thread CPT John W. Holmes
From: DPCMA Metalito [EMAIL PROTECTED] New to this list. I would like to know if anybody knows where can I found information about how can I generate an Excel Spreadsheet, with the resulset of an LDAP query that my script made. The goal is that MS Explorer can download and load the xls inside

Re: [PHP] Html forms to php scripts

2003-04-04 Thread CPT John W. Holmes
I though we already covered that this was an PHP / Apache 2 bug?? Stop using Apache 2 with PHP. ---John Holmes... - Original Message - From: VanZee, Timothy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 04, 2003 11:01 AM Subject: RE: [PHP] Html forms to php scripts Here

Re: [PHP] php/mysql group by headache

2003-04-04 Thread CPT John W. Holmes
preface: have RTM on mysql GROUP BY I have a mysql db with a number of entries... table| id | name | info | version 1 x foo1 2 x foob 2 3 x foobar 3 my sql is similar to select id,name,info

Re: [PHP] re:[PHP] 4.3.1 sessions not expiring / garbage collection not working

2003-04-04 Thread CPT John W. Holmes
How much traffic does this site get? Is it possible that the garbage collection is just never triggered? What if you up the garbage collection probability in your php.ini file to 100% (to trigger it with each session start)? Do the files get removed then? I'm sure this isn't the problem, but the

Re: [PHP] Opinion on a method....

2003-04-04 Thread CPT John W. Holmes
I would like to get some opinions here on a method I'm doing to grab connect information for a mysql connection. Currently I am doing: $pinfo = fopen (/director1/directory2/filename.ini, r); I'm looking for a more secure method of doing this. Is XML a solution? Is there something else?

Re: [PHP] PHP Another time around

2003-04-04 Thread CPT John W. Holmes
I'm getting close to what I want...I currently have this code which loops through all of the next 24 hours: SELECT NAME=futhour ? for($i = 0; $i = 24; $i++): $futhour = strtotime(+$i hour); echo 'OPTION VALUE='. date('H',$futhour) .''. date('g a',$futhour).'/OPTION';

Re: [PHP] Get the datetime from server

2003-06-05 Thread CPT John W. Holmes
Can anyone teach me how to get the date and time from the web-server,it's not changed with the time of local machine. I found the date() cannot do this. That's exactly what date() does... the date and time from the server. Maybe you're using it wrong. ---John Holmes... -- PHP General

Re: [PHP] pattern matching for the dot-sign

2003-06-05 Thread CPT John W. Holmes
I am looking for a way to replace . (=dot) to , in a string with either ereg_replace or preg_match . I read the manual in PHP on Pattern matching for preg_match but could not immediately trace it. All help appreciated. If that's all you need to do, use str_replace(). ---John Holmes... --

Re: [PHP] Is gd present?

2003-06-05 Thread CPT John W. Holmes
$gd_loaded = (extension_loaded('gd'))?1:0; Well, this also fails the simple-as-possible test: if the value returned by extension_loaded() can be used to drive the ?: operator, it must be evaluable as a Boolean; this means you can use it directly for later use in an if() or similar

Re: [PHP] Displaying links only when page is loaded on local site?

2003-06-05 Thread CPT John W. Holmes
Just curious to know if anyone knows of a way of displaying a set of links on a page only when that page is loaded on my local development machine and not when it's loaded by the general internet public on my remote host's machine? I have several background content editing pages which would

Re: [PHP] How do I display new lines in a textearea?

2003-06-06 Thread CPT John W. Holmes
I want to have a textarea that contains details read from a mysql table, but I want to echo each row so that it is on a new line. What is the new-line character for a textarea? ( in effect the reverse of nl2br() A newline is \n $text = word\nword\nword\n; echo textarea$word/textarea; will

Re: [PHP] Fetch Array Problem

2003-05-27 Thread CPT John W. Holmes
Your query more than likely failed. If you had proper error checking, you'd of seen this already. Check mysql_error() after your query to see what the error is: $rs = mysql_query($query) or die(mysql_error()); or $rs = mysql_query($query); if($e = mysql_error()) { echo Error occurred: $e; }

Re: [PHP] Where's the cookie file?

2003-05-27 Thread CPT John W. Holmes
sessions, on my server, go into /tmp. Doesn't there have to be a similar file saved on the server for setcookie? All I know is mine aren't in /tmp No, cookies are saved on the client. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] thumbnails

2003-05-29 Thread CPT John W. Holmes
I know thumbnails have been discussed and I have looked at the archives, I am just looking for opinions. I am doing a small website for a used vehicle dealer. I need to make it as easy as possible for him to add new vehicles. I plan to just give him a form for the information, and a place to

Re: [PHP] sessions and domains

2003-05-29 Thread CPT John W. Holmes
You'd really only have to pass the session ID to the other domains, since all of the session files are located in the same directory. So, when linking to one of the other domains, just include SID in the URL or form. Should be painless. echo 'a href=http://www.otherdomain.php/page.php?'.SID.'Link

Re: [PHP] strtr question

2003-05-29 Thread CPT John W. Holmes
I want to remove unwanted characters from filenames of files uploaded to our server. I am currently using strtr to do this. I have a few characters that are being removed but I would also like a single quote to be removed if it is in the filename. I think it has to be escaped in the command

Re: [PHP] Checking if an array key exists

2003-05-29 Thread CPT John W. Holmes
I have a multi-dimensional array. Looks like this: $work_order_hdr = array ('whdr_id'='record_no', 'whdr_order_no'='request_no', 'whdr_site_id'='site_id', 'whdr_user_id'='user_id',

Re: [PHP] Appending to the REQUEST_URI

2003-05-29 Thread CPT John W. Holmes
You have to check for it, regardless. See if this works for you. $url = $_SERVER['REQUEST_URI'] . '?' . ((isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] . '' : '' ) . 'newVar=1'; The middle part basically sees if the QUERY_STRING is empty. If it is, it includes a question mark

Re: [PHP] Appending to the REQUEST_URI

2003-05-29 Thread CPT John W. Holmes
Replying to myself... :) You have to check for it, regardless. See if this works for you. $url = $_SERVER['REQUEST_URI'] . '?' . ((isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] . '' : '' ) . 'newVar=1'; The middle part basically sees if the QUERY_STRING is empty. If it is, it

Re: [PHP] strip_tags() Quandry....

2003-05-30 Thread CPT John W. Holmes
Yes, no problem! Glad it worked out. you may wish to actually study the perlre man page on perl.com. This goes into the most details and talks about how PERL actually EXTENDS shell regular expressions significantly and excellent resource that I have used many many times. I figure since PHP

Re: [PHP] zip code validation/regular expression

2003-06-03 Thread CPT John W. Holmes
Simply trying to use regular expressions to validate a 5 or 5+4 zip code, excluding 0 and 0-. Looked on http://www.regexlib.com, and that's where I found the pattern below, but it doesn't work. The best I can do on my own is two separate regular expressions, one to match a valid

Re: [PHP] Variables changes their values

2003-06-03 Thread CPT John W. Holmes
I'm getting strange behavior in some of my scripts I just upgraded from 4.3.1 to 4.3.2 and was hoping it would solve the problem. The problem is that variables changes its values from one line og code to another - without specific code that should change the value. Do anybody else had this

Re: [PHP] convert seconds to hours, minutes, seconds

2003-06-04 Thread CPT John W. Holmes
I have a value 178607, which is stored as seconds. I like to convert it (178607 Secs) to Hours, Minutes and Seconds appropiatly. Can anybody help me supplying the code? If it's stored in MySQL, you can use SEC_TO_TIME() mysql select sec_to_time(178607); +-+ |

Re: [PHP] Variables changes their values

2003-06-04 Thread CPT John W. Holmes
On Tuesday 03 June 2003 13:58, Jay Blanchard wrote: [snip] We would have to see some code Jay I'm not able to reproduce this in a short code-snippet. But from the first echo to the last echo $lid change its value: Either this is a bad cut and paste job or this script will never

Re: [PHP] Displaying 5 records only/displaying specific records

2003-06-04 Thread CPT John W. Holmes
I'm trying to build a news panel for my home page. Basically I want to present the five most recent news articles in a recordset, but I'm not sure how to cut off the recordset after 5. Also I want to present a picture with my first headline. My code will go something like this: ?php

Re: [PHP] Delete from Multidimensional Array?

2003-06-04 Thread CPT John W. Holmes
I've built a page that collects network card information, assigning each element its place within a $Card array, and all of the cards to $NetCards. As you enter your card information at the bottom, the previous card is displayed above it, with a Delete checkbox option at the end of that row

Re: [PHP] Re: Migration from register_globals=on to register_globals=off

2003-06-04 Thread CPT John W. Holmes
yeah .. I knew it .. but it would be so very helpfull if it would be just included in a superglobal similar to $_REQUEST ... Do it yourself, if you must: array_merge() ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: John - RE: pagenting logic to cut short

2003-06-04 Thread CPT John W. Holmes
Thanks, its working fine now, actually a little better than I expected :-) Dont understand the logic though, if you find time point me to the correct place where i can read up and figure out the logic you used. The logic isn't too hard. You're on page X. You show links to other pages from X

Re: [PHP] setting up a cron job for a PHP script

2003-06-04 Thread CPT John W. Holmes
You can also call the file through lynx or wget if you can't call the php executable directly. lynx --dump http://www.yourserver.com/file.php wget http://www.yourserver.com/file.php Down side is that the file has to be in your web root. Works great for calling remote files, though. ---John

Re: [PHP] Best open source banner advertising application

2003-06-05 Thread CPT John W. Holmes
From: Randum Ian [EMAIL PROTECTED] Why pay for something when you can get this for nowt! ;o) I love getting things for nowt... like candy from a baby... :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] setlocale() changes?

2003-06-05 Thread CPT John W. Holmes
I've been getting a warning on one of my scripts since I upgraded from 4.1.2 to the most recent version of PHP. The warning is: Warning: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead The script at the line that is failing sez:

Re: [PHP] Sessions and headers

2003-06-05 Thread CPT John W. Holmes
When using PHP sessions, if the user's browser supports cookies, PHP sets the session id as a cookie (so far as I understand it). So when trying to use the session ID in a script, a cookie request is sent to the browser to get the ID and assigns it to the internal variable $PHPSESSID (again,

Re: [PHP] Is gd present?

2003-06-05 Thread CPT John W. Holmes
Is there a way to check within an application if the gd library has been installed? Maybe get_loaded_extensions() ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file output, columns, etc...

2003-06-05 Thread CPT John W. Holmes
Need some help here. I have to format a line with each piece of the line being a fixed set of characters in length, wether its a mix of spaces and letters, or all letters. Here's an example of the line: 06?4111ABDALARM333 N COUNTRY CLUB CANTON DD8 In this file,

Re: [PHP] function re-defined | WorkAround? [and some more Q's]

2003-06-05 Thread CPT John W. Holmes
I'm working on quite a large website with a lot of php pages.. And a lot of includable functions (modules).. Sometimes one of those modules gets included twice accidently and then it generates an error .. of course.. This made me wonder of there's any way to prevent the function from being

Re: [PHP] Another Session Question

2003-06-09 Thread CPT John W. Holmes
So does your code work? Here's a tip: Try a simple example, like what's in the manual, and see which method works for you. If they both work, which one do you understand? Use that one... ---John Holmes... - Original Message - From: Pushpinder Singh Garcha [EMAIL PROTECTED] To: [EMAIL

Re: [PHP] PHP vs. jsp, advice please

2003-06-10 Thread CPT John W. Holmes
Agree 100%. Don't assume that just because you use JSP, or any other language, your program is going to instantly scale well and be easy to maintain. You can write crappy, inefficient code in any language. You can also write good programs in most any language if you put the proper planning into it

Re: [PHP] How to show BLOB ?

2003-06-10 Thread CPT John W. Holmes
I have a blob in the database. I want to open a file=BLOB in the browser such a way as if I clicked on a link. So if it is pdf, its opened by pdf plugin, if it is doc, it is open by word plugin, if it is zip the dialog for opening/saving to disk is opened, if it is jpeg it is directly

Re: [PHP] MSSQL - Previous/Next Paging Results

2003-06-10 Thread CPT John W. Holmes
-Original Message- MSSQL seems to be a little bit messier that MySQL..e.g limit clause etc Anyone know of articles/examples that specifically deal with this issue? Look into the Top() function for MSSQL. It goes something like: SELECT Top(10) * FROM table You should be able

Re: [PHP] confusing problem or am just plain confused....

2003-06-10 Thread CPT John W. Holmes
I dont know how exactly to explain this but will do my best, i have many of the following lines in a page: tdpinput type=checkbox name='id[]' value=23input type=hidden name =package value=loco package/td tdpinput type=checkbox name='id[23]' value=loco package/td each line of course has a

Re: [PHP] nl2br

2003-06-11 Thread CPT John W. Holmes
I am trying to create a very basic page where we can all easily work on a document. I just have a huge textarea that inserts the text into a longtext field in the mysql db. I use nl2br to keep the formatting. Of course, when the document is viewed in the textarea, all of the br / are there.

Re: [PHP] slash trouble when editing text

2003-06-11 Thread CPT John W. Holmes
Use stripslashes() to remove the slashes. Use htmlentities() on the text before you put it into the textarea, also. ---John Holmes... - Original Message - From: Matt Palermo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 4:16 PM Subject: [PHP] slash trouble when

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread CPT John W. Holmes
snip Sorry, I donĀ“t know that you needed an effective snipet. And you are right, I only writed for positive integers. Try something like apply 2 type cast simunltaneous. if ( (string) ((int) $_POST[var_int]) == $_POST[var_int]) echo is int; Why not just use the is_int()

Re: [PHP] dealiong with quote's in SQL strings

2003-06-13 Thread CPT John W. Holmes
I recently installed 4.3.1 and enabled the magic_quotes_gpc to deal with quotes in mysql inserts. However, I think I have run into a problem that might be related, and was wondering if there is an easy way to fix it: I have a script that gets user input from a drop-down, on the action

Re: [PHP] page name string

2003-06-16 Thread CPT John W. Holmes
I need a really simple function that retrieves the actual page file name from a URL. So, if the URL is http://www.server.com/pagename.php, or if it is http://www.server.com/directory/pagename.php, the function in both cases will return pagename.php. I'm sorry if this is a ridiculously easy

<    1   2   3   4   5   >