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

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

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

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

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] --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] 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] 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] +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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] Magic quotes good or Bad?

2006-04-05 Thread Brad Bonkoski
IMHO, it really depends on a couple of things... 1). how you use it and 2). How much control you want... If you have a single point of entry for database actions, like a class that mimics the database structure and handles updates, inserts, deletes, then it makes sense to turn them off to give

Re: [PHP] problem using mysql_connect function under windows XP

2006-04-05 Thread Brad Bonkoski
Create a page like this: and see what the output tells you about mysql...might shed some light on it. -B Alain Roger wrote: i've seen that non of extension are activated...neither mysql.dll nor mysqli.dll after uncommenting them and restarting Apache, it still does not work :-( On 4/5/06, J

Re: [PHP] problem using mysql_connect function under windows XP

2006-04-05 Thread Brad Bonkoski
on_dir = "F:\WebServer\PHP511\ext" 4. i restarted apache 5. phpinfo still provide no info regarding MySQL what should i do ? On 4/5/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote: Create a page like this: and see what the output tells you about mysql...might shed some light

Re: [PHP] Php Script Stumped!

2006-04-06 Thread Brad Bonkoski
1. Look at this: http://javascript.internet.com/forms/form-focus.html 2. See Below 3. Take a look at this function: http://www.php.net/manual/en/function.date.php -B marvin hunkin wrote: Hi. doing this script for an assignment, and got it basically working. the only problems are: 1.

Re: [PHP] style

2006-04-06 Thread Brad Bonkoski
short_open_tag Dallas Cahker wrote: What is that called and where in the php.ini file do I enable it? Sorry if this is a stupid question but since I dont know what its called it makes it difficult to google it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Oracle stored procedures

2006-04-06 Thread Brad Bonkoski
I am using PHP with Oracle, but not executing stored procedures. I assume you are already validating the contents of the $addr variable before you bind it? Otherwise, no real ideas here... -B Jay Blanchard wrote: [snip] I have a stored procedure in Oracle; p_BILL_TO_ADDRESS1 IN C

[PHP] Handling Large Select Boxes

2006-04-07 Thread Brad Bonkoski
Hello, I have a form for user interaction and part of it is a select box with a large number of options from a database ~12K options. Currently I have a function which queries the DB to get fresh data and loads the HTML (Y) into a string, so the DB is only hit once, but the page still takes a

Re: [PHP] Handling Large Select Boxes

2006-04-07 Thread Brad Bonkoski
Good point... Maybe the gods of usability can kick the user's in the butt to get them to clean up the data! Previously they used a free text field, which is why the problem is as bad as it is currently All the data has to be available, so the only other option I can think of is to select

Re: [PHP] microtime questions

2006-04-07 Thread Brad Bonkoski
Interesting... as for your first question... Know that PHP/Apache does not have free reign to your CPU, so the times could be different based on the scheduling going on in the OS kernel. As for the second one... No idea why you would get a negative number, I just copied and ran from the comman

Re: [PHP] Completing forms offline with PHP/MySQL

2006-04-07 Thread Brad Bonkoski
If your users are using Windows, then something like http://www.hypervisual.com/winbinder/ might be good on the user side, as you can bundle the PHP binary and everything else needed into one executable (with some work of course) And then they can create a file formatted to your specifications to

Re: [PHP] microtime questions

2006-04-07 Thread Brad Bonkoski
How is the CPU not in question? Does this script run on air? It may not be YOUR CPU, but it is still a CPU bound by the sceduling algorithm of the Operating System, so the time differentials are too be expected. -B tedd wrote: At 12:24 PM -0400 4/7/06, Brad Bonkoski wrote: Interesting

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Brad Bonkoski
why do you have single quotes around year? -B Tom Chubb wrote: I'm working on an insert record page with a multiple file upload script of which I understand the fundamentals. However, on submission I am getting the following error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPAC

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Brad Bonkoski
thanks for the clarification, I guess the other solution would be to avoid using names with special meaning for column names... -B Ray Hauge wrote: On Friday 07 April 2006 12:53, Joe Henry wrote: On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: $insertSQL = "INSERT INTO cars (model,

Re: [PHP] microtime questions

