Re: [PHP] adding "Back to Search results" link

2007-08-15 Thread Brad Bonkoski
Something like this might work: (To go back 1 page) Of course if this is a form post, it would repost the data resulting in that annoying pop-up on most browsers indicating the page is being re-posted. Maybe you could write out the post variables to the session variables, and have your page

Re: [PHP] Numbers, Numbers everywhere! Need some Dollar help.

2007-08-02 Thread Brad Bonkoski
Dan Shirah wrote: Greetins all, In my form I have an area where the user enters in the payment amount: This is all fine and dandy and works as generically as it can. BUT, the problem is that I need to make sure the user didn't fat finger any of the numbers. For instance, in my generic text f

Re: [PHP] Question about passing date in sql...

2007-08-01 Thread Brad Bonkoski
Payne wrote: Guys, Got a quick question. I got a sql statement works when I pass it from the cli. but if I try in php I get nothing. This is the statement. Select ip, date, time, CONCAT(city, ', ',country) as location from ips where country !=' ' and date='`date +%Y%m%d`' order by country

Re: [PHP] I'm prepared to feel like an idiot... But I just simply need the answer :)

2007-08-01 Thread Brad Bonkoski
Brad Bonkoski wrote: Jason Pruim wrote: On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote: @mysql_connect('localhost', 'user', 'password') or die("Cannot connect to DB!" . mysql_error()); .. cannot connect to DB!Can't connect to local MySQL ser

Re: [PHP] I'm prepared to feel like an idiot... But I just simply need the answer :)

2007-08-01 Thread Brad Bonkoski
Jason Pruim wrote: On Aug 1, 2007, at 9:55 AM, Michael Preslar wrote: @mysql_connect('localhost', 'user', 'password') or die("Cannot connect to DB!" . mysql_error()); .. cannot connect to DB!Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)qs:/volumes/raider/webs

Re: [PHP] I'm prepared to feel like an idiot... But I just simply need the answer :)

2007-08-01 Thread Brad Bonkoski
I would start with suppling the entire path of for php in the cron. The path in the cron environment may be vastly different then the path in your shell environment... so: /path/to/php file.php See how that works for you, of course I am assuming it runs fine from your command line... -B Jaso

Re: [PHP] best technique to get the ID of the last inserted value

2007-07-20 Thread Brad Bonkoski
One easy solution would be to get the ID before you do the insert i.e. in Oracle you would run the query: select some_id_generating_seq.nextval from dual and then you would use that id to insert and you would know the id after that...and the DB would take care of locking and such. So, check

Re: [PHP] subtracting time from date and time

2007-06-18 Thread Brad Bonkoski
Something like this will get it into a time stamp...and then you can do your calculations with ease, and reformat... -Brad Richard Kurth wrote: I am trying to figure out what is the most accurate way to find the time after I subtract 5 min,15 min, 30 min 1 hour 2 hours and 5 hours from a date

Re: [PHP] Edinburgh, Scotland: PHP Developer Position

2007-06-18 Thread Brad Bonkoski
Jochem Maas wrote: Edward Kay wrote: ... But the advert is for a GRADUATE developer ;) Whilst your messages to this list show you know a lot about PHP, I doubt you've managed to fit a degree in yet :) What does a graduate php developer earn in Scotland? and is it the the piece of pap

Re: [PHP] Parsing CSV files

2007-04-26 Thread Brad Bonkoski
Todd Cary wrote: Is there a function that can parse a comma delimited file into an array? Todd http://us.php.net/manual/en/function.fgetcsv.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Server side speech