2006-04-08 Thread Brad Bonkoski
tedd wrote: -B At 12:51 PM -0400 4/7/06, Brad Bonkoski wrote: How is the CPU not in question? Does this script run on air? I did not say that. I said that it was not MY CPU that was involved and it isn't. Who cares, it is irrelavent who's CPU it is runing on. It may n

Re: [PHP] Handling Large Select Boxes

2006-04-08 Thread Brad Bonkoski
Thanks for the responses to this... The AJAX thing would probably not work as this is a critical piece to the UI, so even though the form would load faster, the users would still really need to wait for the select options to come through before they could actually do any *work* on the page.

Re: [PHP] how to assign a value to a variable inside a class

2006-04-10 Thread Brad Bonkoski
How about this: class foo { var $name; function setName($value) { $this->name = $value; } } -B Merlin wrote: Hi there, I would like to assign a value inside a class like this: var $db_username = $old_name; Unfortunatelly this does not work and I do get following error: Par

Re: [PHP] how to assign a value to a variable inside a class

2006-04-11 Thread Brad Bonkoski
Merlin wrote: chris smith schrieb: On 4/11/06, Merlin <[EMAIL PROTECTED]> wrote: chris smith schrieb: On 4/11/06, Merlin <[EMAIL PROTECTED]> wrote: Hi there, no much simpler. I do not need to assign the value from outside the class. This is just inside the class. I have the login dat

Re: [PHP] Session_id within URL

2006-04-11 Thread Brad Bonkoski
session_start(); $s = SID; //get Session ID echo "Page"; Mostly for passing the session as a GET variable to another page, like for anything from authentication tokens to form data etc... Of course for form data it would probably be better to encapsulate the session veriables within the form.

Re: [PHP] PHP with Oracle

2006-04-19 Thread Brad Bonkoski
Assuming the PHP web page is available, anyone else having problems connecting to php.net? -B Jay Blanchard wrote: [snip] is there a ready script that handle entering user name and password for authentication by extracting the Data from Oracle10g DB without showing the URL in the address bar..

Re: [PHP] Re: no offense to Rasmus... are you kidding me

2006-04-20 Thread Brad Bonkoski
Maybe it is just me, but I think these types of discussions/debates concerning opposing view points on the direction of web programming is as imperative to the general PHP community (i.e. this list) as the dangers of register globals and magic quotes etc At least more relevant then the i

[PHP] Validating XML

2006-04-21 Thread Brad Bonkoski
Hello, Anyone have pointers to good tutorials out there for validating XML with DTD? I have looked at the top comment on: http://www.php.net/manual/en/ref.xmlreader.php#xmlreader.constants Where you set the parser property to validate, but it is kind of like a black box...what is it using the

Re: [PHP] how to get the absolute path of an included file?

2006-04-27 Thread Brad Bonkoski
Bing Du wrote: Hello, Here are the two scripts. The result is 'var is' rather than 'var is foo'. My suspect is I did not set the file path right in 'include'. So in file2.php, how should I get the actual absolute path it really gets for file1.php? Is it stored in some environment variable

Re: [PHP] chop x amount of characters from the begining of a string

2006-05-02 Thread Brad Bonkoski
Perhaps this will work.. http://www.php.net/manual/en/function.substr.php Ross wrote: I have a word say 'example' I want to chop of two or 3 chacters from the front to leave 'ample' or 'mple'. Is there a php function to do this? Ross -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Searching and getting values out of array maps

2006-05-03 Thread Brad Bonkoski
Here's a stab... $colors = array("red"=>"#ff","gree"=>"#00ff00","blue"=>"#ff"); echo $colors["blue"]; should output #ff HTH -Brad Jonas Rosling wrote: Hi all, I'm kind of new with PHP. I work alot with another language called Lasso, reminds kind of PHP but not the same. I trying t

Re: [PHP] array_push in array maps

2006-05-03 Thread Brad Bonkoski
I don't believe you 'push' to an associative array like this, but if you want to add black for example...just do: $colors['black'] = '#ff'; -Brad Jonas Rosling wrote: Need solve another case regarding array maps. Is it possible to insert more values like with array_push in arrays as bellow

Re: [PHP] array_push in array maps

2006-05-03 Thread Brad Bonkoski
or white ;-) Stut wrote: Brad Bonkoski wrote: $colors['black'] = '#ff'; Black? Are you sure? -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array_push in array maps