2007-04-25 Thread Brad Bonkoski
the system to support, unless there is some way for PHP to do text-to-speech translation, which seems way out of scope for a scripting language On 4/25/07, Brad Bonkoski <[EMAIL PROTECTED]> wrote: Daniel Brown wrote: >Tedd, > >On all of the *nix boxes I use (and

Re: [PHP] Server side speech

2007-04-25 Thread Brad Bonkoski
Daniel Brown wrote: Tedd, On all of the *nix boxes I use (and have used) I've had to install Festival manually, so I would definitely not say that it's commonly found on there especially for a server configuration. But it IS commonly available, so why not just make it a prerequisite

Re: [PHP] UPDATE and redirect

2007-04-11 Thread Brad Bonkoski
marcelo Wolfgang wrote: Hi all, I'm new to this list and new to php programming so sorry if I do something wrong here :) Ok, now to my problem. I've created a query to update a mysql db, and it isn't working, and it's not throwing me any errors, so I need some help to figure out what's wro

Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread Brad Bonkoski
revDAVE wrote: I apologize in advance, however I know almost nothing about PHP - ( but I am trying to learn now)... I am wondering if it is possible to create a PHP page that can: 1 - Get the contents of everything in its own folder at the same level ( just list sub folders filenames - not the

Re: [PHP] Oputting Forms Within a Class

2007-04-10 Thread Brad Bonkoski
CK wrote: Hi All, Experimenting with OOP PHP,please be gentle. Attempting to output a form within a class: From calculator.php: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> Calculator OOP PHP From class.calculator.php: buildInt(); }

Re: [PHP] Show Filename using Wildcards

2007-03-29 Thread Brad Bonkoski
nks. On 3/29/07 3:22 PM, "Brad Bonkoski" <[EMAIL PROTECTED]> wrote: I'm sure there are many options... I'm also assuming you are pulling from a file system and not a database... So, loop through the directory and do something like this: $phone_num = XXX $cur_file =

Re: [PHP] Show Filename using Wildcards

2007-03-29 Thread Brad Bonkoski
Rahul Sitaram Johari wrote: Ave, I have a script where I have to provide a Download Link to a file associated with a record. The common thing between the record & filename is the phone number. But the filenames have dates & other symbols besides the phone number as well. They all do begin with a

Re: [PHP] Date/time format?

2007-03-28 Thread Brad Bonkoski
Jason Pruim wrote: Hi Everyone, First off, I'm using PHP 5.2.0 and apache 1.3.33 I am trying to figure out what format a string is in in a database. It's a timecard system that I have found on-line and I am attempting to figure out how to write a script that would give me everyones timecard

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
; Mar 27 2007 5:26PM [25] => Dan Submit [26] => C [27] => TN ) Bold and in red is the first_name column result. use the numeric reference then... [..] is the index into the array, so if you want "John" use $row_info[7] and if you *want* to use the name or associative array rea

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
Send us the output of print_r($row_info) feel free to mask out any data values you may wish. Dan Shirah wrote: echo $row_info['first_name']; returns nothing. However I have verified the correct spelling both in the database and in the PHP code and they are identical and when I print_r it shows

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
. On 3/27/07, *Brad Bonkoski* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Dan Shirah wrote: > Should I use something besides mssql_fetch_row to get my result? No > matter > which method I use for determining if the value exists, I still

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
Dan Shirah wrote: Should I use something besides mssql_fetch_row to get my result? No matter which method I use for determining if the value exists, I still get no data populated to my form. Why not echo out your query before executing it, so you can run it against the back end if you have it

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
Davi wrote: Em Terça 27 Março 2007 17:02, Dave Goodchild escreveu: use: $_POST['max_id'] == or even better: if (empty($_POST['max_id'])) Why not: if (!(isset($_POST["max_id"))) ? I think the poster *needs* the value to be set to something... so if (isset(...)) {} would work or

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
Dan Shirah wrote: Okay, I thought this was VERY simple, but I cannot wrap my mind around what I am doing wrong. echo $_POST['max_id']; *The echo returns the correct result *if($_POST['max_id'] ='') { *This is suppose to run the below query if $_POST['max_id'] is not blank* $max_id = $_POST[

Re: [PHP] syntax question

2007-03-26 Thread Brad Bonkoski
Ross wrote: Can I put post values directly into insert statements? $query = "INSERT INTO categories (category_name) VALUES ('$_POST['cat_name'])"; Yes, although this is not recommended. What is someone puts a single quote in there? Or some other bad characters otherwise... 2 optio

Re: [PHP] combine empty and trim

2007-03-26 Thread Brad Bonkoski
Brad Bonkoski wrote: Ross wrote: I want to trim any whitepace and check if it is empty in the same line this is not working. if (empty(trim($_POST['_createcategory']))) { perhaps try: if( strlen(trim($_POST['...']))) <= 0 ) { ... } don't think empty is

Re: [PHP] combine empty and trim

2007-03-26 Thread Brad Bonkoski
Ross wrote: I want to trim any whitepace and check if it is empty in the same line this is not working. if (empty(trim($_POST['_createcategory']))) { perhaps try: if( strlen(trim($_POST['...']))) <= 0 ) { ... } don't think empty is the right function for this... -Brad -- PHP General M

Re: [PHP] php support

2007-03-23 Thread Brad Bonkoski
you know if postgresql is built into any php version? > Should be...but you have to activate it.. find your php.ini file and look for the line: ;extension=php_pgsql.dll -->remove the ; at the beginning of it! Then restart PHP and try again. -B > Richard > > - Original Message -

Re: [PHP] php support

2007-03-23 Thread Brad Bonkoski
Richard Dunne wrote: Can anyone tell me where to get support for this? Here php5 undefined function pg_connect() postgresql was not built into your version of PHP. Perhaps post which platform your run on, and other information like using a pre-canned binary or are building for source. -B

Re: [PHP] close session when browser is closed

2007-03-21 Thread Brad Bonkoski
Alain Roger wrote: Hi, I would like to know what is the best solution for my problem. When a user is connected to a https page and a session is open, if user close his browser, the session ID is still active in the browser "history". It means that next time when user will start his browser, th

Re: [PHP] Installing php and mysql on linux

2007-03-12 Thread Brad Bonkoski
I think up2date is *not* up2date ;-) Google for 'yum' and all its flags for usage... -B Jonathan Kahan wrote: Hi all, I am attempting to start the mysql rpm in Red hat as a first step prior to downloading and activating the php-mysql rpm. I was attempting to follow steps based on the link be

Re: [PHP] error in Script

2007-03-05 Thread Brad Bonkoski
Helder Lopes wrote: In other file I asked because it might prove helpful to see how that is set because this appears to be what is causing your error. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Error in Script!!!

2007-03-05 Thread Brad Bonkoski
Helder Lopes wrote: Erro no banco de dados!");//line 23 Where is $con defined??? -B $total = mysql_num_rows($result_id); // Caso o usuário tenha digitado um login válido o número de linhas será 1.. if($total) { // Obtém os dados do usuário, para poder verificar a senha e passar os demais

Re: [PHP] Re: how to display images stored in DB*

2007-03-02 Thread Brad Bonkoski
For the record, I will *never* say one size fits all in the realm of computer programming... Consideration 2 If your project is to supply images across several web servers on different host, then you are caught in a sync problem. Images stored in a file system must be stored on a local host

Re: [PHP] Populating array with function

2007-02-27 Thread Brad Bonkoski
Dotan Cohen wrote: I need to populate an array with the contents of a directory. The following code does not populate the $thumbnailFiles array like I expect that it would: read()) { if ( !is_dir($entry) ) { $files[] = $entry; perhaps look into the array_push() function htt

Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Brad Bonkoski
/stream_set_timeout Brad Bonkoski wrote: I think something like this will work for you.. $start_time = time(); ...loop.. if( time() - $start_time > 5 ) exit; -B Aaron Gould wrote: I have a script that connects to a networked device via PHP's socket functions. This device accepts proprietary comma

Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Brad Bonkoski
I think something like this will work for you.. $start_time = time(); ...loop.. if( time() - $start_time > 5 ) exit; -B Aaron Gould wrote: I have a script that connects to a networked device via PHP's socket functions. This device accepts proprietary commands (e.g.: "KPRINT", as seen below

Re: [PHP] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread Brad Bonkoski
[EMAIL PROTECTED] wrote: Check out... http://www.php.net/gd -B Already did, but didn't find there any answer... :( In the Installation section... To enable support for jpeg-6b add --with-jpeg-dir=DIR. And read above on that page, for what may/may not be needed to install this library

Re: [PHP] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread Brad Bonkoski
Check out... http://www.php.net/gd -B [EMAIL PROTECTED] wrote: after we (company I work for) mmoved to new hosting company (dedicated server), I requested from them to instal php5 with GDlib to be able play with images. they did. and then yesterday (2 months after we moved) I wasn't able to use I

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
Dan Shirah wrote: Just when I think I'm getting the hang of PHP, I get confused beyond belief :| Is this working for you guys? When I test my page only 1/2 of the months show up now. $months"; Still missing a double quote in there. echo "$months"; } ?> On 2/19/07, Brad Fulle

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
Dan Shirah wrote: Okay, when I try the sprintf I get the following error when I try to save my form Incorrect syntax near 's'. $months"; try: echo "$months"; your trying to call a function inside of a string... -B } ?> On 2/19/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
Brad Bonkoski wrote: Dan Shirah wrote: Okay, when I try the sprintf I get the following error when I try to save my form Incorrect syntax near 's'. $months"; try: echo "$months"; your trying to call a function inside of a string... oops..typo, forgot the add

Re: [PHP] Month

2007-02-19 Thread Brad Bonkoski
Dan Shirah wrote: Greetings, I have the following code which populates a dropdown box so a user can select a month. They see the month name and the SELECTED value is the corresponding numeric value 1-12 for the month. However, the selected value for January would be 1. I need the selected v

Re: [PHP] counting hyperlink clicks in php

2007-02-17 Thread Brad Bonkoski
Denis L. Menezes wrote: Dear friends. I have a site where I have news headers. I wish to count the clicks on the news headers so that I can see how many times each of the the news has been viewed. This way I can show the "most viewed" news. Can one of you please advise hwo this can be done?

Re: [PHP] Session Problem

2007-02-15 Thread Brad Bonkoski
LoneWolf wrote: I am having a problem where it appears that the session is not being saved properly. While on a page, I can start a session and set variables to it. however, when I go to the next page.. the session variables appear to have been cleared out. first page: session_start(); $_S

Re: [PHP] Help wtih a query?

2007-01-30 Thread Brad Bonkoski
Skip Evans wrote: Hey all, I have the following query: $sql="SELECT count(*) AS count,votes.storyID,stories.title,stories.storyID as sID,stories.approved, stories.story,stories.userID, fname, lname FROM `bsp_story_votes` as votes, bsp_story_stories AS stories, users AS usr

Re: [PHP] Oracle Execute Function

2007-01-18 Thread Brad Bonkoski
Brad Bonkoski wrote: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-18 11:46:10 -0500: Hello All, I have this Oracle function, and within my code I call it like this: $sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, null, null); END;"; $st

Re: [PHP] Oracle Execute Function

2007-01-18 Thread Brad Bonkoski
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-18 11:46:10 -0500: Hello All, I have this Oracle function, and within my code I call it like this: $sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, null, null); END;"; $stmt = $db->parse($sql); $rc = null;

Re: [PHP] Displaying Results on different rows in tables

2007-01-18 Thread Brad Bonkoski
Dan Shirah wrote: Hello all, I am trying to pull data and then loop through the multiple results display in seperate rows. My database contains several tables which are all tied together by the credit_card_id. After running the query, it ties the unique record together by matching the credi

[PHP] Oracle Execute Function

2007-01-18 Thread Brad Bonkoski
Hello All, I have this Oracle function, and within my code I call it like this: $sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, null, null); END;"; $stmt = $db->parse($sql); $rc = null; ocibindbyname($stmt, ":result", &$rc); $db->execute($stmt, $sql