2006-05-03 Thread Brad Bonkoski
What kind of values are stored in $row[2] and $row[5]? You might need to keep the single quotes $test['$row[2]'] = $row[5]; -Brad Jonas Rosling wrote: There's allways mutch to learn. :-) I'm very happy for all help I can get. I ran into another problem when trying to insert a value. I had

Re: [PHP] Avoiding user refresh of pages with forms

2006-05-03 Thread Brad Bonkoski
Is there a way to key off of the data inserted? Like some unique value or set of values that you can do a quick lookup before you insert/update/delete again... Or you could venture into an AJAX style of submission keyed off of a button click then a refresh to a 'report' page, in which case no P

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Brad Bonkoski
Will this also work with an associative array? If this is what he is talking about, I tried it and it does not work I put this together though and it works, not sure if it is the *best* way though... $colors = array('white'=>'#ff','black'=>'#00','blue'=>'#ff');

Re: [PHP] can't work out the syntax error

2006-05-04 Thread Brad Bonkoski
Ross wrote: Hi, The line was this. echo " HREF=\"javascript:open_window('$PHP_SELF?action=view_record&userid=$userid');\">View onClick=\"return confirm('Are you sure?');\">Delete\n"; I have registered globals off so tried this... echo " HREF=\"javas

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Brad Bonkoski
I get nothing do you get something different? Jay Blanchard wrote: [snip] $colors = array('white'=>'#ff','black'=>'#00','blue'=>'#ff'); [/snip] What happens when you echo $colors[1]? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] Echo a value from an arrays position

2006-05-04 Thread Brad Bonkoski
Nope... dead air. Of course getting an indexed value into an associative array seems a bit odd to me... maybe Jonas could shed some light on why he would go this route... Jay Blanchard wrote: [snip] I get nothing do you get something different? [/snip] Not even 'array'? -- PHP

Re: [PHP] PHP URL query

2006-05-10 Thread Brad Bonkoski
-B IraqiGeek wrote: Hi all, I'm somewhat new to php, though I have played a bit with the language. I'm currently learning the language, and I'm having a problem passing variables through "URL query". Here is what I have: A simple HTML file that contains: Hi, this is a test! and a php

Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-12 Thread Brad Bonkoski
In Exploder 7 beta 2 I actually get an access denied error... but works in firefox. Mike wrote: I am not seeing a blank page here. Porpoise wrote: "tedd" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Try this: http://xn--ovg.com/ajax_page1 Please understand: a) It's a r

Re: [PHP] Back arrow button

2006-05-12 Thread Brad Bonkoski
Not really a PHP question... But, since it is Friday ;-) As our friend Google: http://www.google.com/search?hl=en&q=Javascript+disable+back+button HTH -Brad Sugrue, Sean wrote: Does anyone know how to launch a new page with having the back arrow button grayed out? Sean -- PHP General M

Re: [PHP] Handling Large Check Box Data

2006-05-17 Thread Brad Bonkoski
Well, listing all the values in a comma separated list in the DB would be fairly simple to parse, check out: http://www.php.net/manual/en/function.explode.php As far as what is better depends on many things... 1). Maintaining the code, might be better to have each check box have its own field,

Re: [PHP] storing single and double quote in MySQL

2006-05-22 Thread Brad Bonkoski
Looks good to me, just make sure you use: http://www.php.net/manual/en/function.stripslashes.php if you have to dump that information back to the users. (you might want to check out: addslashes() to add the slashes before your DB insert, just to keep those things under your command) -Brad [EMAI

Re: [PHP] storing single and double quote in MySQL

2006-05-22 Thread Brad Bonkoski
Richard Lynch wrote: On Mon, May 22, 2006 11:37 am, Brad Bonkoski wrote: http://www.php.net/manual/en/function.stripslashes.php if you have to dump that information back to the users. If you are using http://php.net/stripslashes on data coming out of your database, you are

Re: [PHP] getting subdirectory

2006-05-23 Thread Brad Bonkoski
Perhaps check out some of these http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server -Brad Dallas Cahker wrote: how do I get the subdirectory that a page is being pulled from. say I have three sites running the same script and I need to determine which site is whi

Re: [PHP] storing single and double quote in MySQL