Re: [PHP] md5

2007-01-17 Thread Brad Bonkoski
[EMAIL PROTECTED] wrote: Still.. that has nothing to do with how well known MD5 is (so I stand by my point). Was not trying to refute your point. Just pointing something out with regards to the "security" of MD5 hashes, and what being "well known" or at least popular does for you. What you

Re: [PHP] md5

2007-01-17 Thread Brad Bonkoski
[EMAIL PROTECTED] wrote: MD5 is a hasing algorithm.. one-way.. really only good for checking known values and keeping them 'private', like storing passwords in a database. That way, if someone breaks into your database, they don't get the passwords, only the non-reversible MD5 hashes of the

Re: [PHP] inheritance php4

2006-12-12 Thread Brad Bonkoski
bruce wrote: hi... haven't used php classes.. so this might not pertain.. but do php classes have the concept of public/private functions? Not in PHP 4 are the parent functions that you're trying to access public/private? -Original Message- From: blackwater dev [mailto:[EMAIL PROTE

Re: [PHP] Additional query for number of records in table

2006-11-17 Thread Brad Bonkoski
[EMAIL PROTECTED] wrote: hi, I have query to select products for specific category from DB, something like: SELECT prod_id, prod_name,... FROM products LIMIT $From, $To where $From and $To values depend of on what page you are. let say there are 100 products and I'm listing 25 products per page.

Re: [PHP] Looping through array

2006-11-16 Thread Brad Bonkoski
Ashley M. Kirchner wrote: Say I have an array containing ten items, and I want to display them in a table as follows: 5 4 3 2 1 10 9 8 7 6 What's the best way to loop through that array to do that? My thinking gets me to create a loop for 5 through 1, repeated twice, and the

Re: [PHP] Looping through array

2006-11-16 Thread Brad Bonkoski
Ashley M. Kirchner wrote: Say I have an array containing ten items, and I want to display them in a table as follows: 5 4 3 2 1 10 9 8 7 6 What's the best way to loop through that array to do that? My thinking gets me to create a loop for 5 through 1, repeated twice, and the

Re: [PHP] only one at atime

2006-10-30 Thread Brad Bonkoski
Ahmad Al-Twaijiry wrote: Hi everyone, I create a php script that will run every minute (by cronjob) and update some database tables (php 5, database mysql 5, tables type innodb) the problem is that I want this script to run only one at atime (only one process from this script can run ) for exa

Re: [PHP] mysqldump problem from PHP

2006-10-23 Thread Brad Bonkoski
Edward Kay wrote: hi all, Im doing the following dump through PHP: $output = shell_exec('mysqldump '. $db_database .' > '. $backup_path.$filename); It doesnt seem to work but when I run the exact same command (with appropriate values) in the command line it creates the dump file. What could be

Re: [PHP] foreach

2006-10-10 Thread Brad Bonkoski
João Cândido de Souza Neto wrote: Hello. In the follow code: $numbers=array(1,2,3,4,5); foreach ($numbers as number) { ... } Inside foreach, could i know if i am in the last element of the array $numbers? Sure, maintain a count in the foreach and then compare to count($numbers)..but

Re: [PHP] need help to build a query

2006-10-09 Thread Brad Bonkoski
[EMAIL PROTECTED] wrote: hi to all, I have table orders with primary key order_id. I have table uploaded_files with primary key ufid and uploaded files are linked to orders by order_id column. I have to list all orders and uploaded files. this works fine: $query = mysql_query(" select order_

Re: [PHP] See if this makes any sense

2006-10-05 Thread Brad Bonkoski
Deckard wrote: Hi, I've burned my brain, checked other sites and come to a code that works. I ask you, please, to see if this makes any sense and/or can be improved. I'd really appreciate. Warm Regads, Deckard dbInsert.php: ---

Re: [PHP] Breaking lines / NEW

2006-10-03 Thread Brad Bonkoski
deas ? Warm Regards, Deckard Brad Bonkoski wrote: Deckard wrote: Hello, I have this code to write three lines in a file (config.php): $stringData = '$hostname = ' . $hostname . '\n' . '$mysql_username = ' . $mysql_username . '\n' . '$mysql

Re: [PHP] Breaking lines

2006-10-03 Thread Brad Bonkoski
Deckard wrote: Hello, I have this code to write three lines in a file (config.php): $stringData = '$hostname = ' . $hostname . '\n' . '$mysql_username = ' . $mysql_username . '\n' . '$mysql_user_password = ' . $mysql_user_password . '\n'; but instead of breaking a line, it appears in the file

Re: [PHP] how do I get this line to work inside double quotes

2006-10-02 Thread Brad Bonkoski
Ross wrote: $mail_body .= "sans-serif\"> stripslashes($mail_text) "; this just returns {stripslashes(it\'s a testss} $mail_body .=" ".stripslashes($mail_text)." "; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] class usage

2006-09-29 Thread Brad Bonkoski
benifactor wrote: ok, about five minutes ago i decided to learn classes and delve into php's oop side. what i came up with was this... //start example code class newsletter { function send ($email,$subject,$message) { if ($email) { echo("the following message was

Re: [PHP] Override php.ini

2006-09-22 Thread Brad Bonkoski
the ini directive for this is: asp_tags and it appears you can set them in the .htaccess file on a per directory basis. See the user contributed notes on www.php.net/ini_set HTH -B Beauford wrote: Is there a way I can use <% %> instead of for the opening and closing tags of a php script. I t

Re: [PHP] +AFs-OT+AF0- Working with version control

2006-09-21 Thread Brad Bonkoski
Chris W. Parker wrote: > Hello, > > This is off topic but I wanted to get the list member's opinions on the > subject as it will probably benefit someone else. > > Currently I don't use version control at all. What I do instead is have > one directory that contains my development website and one

Re: [PHP] php - mysql query issue

2006-09-15 Thread Brad Bonkoski
Have you tried echoing out your query to run on the backend itself? Maybe there is some problem with how your join is being constructed... Perhaps a left outer join is called for? Hard to tell without having knowledge of your table structure and table data... -B Dave Goodchild wrote: Hi all.

Re: [PHP] Overriding core functions

2006-08-22 Thread Brad Bonkoski
Some already good workarounds given for this question... BUT. Is it even possible to override a core function? Like I wrote a function called 'exit' and I got a parser error, which leads me to believe it is not even possible to override the core functions. Is this true of ALL PHP functions? -B

Re: [PHP] --with-openssl on x64

2006-08-22 Thread Brad Bonkoski
Hmm.. in my system, /usr/lib is a sym link to /usr/lib64... but.. Try this configure option: --with-openssl[=DIR] -B Marten Lehmann wrote: Hello, openssl is compiled for x86 on my system, so the libs are in /usr/lib64 rather than /usr/lib. But configure only looks in /usr/lib and gives me

Re: [PHP] Setting flags versus checking for existing/nonexisting values

2006-08-15 Thread Brad Bonkoski
Chris W. Parker wrote: Hello, Is it a better practice to set flags to determine the action of your code or is it perfectly acceptable to have your code determine what it should do based on the existence (or lack thereof) of data? For example: versus: Of course this is an overly simplist

Re: [PHP] Capturing System output

2006-08-15 Thread Brad Bonkoski
Stut wrote: Brad Bonkoski wrote: Had this problem in the past, and always programmed around it, but wondering if there is an easier way. Good Example: Creating a setup for connecting to a mysql database. Want to do something simple to make sure they have entered a valid username/password

[PHP] Capturing System output

2006-08-15 Thread Brad Bonkoski
Hello All.. Had this problem in the past, and always programmed around it, but wondering if there is an easier way. Good Example: Creating a setup for connecting to a mysql database. Want to do something simple to make sure they have entered a valid username/password for the database. So,

Re: [PHP] calendar Q

2006-08-10 Thread Brad Bonkoski
Really depends on how you display the calendar... if you go day by day building the table cells, then it should be easy enough because you should already have the date you are working with... so a query like "select count(*) from events where date='date'" and if count is > 0 then display it diff

Re: [PHP] Best way to get PHP5

2006-08-09 Thread Brad Bonkoski
Chris W. Parker wrote: Hello, Generally (well, actually 100%) I just use whatever version of PHP is included with a certain distro (Redhat pre-Fedora, Fedora Core, CentOS). None of the versions I've used have come with PHP5 and I'd really like to get with the times and use PHP5. I know that F

Re: [PHP] I only want x number of lines of data

2006-08-09 Thread Brad Bonkoski
Ross wrote: At the mometn I have this function display_result($module_no) { $count = 0; //Of course you *should* initialize $count $start = 1; $end = 3; if ($module_no != "") { $module_no =unserialize ($module_no); foreach ($module_no as $number => $data) { $count=$count+1;

Re: [PHP] writing to fild on another server

2006-08-04 Thread Brad Bonkoski
blackwater dev wrote: I have a web server and an images server. My web server doesn't have enought space for the images, hence the images server. I have to download properties from a realty database hourly and the data goes in to a db on my webserver while the image needs to be taken from a

Re: [PHP] Documentation of PHP sourcecode

2006-08-02 Thread Brad Bonkoski
www.phpdoc.org similar to javadocs, and works pretty well. -Brad Paul Zwiers wrote: Dear all, With a growing base of previous PHP work (not to be be mistaken for a "framework" :) ) I also find myself recoding and reinventing the wheel. Something I really do not want to do. I am looking in s

Re: [PHP] Dynamically assigning var namesi

2006-08-01 Thread Brad Bonkoski
Hi Bob, Based on what you said, I would say the normal coding way of handling this is with an array. If you are unfamiliar with them, www.php.net/array would be a good place to start. -Brad bob pilly wrote: Hi all Does anyone know if you can assign a new variable name based on the contents

[PHP] Error Loading php module

2006-07-31 Thread Brad Bonkoski
Any insights or tips into this? httpd: Syntax error on line 232 of /home/www/conf/httpd.conf: Cannot load /home/www/modules/libphp5.so into server: /home/www/modules/libphp5.so: undefined symbol: _pcre_ucp_findprop TIA. -Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Silly varible question

2006-07-13 Thread Brad Bonkoski
Why not just have another array... $bag = array(); $item[] array_push($bag, $item); then store the bag in the session. so, you would have count($bag) items in your shopping cart, and you would be able to easily access them. Just a thought, instead of munging variable names. -B Ed Curti

Re: [PHP] arrays

2006-07-10 Thread Brad Bonkoski
When loading the array you will only ever get the last record returned... so count($oarray) will always be 1? Perhaps something like this: Function $sql = "..."; $ret = array(); while($row = mysql_feth_array($reault)) { array_push($ret, $row); } return $ret; then... $data = function(); $c =

Re: [PHP] Where is phpinfo getting this?

2006-07-10 Thread Brad Bonkoski
Check your include_path in your php.ini file. -Brad Robert Hicks wrote: include_path.;C:\php5\pear.;C:\php5\pear I have PHP5 sure but it is in C:\PHP. I have looked in my ENV and I have scoured the registry and nothing comes up for "php5". So where is it getting this entry? :Robert

Re: [PHP] ONE PAGE CONNECTS MANY DATABASE

2006-06-30 Thread Brad Bonkoski
Yes. For Mysql.. http://www.php.net/manual/en/function.mysql-connect.php -B BBC wrote: Hi again.. I'm wondering is it possible to make one page which connects to many DataBase? If it's possible please tell me where can I get the references? Thank Best Regards ==

Re: [PHP] Question about constructors and destructors

2006-06-28 Thread Brad Bonkoski
I get: (on Linux, PHP 5.1.4) php cls_t.php Will buildBuildingFinished buildingUnsetingDestroyingUnset complete Mathieu Dumoulin wrote: I posted a bit earlier and did some other tests and now i have a VERY simple question... check the following code :

Re: [PHP] Controlling a scanner with PHP

2006-06-27 Thread Brad Bonkoski
Arno Kuhl wrote: -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: 27 June 2006 03:11 To: Peter Lauri Cc: 'George Pitcher'; php-general@lists.php.net Subject: Re: [PHP] Controlling a scanner with PHP Peter Lauri wrote: Probably nobody, as PHP is a Server Side Scriptin

Re: [PHP] A variable inside a variable?

2006-06-26 Thread Brad Bonkoski
This might help... http://www.php.net/manual/en/function.array.php -B Alex Major wrote: Thanks for your help with my other question, heres a new one for you. I need to nest a variable, inside another variable. For example: $($buildingname)level How (if at all) is this possible? Thanks. Ale

Re: [PHP] xmldoc

2006-06-23 Thread Brad Bonkoski
weetat wrote: Hi all, I have simple code below : It run ok in one of my test server (Red Hat Enterprise) , PHP 4.3.2. However in the one of production server which have same OS and PHP version , the code did not display "done parsing xml" in log file. It just display "starting pars

Re: [PHP] Array

2006-06-19 Thread Brad Bonkoski
Your result variable is a result identifier, not the actual data... check out: http://www.php.net/manual/en/function.mysql-fetch-row.php or something similar... -Brad Rob W. wrote: $query="SELECT switchport FROM network"; $result=mysql_query($query); $sql_range=array($result['switchport'])

Re: [PHP] PHP Automation

2006-06-19 Thread Brad Bonkoski
If you cron job the script file and perhaps convert it to something like PDF then you could feed it to the printer through the shell script... I'm sure there are other ways, just one suggestion from the top of my head.. -brad Jef Sullivan wrote: Greetings all, I have a situation that I'm n

[PHP] Accepting File Uploads from CURL

2006-06-15 Thread Brad Bonkoski
Hello All, I am using PERL to generate an XML file from a database query. no problems there. I then try to use curl to send it to an upload script. Essentially the command line looks like this: curl -H 'Content-Type:text/xml' -d file.xml server/up.php for my up.php I am just trying to dump stu

Re: [PHP] Checking for empty()

2006-06-14 Thread Brad Bonkoski
Weel, since this is a PHP list I will assume you are checking once the page is posted/submitted... off the top of my head, the functions strlen() and isset() come to mind. -Brad Ashley M. Kirchner wrote: I have a form with various fields on it that I want to make sure aren't empty or the

Re: [PHP] Calculating difference between two days

2006-06-14 Thread Brad Bonkoski
You could just parse the dates out and feed them to mktime(), subtract the difference between the two (in seconds) and use that to determin the number of days... Something like: [EMAIL PROTECTED] wrote: Hi, I need to calculate no. of days between two dates, actually between date stored in

Re: [PHP] Simple class declaration returns error

2006-06-14 Thread Brad Bonkoski
What version of PHP are you using? I suspect something less then 5.0 which means the public/private declarations are not supported... (So remove 'public' and see if it works) -Brad Dave M G wrote: PHP List, I am in the preliminary stages of designing my first object oriented PHP based web s

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Brad Bonkoski
Eric Butera wrote: On 6/9/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote: if numerically indexed: $max = count($array); for($i=0; $i<$max;$i++) { if( $i <= 3 ) continue; else { //do what you will } } Why not start $i at 3 and skip the if else? you c

Re: [PHP] Skip first 4 array values

2006-06-09 Thread Brad Bonkoski
if numerically indexed: $max = count($array); for($i=0; $i<$max;$i++) { if( $i <= 3 ) continue; else { //do what you will } } for associative... $count = 0; foreach($arr as $k => $v ) { if($count <= 3 ) conitnue; else { //do stuff } $count++; } -Brad

Re: [PHP] xml validation

2006-06-09 Thread Brad Bonkoski
This article has some good information about PHP/XML including validation: http://www.zend.com/php5/articles/php5-xmlphp.php -Brad weetat wrote: Hi all , Thanks to everbody in this group , really help me a lot. I have a raw xml file from our clients. My question is how to validate the xm

Re: [PHP] reset a resource?

2006-06-08 Thread Brad Bonkoski
Perhaps this will help: http://www.php.net/manual/en/function.mysql-data-seek.php -brad sam wrote: After I've looped through a resource do I have to run the query again to load up 'mysql_fetch_assoc' or is there some kind of reset function I can't find? $q = "SELECT * FROM table; $s = my

Re: [PHP] server sending notifications to clients

2006-06-08 Thread Brad Bonkoski
kartikay malhotra wrote: Hi All, Is there a way for the server to notify the client about an event, provided the client was online in the past X minutes? To elaborate: A client comes online. A script PHP executes (serves the client), and terminates. Now if a new event occurs, how can the

Re: [PHP] Passing variables.

2006-06-08 Thread Brad Bonkoski
My Humble suggestion is possibly: upon preview, actually post the edited data to a temp table, and then pull the HTML from the temp table to display the preview page. Currently you are passing the original content to the preview page. And You might want to look to see if javascript has any fun

  1   2   3   >