2006-05-24 Thread Brad Bonkoski
in your php.ini file what is the value of: magic_quotes_gpc? (hint: should be off, if it is on, then you are add slashes twice...) -Brad [EMAIL PROTECTED] wrote: ok. I just made one test and if you can then explain something to me: I entered in form (textarea) afan's "crazy" web and stored in d

Re: [PHP] weird characters problem

2006-05-26 Thread Brad Bonkoski
Angelo Zanetti wrote: Jochem Maas wrote: Angelo Zanetti wrote: Hi all. I have a situation where people enter values into a textfield can include the following: 1 ! 2 @ 3 # 4 $ 5 % 6 ^ 7 & 8 * 9 ( 10 ) 11 ; 12 : 13 " 14 ' 15 ? 16 - 17 _ 18 now once the move to another page and then

[PHP] Escaping quotes for DB Entry

2006-05-26 Thread Brad Bonkoski
All... A lot has been said recently about the dangers of the family of magic_quotes... I understand the dangers. The question is, for those of us using a database that does not have a *real_escape_string function...Oracle for example. What is the *best* way to escape quotes for DB insertion? I

Re: [PHP] Escaping quotes for DB Entry

2006-05-26 Thread Brad Bonkoski
Jochem Maas wrote: Brad Bonkoski wrote: All... A lot has been said recently about the dangers of the family of magic_quotes... I understand the dangers. The question is, for those of us using a database that does not have a *real_escape_string function...Oracle for example. What is the

Re: [PHP] Escaping quotes for DB Entry

2006-05-26 Thread Brad Bonkoski
Jochem Maas wrote: Brad Bonkoski wrote: Jochem Maas wrote: ... Understood what the esacpe character needs to be...the question is the best way to get it there? Currently I have: magic_quotes_sybase = On this adds single quotes automatically - addslashes (unless Im mistaken

Re: [PHP] anti SQL injection method in php manual.

2006-05-26 Thread Brad Bonkoski
Dotan Cohen wrote: In the php manual: http://www.php.net/manual/en/function.mysql-real-escape-string.php The following method is suggested: What is the purpose of the sprintf? If it were using %d on integers I could see the point, but as we're talking about %s strings, what is the advantage

Re: [PHP] is there a faster "file" command?

2006-05-31 Thread Brad Bonkoski
Merlin wrote: Hi there, I am reading a remote plain text file from another server via the file command: $str = file ("http:/x"); This is a feed so there is no other way then reading it remote. Now this reading takes up between 0.5 and 1.0 s which is far to slow. The whole other proce

Re: [PHP] Session variables and words with spaces

2006-05-31 Thread Brad Bonkoski
Perhaps you should load up your initial form and then use the "view source" option in your browser as this will probably give you insight into your problems... -Brad Beauford wrote: Hi, I have a form in which a drop down field is populated from a MySQL database. I am also using sessions. Th

Re: [PHP] ob_flush() problems

2006-05-31 Thread Brad Bonkoski
cajbecu wrote: Hello, for ($i=0; $i < 10; $i++) { $output = "ccc2"; print ""; echo $output; print ""; ob_flush(); flush(); sleep(1); } I want to show on the browser, "ccc2" (example) every 1 second, but it shows all the text when the fo

Re: [PHP] Session variables and words with spaces

2006-05-31 Thread Brad Bonkoski
-Original Message- From: Brad Bonkoski [mailto:[EMAIL PROTECTED] Sent: May 31, 2006 2:28 PM To: Beauford Cc: php-general@lists.php.net Subject: Re: [PHP] Session variables and words with spaces Perhaps you should load up your initial form and then use the "view source" option in your

Re: [PHP] If value is odd or not

2006-06-02 Thread Brad Bonkoski
if ($value % 2 == 0 ) echo "Value is even"; else echo "Value is odd"; Jonas Rosling wrote: Hi all, is there any easy why to check if a value is odd or not? Thanks // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Control GET data

2006-06-06 Thread Brad Bonkoski
Why are you forcing the input into the GET variable or the URL string? Why not just use the post from the form variable?? As for you question... the answer is yes: make the submit button a button and onclick="javascript_function()" Javascript_function() { val1 = document.getElementbyId("last

Re: [PHP] Running Scripts from the Command Line in Linux

2006-06-08 Thread Brad Bonkoski
$ php script.php OOzy Pal wrote: How can I run a .php script from the command in Linux? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

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

<    1   2   3   >