[PHP] "Securing PHP Web Applications" book

2009-10-20 Thread Afan Pasalic
Hi, did anybody read the book "Securing PHP Web Applications" by Tricia Ballad & William Ballad? (http://www.amazon.com/Securing-PHP-Applications-Tricia-Ballad/dp/0321534344/ref=sr_1_1?ie=UTF8&s=books&qid=1256042083&sr=8-1) Any opinions? L -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] How to assign eval() to variable?

2009-05-22 Thread Afan Pasalic
et_clean(); On May 23, 2009 1:46am, Afan Pasalic wrote: > hi, > > I have on one website boxes with information, pulled from mysql. the content can be string, php code, url of other website or url to specific file etc. > > > > currently, I have something like this: >

[PHP] How to assign eval() to variable?

2009-05-22 Thread Afan Pasalic
hi, I have on one website boxes with information, pulled from mysql. the content can be string, php code, url of other website or url to specific file etc. currently, I have something like this: // connect to db // mysql_query() to get box content and content_type switch($content_type) { c

Re: [PHP] password field validation

2009-03-12 Thread Afan Pasalic
haliphax wrote: On Thu, Mar 12, 2009 at 2:39 PM, Jason Todd Slack-Moehrle wrote: if (empty($_POST[PASSSWORD])) { $GERROR="TRUE";} If that's a direct copy/paste from your actual code, there is an extra S in PASSWORD. Also, you should enclose the array key in quotes: if (empty($_

Re: [PHP] password field validation

2009-03-12 Thread Afan Pasalic
Jochem Maas wrote: Afan Pasalic schreef: Andrew Ballard wrote: On Thu, Mar 12, 2009 at 3:05 PM, Jason Todd Slack-Moehrle wrote: Hi All, I have an input field with type="password". I am trying to do some error checking to see if the user puts a value in after t

Re: [PHP] password field validation

2009-03-12 Thread Afan Pasalic
Andrew Ballard wrote: On Thu, Mar 12, 2009 at 3:05 PM, Jason Todd Slack-Moehrle wrote: Hi All, I have an input field with type="password". I am trying to do some error checking to see if the user puts a value in after they submit the form (i.e not left it blank) Here is what I have: on

Re: [PHP] multiple choice dropdown box puzzle

2009-02-23 Thread Afan Pasalic
PJ wrote: I think this is a tough one... and way above my head: PLEASE READ ALL OF THE ABOVE TO UNDERSTAND WHAT I AM TRYING TO DO. Having a bit of a rough time figuring out how to formulate php-mysql to insert data into fields using a multiple dropdown box in a form. to post I am using the fo

Re: [PHP] Speed Opinion

2009-02-04 Thread Afan Pasalic
PHP wrote: Hi all, I am seeking some knowledge, hopefully I explain this right. I am wondering what you think is faster. Say you have 1000 records from 2 different tables that you need to get from a MySQL database. A simple table will be displayed for each record, the second table contains r

[PHP] is this use of subquery "smart"

2009-02-04 Thread Afan Pasalic
What would be more "appropriate" way to create a query: Solution 1: select records from registrants table SELECT r.reg_id, r.date_registered, r.old_record FROM registrants r WHERE r.org_id=12 AND r.reg_status=0 AND r.reg_id=r.person_id # php "validation" if($old_record != 0) { SELECT CONCAT(

Re: [PHP] developers life

2009-01-19 Thread Afan Pasalic
Nathan Rixham wrote: well just for the hell of it; and because I'm feeling worn.. anybody else find the following true when you're a developer? - frequent bursts of side-tracking onto more interesting subjects - vast amount of inhuman focus, followed by inability to remain focussed - general t

[PHP] search for person by comparing his data with data in mysql

2008-12-19 Thread Afan Pasalic
hi, I have to build a little "search" form. a visitor enters his/her personal and work data (first name, last name, email, org. name, phones (home phone, work phone, cell) home address, work address) using a form, and then administrator has to compare these data with existing data in database (

Re: [PHP] Displaying information from table graphically

2008-11-21 Thread Afan Pasalic
[EMAIL PROTECTED] wrote: I have a PHP application that accesses data from MySQL. There is table called "rooms", and table called "beds". There is another table called "patients". Patients are being placed into beds, and beds are in the rooms. PHP application currently displays all information in

Re: [PHP] how to kill a session by closing window or tab clicking on X?

2008-10-27 Thread Afan Pasalic
Stut wrote: On 27 Oct 2008, at 14:10, Afan Pasalic wrote: I'm sorry for posting this more javascript then php question, but it's somehow php related. here is the issue: very often people close the window/tab without logging out. I need solution how to "recognize" when [x]

[PHP] how to kill a session by closing window or tab clicking on X?

2008-10-27 Thread Afan Pasalic
hi. I'm sorry for posting this more javascript then php question, but it's somehow php related. here is the issue: very often people close the window/tab without logging out. I need solution how to "recognize" when [x] is clicked (or File >> Close) and kill the session before the window/tab is

Re: [PHP] web shot script

2008-10-23 Thread Afan Pasalic
Andrew Barnett wrote: Are you suggesting to create a PDF, and then convert from PDF to an image? I'm sorry. didn't get it has to be an image. Andrew 2008/10/24 Afan Pasalic <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> Andrew Barnett wrote: Hey

Re: [PHP] web shot script

2008-10-23 Thread Afan Pasalic
Andrew Barnett wrote: Hey Joey, I had a search, and from what I found, it would be very difficult unless you have root access to a server. Another way would be to create a HTML/CSS renderer using PHP, and then using that to take a screenshot. or, maybe, as an idea, save the page as pdf?

Re: [PHP] SESSION array problems [SOLVED]

2008-10-02 Thread Afan Pasalic
tedd wrote: > Hi gang: > > As strange as it may seem, but when session variables are passed to > another page (i.e., used) you cannot extract ALL OF THEM using a loop > when the variable names you are using are the same as the SESSION > index's names. > > In other words, you cannot do this: > > for

Re: [PHP] Re: SESSION array problems UPDATE

2008-10-02 Thread Afan Pasalic
Andrew Ballard wrote: > On Thu, Oct 2, 2008 at 10:37 AM, tedd <[EMAIL PROTECTED]> wrote: > >> To all: >> >> The code provided by nathan works for me as well. However, the problem is >> not easily explained, but I can demonstrate it -- try this: >> >> http://www.webbytedd.com/zzz/index.php >> >

Re: [PHP] SESSION array problems

2008-10-01 Thread Afan Pasalic
tedd wrote: > At 2:43 PM -0500 10/1/08, Afan Pasalic wrote: >> just tested. works fine >> >> >> >> $_SESSION = array( >> '6156' => array( >> 'first_name'=> 'Diane', >&

Re: [PHP] Re: SESSION array problems

2008-10-01 Thread Afan Pasalic
tedd wrote: >> What about: >> >> foreach ($_SESSION['user_id'] as $key => $value) >> { >> $last = $_SESSION['last_name'][$key]; >> $first = $_SESSION['first_name'][$key]; >> echo "$last, $first"; >> } > > Jay: > > Close, it produced: > > Array, Array > Array, Array > Array, Array > > Ch

Re: [PHP] SESSION array problems

2008-10-01 Thread Afan Pasalic
tedd wrote: > Hi gang: > > Apparently, there's something going on here that I don't understand -- > this happens far too often these days. > > Here's a print_r($_SESSION); of the session arrays I'm using: > > [user_id] => Array > ( > [0] => 6156 > [1] => 7030 >

Re: [PHP] SESSION array problems

2008-10-01 Thread Afan Pasalic
tedd wrote: > Hi gang: > > Apparently, there's something going on here that I don't understand -- > this happens far too often these days. > > Here's a print_r($_SESSION); of the session arrays I'm using: > > [user_id] => Array > ( > [0] => 6156 > [1] => 7030 >

Re: [PHP] Robert Cummings

2008-09-30 Thread Afan Pasalic
Daniel Brown wrote: > All: > > What was pointed as a passing mention in one thread I thought was > worth note in a thread of its own. As quoted by Rob: > > >> BTW, while we're off topic... my wife delivered our third child (second >> boy) 3 minutes after midnight yesterday :) >> >

Re: [PHP] how to recognize CSV file?

2008-09-20 Thread Afan Pasalic
Ashley Sheridan wrote: On Fri, 2008-09-19 at 14:24 -0500, Afan Pasalic wrote: Eric Butera wrote: On Fri, Sep 19, 2008 at 3:14 PM, Afan Pasalic <[EMAIL PROTECTED]> wrote: Eric Butera wrote: On Fri, Sep 19, 2008 at 2:59 PM, Afan Pasalic <[EMAIL PROTECTED]> wrote:

Re: [PHP] how to recognize CSV file?

2008-09-19 Thread Afan Pasalic
Eric Butera wrote: > On Fri, Sep 19, 2008 at 3:14 PM, Afan Pasalic <[EMAIL PROTECTED]> wrote: > >> Eric Butera wrote: >> >>> On Fri, Sep 19, 2008 at 2:59 PM, Afan Pasalic <[EMAIL PROTECTED]> wrote: >>> >>> >>>&

[PHP] how to recognize CSV file?

2008-09-19 Thread Afan Pasalic
hi, I have form where administrator has toupload csv file to update dome data in mysql. I was trying to validate entered file but got some crazy stuff I don't understand: for the same uploaded csv file, in different browser I'll get different results: Windows machine and IE: $_FILES['UploadedFile

Re: [PHP] Restore Leading Zeros in Zip Codes

2008-08-22 Thread Afan Pasalic
tedd wrote: At 8:44 PM -0600 8/21/08, Keith Spiller wrote: Hi, RE: Restore Leading Zeros in Zip Codes Does anyone happen to have a script that will restore the leading zeros in a mixed data set of 5 digit zip codes and 10 digit zip+4 codes? Any suggestions? Thanks, Keith Keith: Why

Re: [PHP] FCKEditor, TinyMCE, ... I need a light weight WYSIWYG HTML Editor

2008-08-18 Thread afan pasalic
Warren Vail wrote: > A textarea is a simple editor, I am assuming you want something better than > that, or you wouldn't have looked further. > I just tried Demo and got this: "Sorry, you must have Internet Explorer 5.5 or higher to use the WYSIWYG editor" ?!? I'm using FF. -afan > Have you h

Re: [PHP] changing order of items

2008-05-15 Thread afan pasalic
Eric Butera wrote: > On Thu, May 15, 2008 at 2:49 PM, afan pasalic <[EMAIL PROTECTED]> wrote: > >> Iv Ray wrote: >> >>> afan pasalic wrote: >>> >>>> this one bugs me for a while. how to change order. >>>> >>

Re: [PHP] changing order of items

2008-05-15 Thread afan pasalic
Iv Ray wrote: > afan pasalic wrote: >> this one bugs me for a while. how to change order. >> >> I have a list of tasks. by status, task could be 1 (todo) or 0 (done) - >> status value stored in mysql. I can list tasks per status or all. >> order number is stored

[PHP] changing order of items

2008-05-15 Thread afan pasalic
this one bugs me for a while. how to change order. I have a list of tasks. by status, task could be 1 (todo) or 0 (done) - status value stored in mysql. I can list tasks per status or all. order number is stored in mysql too. the easiest way to change order is to have form for each task where you

Re: [PHP] transfer list in textarea to comma delimited string

2008-05-02 Thread afan pasalic
Stut wrote: > On 2 May 2008, at 16:22, afan pasalic wrote: >> I have one textarea field in a registration form where visitor enters >> keywords. even there is a not next to the field "please enter keywords >> as comma delimited string", they enter as a list, bel

[PHP] transfer list in textarea to comma delimited string

2008-05-02 Thread afan pasalic
hi, I have one textarea field in a registration form where visitor enters keywords. even there is a not next to the field "please enter keywords as comma delimited string", they enter as a list, below each other. I tried to convert the list into comma delimited string with several solutions but n

Re: [PHP] check if any element of an array is not "empty"

2008-04-30 Thread afan pasalic
yup! that's the one :D thanks richard Richard Heyes wrote: >> but I was thinking if there is the function does that. > > array_filter(). Note this: > > "If no callback is supplied, all entries of input equal to FALSE (see > converting to boolean) will be removed." > > http://uk3.php.net/manual/

[PHP] check if any element of an array is not "empty"

2008-04-30 Thread afan pasalic
hi, as a result of one calculation I'm receiving an array where elements could be 0 or date (as string -mm-dd hh:ii:ss). I have to check if any of elements of the array is "date" or if all elements of the array is 0? If I try array_sum($result) I'll get 0 no matter what (0 + $string = 0). I k

Re: [PHP] need opinions regarding php.ini

2008-01-05 Thread Afan Pasalic
. Isn't is vulnerable point? -afan Daniel Brown wrote: On Jan 5, 2008 2:35 AM, Afan Pasalic <[EMAIL PROTECTED]> wrote: hi, after my host moved my account from old server (shared hosting) with php 4.4.7, mysql 4.x to new one with php 5.x and mysql 5.x. nice. they did it fast and witho

[PHP] need opinions regarding php.ini

2008-01-04 Thread Afan Pasalic
hi, after my host moved my account from old server (shared hosting) with php 4.4.7, mysql 4.x to new one with php 5.x and mysql 5.x. nice. they did it fast and without problems. but then I realized that every folder has it's own php.ini file?!? I "talked" to them (live chat) about this and they

Re: [PHP] Posting Summary for Week Ending 4 January, 2008: php-general@lists.php.net

2008-01-04 Thread Afan Pasalic
Guys, whatever you're doing, please stop. I'm getting tired deleting tons of emails for the last hour. If you testing something there is definitly other way than sending emails to all subscribers, right? Thanks. -afan PostTrack [Dan Brown] wrote: Posting Summary for PHP-General Li

Re: [PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
Jim Lucas wrote: > afan pasalic wrote: >> Daniel Brown wrote: >>> On Jan 4, 2008 12:52 PM, afan pasalic <[EMAIL PROTECTED]> wrote: >>>> I think you didn't understand my question: I know why the function work >>>> in 2nd example. My question w

Re: [PHP] function I created doesn't work [SOLVED]

2008-01-04 Thread afan pasalic
Daniel Brown wrote: > On Jan 4, 2008 12:52 PM, afan pasalic <[EMAIL PROTECTED]> wrote: >> I think you didn't understand my question: I know why the function work >> in 2nd example. My question was why I'm not getting the result in 1st >> example? What am I

Re: [PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
Daniel Brown wrote: > On Jan 4, 2008 12:52 PM, afan pasalic <[EMAIL PROTECTED]> wrote: >> I think you didn't understand my question: I know why the function work >> in 2nd example. My question was why I'm not getting the result in 1st >> example? What am I

Re: [PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
Daniel Brown wrote: > On Jan 4, 2008 12:28 PM, afan pasalic <[EMAIL PROTECTED]> wrote: >> Daniel Brown wrote: >>> On Jan 4, 2008 12:06 PM, afan pasalic <[EMAIL PROTECTED]> wrote: >>>> hi >>>> I have function >>>> function get

Re: [PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
Samuel Vogel wrote: > Explanation of your code: > > $CONTENT = get_content(12, 104, 'merchant'); > echo $CONTENT; > > This does not work, because you don't use a "return" in your function. > This means that the function does not return a value. Now in the > function you assign a value to $CONTENT

Re: [PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
Daniel Brown wrote: > On Jan 4, 2008 12:06 PM, afan pasalic <[EMAIL PROTECTED]> wrote: >> hi >> I have function >> function get_content($client_id, $form_id, $index1) >> { >> $query = mysql_query(" >> SE

[PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
hi I have function function get_content($client_id, $form_id, $index1) { $query = mysql_query(" SELECT content FROM infos WHERE client_id=".$client_id." AND form_id=".$form_id." AND index1='".$index1."'"); if (

Re: [PHP] handling ' with mysql/php insert and select

2008-01-03 Thread afan pasalic
Adam Williams wrote: > In my form, I am parsing all the text inputs through > mysql_real_escape_string() before inserting the data. however, when I > look at the SQL query in PHP, when I type the word blah's to my text box > variable, and then insert it into mysql after being ran through > mysql_r

Re: [PHP] First stupid post of the year.

2008-01-02 Thread afan pasalic
Daniel Brown wrote: > On Jan 2, 2008 2:05 PM, tedd <[EMAIL PROTECTED]> wrote: >> At 1:57 PM -0500 1/2/08, Daniel Brown wrote: >>> On Jan 2, 2008 1:34 PM, tedd <[EMAIL PROTECTED]> wrote: >> from this: >> >>        A        >> >> to this A >> >>> >> // Your existing code here >>> $submit = trim(s

Re: [PHP] First stupid post of the year.

2008-01-02 Thread Afan Pasalic
tedd wrote: At 1:46 PM -0500 1/2/08, Nathan Nobbe wrote: On Jan 2, 2008 1:34 PM, tedd <[EMAIL PROTECTED]> wrote:        A        (it's there to make a submit button wider) why dont you just style the button w/ css? style="width:200px" -nathan -nathan: Have y

[PHP] email authentication

2007-12-22 Thread Afan Pasalic
Hi, I have to develop a little registration form. after the form is submitted confirmation email has to be sent to registrant. I use this function to send an email: function send_plain_email($to, $subject, $body) { $headers ="MIME-Versin: 1.0\n" . "Content-type: text/plain; charset=ISO-885

Re: [PHP] [SOLVED] Why I sart getting "Fatal error: Allowed memory size..." after php upgrade?

2007-12-20 Thread afan pasalic
Richard Lynch wrote: > On Thu, December 20, 2007 11:37 am, afan pasalic wrote: >> The hosting company I have one account (and several Add Domains) >> upgraded php on the server from 4.4.7 to 5.2.5. After the upgrade I >> start getting the error message: >> Fatal er

Re: [PHP] Why I sart getting "Fatal error: Allowed memory size..." after php upgrade?

2007-12-20 Thread afan pasalic
came up. Just want to know why happened, what caused the error. -afan > > > > -- > Stephen Johnson c | eh > The Lone Coder > > http://www.thelonecoder.com > continuing the struggle against bad code > > http://www.thumbnailresume.com > -- > > > > &g

Re: [PHP] Why I sart getting "Fatal error: Allowed memory size..." after php upgrade?

2007-12-20 Thread afan pasalic
Richard Lynch wrote: > On Thu, December 20, 2007 11:37 am, afan pasalic wrote: >> The hosting company I have one account (and several Add Domains) >> upgraded php on the server from 4.4.7 to 5.2.5. After the upgrade I >> start getting the error message: >> Fatal er

[PHP] Why I sart getting "Fatal error: Allowed memory size..." after php upgrade?

2007-12-20 Thread afan pasalic
The hosting company I have one account (and several Add Domains) upgraded php on the server from 4.4.7 to 5.2.5. After the upgrade I start getting the error message: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 122880 bytes) in... on domains they use Gallery2 or ar

Re: [PHP] how to recognize ENUM column in table?

2007-12-07 Thread Afan Pasalic
Jim Lucas wrote: Afan Pasalic wrote: Jim Lucas wrote: Afan Pasalic wrote: hi, I use the code from http://www.php.net/manual/en/function.mysql-fetch-field (example #1) I'm getting everything I need but can't recognize if the column is ENUM() type? e.g. column "status" is E

Re: [PHP] how to recognize ENUM column in table?

2007-12-07 Thread Afan Pasalic
Jim Lucas wrote: Afan Pasalic wrote: hi, I use the code from http://www.php.net/manual/en/function.mysql-fetch-field (example #1) I'm getting everything I need but can't recognize if the column is ENUM() type? e.g. column "status" is ENUM('0','1'

Re: [PHP] how to recognize ENUM column in table?

2007-12-06 Thread Afan Pasalic
sounds like a solution! :) thanks andrew. -afan Andrew Ballard wrote: On Dec 6, 2007 1:38 PM, Afan Pasalic <[EMAIL PROTECTED]> wrote: hi, I use the code from http://www.php.net/manual/en/function.mysql-fetch-field (example #1) I'm getting everything I need but can't

[PHP] how to recognize ENUM column in table?

2007-12-06 Thread Afan Pasalic
hi, I use the code from http://www.php.net/manual/en/function.mysql-fetch-field (example #1) I'm getting everything I need but can't recognize if the column is ENUM() type? e.g. column "status" is ENUM('0','1') or ENUM('live','hidden','archive') or something like that. I want to recognize this

Re: [PHP] checkbox unchecked

2007-12-02 Thread Afan Pasalic
I did once, if I remember once, this "strategy": > If checked, you will have value "y". Though, if unchecked, or it was checked and visitor unchecked, the value should be "n". ;) -afan Ronald Wiplinger wrote: I have now tried to add many of the security hints on a web page and come to a pr

Re: [PHP] including parenthesis, space and dashes in a phone number

2007-11-30 Thread afan pasalic
<= 14) $phone = > preg_replace("/[^0-9]*([0-9]{3})[^0-9]*([0-9]{3})[^0-9]*([0-9]{4}).*/", > "(\\1) \\2-\\3", $phone); > >> -Original Message- >> From: afan pasalic [mailto:[EMAIL PROTECTED] >> Sent: Friday, November

Re: [PHP] excluding parenthesis, space and dashes from phone number

2007-11-30 Thread afan pasalic
Jochem Maas wrote: > afan pasalic wrote: >> hi, >> I store phone number in mysql as integer, e.g. (123) 456-7890 is stored >> as 1234567890. >> though, in search form they usually type in a phone number with >> parenthesis/space/dashes. I have to extract numbers

[PHP] excluding parenthesis, space and dashes from phone number

2007-11-30 Thread afan pasalic
hi, I store phone number in mysql as integer, e.g. (123) 456-7890 is stored as 1234567890. though, in search form they usually type in a phone number with parenthesis/space/dashes. I have to extract numbers before I search through mysql. currently, I use eregi_replace() function, several times, to

[PHP] ini_set('memory_limit', '16M')

2007-11-28 Thread afan pasalic
Hi, On one script (pulling large amount of data from mysql) I'm getting error: "Fatal error: Allowed memory size of 16777216 bytes exhausted..." I put on the beginning of the page ini_set('memory_limit', '64M'); but I'm still getting the same error message?!? Any idea? Thanks for any help. -afa

Re: [PHP] what is better way to write the query

2007-11-02 Thread afan pasalic
Stut wrote: > Jim Lucas wrote: >> afan pasalic wrote: >>> hi, >>> it's maybe more question for mysql list, but since php is involved >>> too... :-) >>> I have php script that inserts into mysql table couple hundreds of >>> records.

Re: [PHP] what is better way to write the query

2007-11-02 Thread afan pasalic
Stut wrote: > afan pasalic wrote: >> Stut wrote: >>> Jim Lucas wrote: >>>> afan pasalic wrote: >>>>> hi, >>>>> it's maybe more question for mysql list, but since php is involved >>>>> too... :-) >>>>>

Re: [PHP] what is better way to write the query

2007-11-02 Thread afan pasalic
timization"? sorry for "english" :-) -afan afan pasalic wrote: > hi, > it's maybe more question for mysql list, but since php is involved > too... :-) > I have php script that inserts into mysql table couple hundreds of records. > usually, it looks like: &

[PHP] what is better way to write the query

2007-11-02 Thread afan pasalic
hi, it's maybe more question for mysql list, but since php is involved too... :-) I have php script that inserts into mysql table couple hundreds of records. usually, it looks like: http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
yup! it works perfect. obviously, it's MY fault. :-) thanks stut -afan Stut wrote: > afan pasalic wrote: >> actually, what example you are talking about? I got jay's example only? > > http://dev.stut.net/php/varfunc.php > > -Stut > -- PHP General Mai

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
actually, what example you are talking about? I got jay's example only? Stut wrote: > afan pasalic wrote: >> why then the code doesn't work? >> the error I'm getting is: "Fatal error: Call to undefined function >> solution1() in ..." even the functi

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
Stut wrote: > afan pasalic wrote: >> why then the code doesn't work? >> the error I'm getting is: "Fatal error: Call to undefined function >> solution1() in ..." even the function itself is just above the line that >> calls function? > > I can

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
why then the code doesn't work? the error I'm getting is: "Fatal error: Call to undefined function solution1() in ..." even the function itself is just above the line that calls function? -afan Stut wrote: > Jay Blanchard wrote: >> I don't think you can put a function name in a variable and cal

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
Jay Blanchard wrote: > [snip] > [snip] > function solution1($var1){ > // some code > } > > function solution2($var2){ > // some code > } > > function solution3($var3){ > // some code > } > > if ($function == 'solution1' or $function == 'solution2' or $function == > 'soluti

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
Jay Blanchard wrote: > [snip] > function solution1($var1){ > // some code > } > > function solution2($var2){ > // some code > } > > function solution3($var3){ > // some code > } > > if ($function == 'solution1' or $function == 'solution2' or $function == > 'solution3') > {

Re: [PHP] problem calling functions

2007-10-19 Thread afan pasalic
Robin Vickery wrote: > On 19/10/2007, afan pasalic <[EMAIL PROTECTED]> wrote: > >> hi >> I have a problem with calling functions: >> >> > function solution1($var1){ >> // some code >> } >> >> function solution2($var

[PHP] problem calling functions

2007-10-19 Thread afan pasalic
hi I have a problem with calling functions: suggestions? thanks. -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reload page after form submit

2007-08-31 Thread Afan Pasalic
brian wrote: Instruct ICC wrote: From your rough code, I'd say the OP always needs the select block (just remove the "else" keyword and keep the block) for the current info at the present page refresh/load. But I'd like clarification on how the OP thinks about it. That's close, i think

Re: [PHP] Reload page after form submit

2007-08-30 Thread Afan Pasalic
rough code, to give you an idea: ('".mysql_real_escape_string($first)."', '".mysql_real_escape_string($last)."') "); } else { $query = mysql_query(" select first, last from table where id=xyz "); $result = mysql_fetch_array($query,

Re: [PHP] OT- why is network solutions more than godaddy?

2007-08-03 Thread Afan Pasalic
I'm with GoDaddy since 1999 and have over 60 domains. Never had a problem with them. -afan Stut wrote: blackwater dev wrote: I have to register a bunch of names and am trying to figure out why I would pay $35 when I can just pay $9 at godaddy. Does godaddy own it and I lease it from them??

Re: [PHP] register_globals and magic_quotes_gpc (again)

2007-06-07 Thread Afan Pasalic
Tijnema wrote: On 6/7/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: hi, this question is already posted thousand times. but, after I tried for 2 hours to figure it out, I gave up and posted the question here. I'm rebuilding one site. php 4.4.4 as usual, register_globals on,

[PHP] register_globals and magic_quotes_gpc (again)

2007-06-06 Thread Afan Pasalic
hi, this question is already posted thousand times. but, after I tried for 2 hours to figure it out, I gave up and posted the question here. I'm rebuilding one site. php 4.4.4 as usual, register_globals on, as well as magic_quotes. I tried to turn it off using .htaccess but what ever I change in

Re: [PHP] Re: find (matching) person in other table

2007-05-31 Thread Afan Pasalic
David Giragosian wrote: On 5/31/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: Jared Farrish wrote: > On 5/30/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: > email has to match "in total". [EMAIL PROTECTED] and [EMAIL PROTECTED] >> are NOT the same in my case.

Re: [PHP] Re: find (matching) person in other table

2007-05-31 Thread Afan Pasalic
Jared Farrish wrote: On 5/30/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: email has to match "in total". [EMAIL PROTECTED] and [EMAIL PROTECTED] are NOT the same in my case. thanks jared, If you can match a person by their email, why not just SELECT by email only (and re

Re: [PHP] Re: find (matching) person in other table

2007-05-30 Thread Afan Pasalic
Jared Farrish wrote: On 5/30/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: yes. in one hand it's more for mysql list. though, I was thinking more if somebody had already something similar as a "project". more as path I have to follow. e.g., in your example, in where cl

Re: [PHP] find (matching) person in other table

2007-05-30 Thread Afan Pasalic
Richard Lynch wrote: On Wed, May 30, 2007 3:30 pm, Afan Pasalic wrote: hi, the code I'm working on has to compare entered info from registration form with data in members table and list to administrator (my client) all "matching" people. admin then has to decide is person

Re: [PHP] Re: find (matching) person in other table

2007-05-30 Thread Afan Pasalic
Jared Farrish wrote: I was thinking to assign points (percentage) to matching fields (last name, first name, email, phone, city, zip, phone) and then list people with more than 50%. e.g., if first and last name match - 75%, if only email match - 85%, if first name, last name and email match - 100

[PHP] find (matching) person in other table

2007-05-30 Thread Afan Pasalic
hi, the code I'm working on has to compare entered info from registration form with data in members table and list to administrator (my client) all "matching" people. admin then has to decide is person who registered already in database and assign his/her member_id or the registered person is

Re: [PHP] error_reporting(E_ALL) doesn't show anything

2007-05-15 Thread Afan Pasalic
Stut wrote: Please include the list in replies. I'm sorry. Clicked on wrong Reply button :-) Afan Pasalic wrote: Stut wrote: Afan Pasalic wrote: in php.ini is error_reporting turned off. and, to see an error have to open error_log. though, for me is much easier to have it on and se

[PHP] error_reporting(E_ALL) doesn't show anything

2007-05-15 Thread Afan Pasalic
hi, in php.ini is error_reporting turned off. and, to see an error have to open error_log. though, for me is much easier to have it on and see the errors on the screen. while developing, of course. I put on the beginning of the file error_reporting(E_ALL) to "overwrite" php.ini but it doesn't

Re: [PHP] Need a new shared host with php

2007-05-10 Thread Afan Pasalic
Edward Kay wrote: Al wrote: I'm looking for a shared host with an up-to-date php5, and one who at least tries to keep it relatively current. Needs are modest. Just need good ftp access, cgi-bin, shell, etc. Any suggestions. I'm looking at Host Monster, anyone have experience with them? Th

Re: [PHP] isset

2007-04-16 Thread Afan Pasalic
that was actually my point. :) -afan Stut wrote: tedd wrote: At 4:08 PM +0100 4/16/07, Stut wrote: Jim Lucas wrote: Richard Kurth wrote: What do you do when isset does not work? If I send data in a $_REQUEST['var'] like if (isset($_REQUEST['var'])) { } Put var has no data it still says it

Re: [PHP] how to get var name and value from function?

2007-04-14 Thread Afan Pasalic
Tijnema ! wrote: > On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: >> hi, >> this one I can't figure out: >> >> I have to assign value of an array to variable named after key of the >> array several times in my project to , e.g. after I submit a

[PHP] how to get var name and value from function?

2007-04-13 Thread Afan Pasalic
hi, this one I can't figure out: I have to assign value of an array to variable named after key of the array several times in my project to , e.g. after I submit a form with personal info I have $_POST['name'] = 'john doe'; $_POST['address'] = '123 main st.'; $_POST['city'] = 'urbandale'; $_POST['

Re: [PHP] Idea/Suggestion for PHP App

2007-04-07 Thread Afan Pasalic
looks like I didn't get the question. I thought he's asking how to start a project. to start to learn php of course you don't need paper and pencil. books, online tutorials, php.net and time. though, for a new project (if you never did similar before and if you don't already have the code you ca

Re: [PHP] PHP has encountered an Access Violation at 01F13157?!?!?!?

2007-04-07 Thread Afan Pasalic
already did. though, my "expertize" is telling me: install php4 instead php5 :D Tijnema ! wrote: On 4/7/07, Tijnema ! <[EMAIL PROTECTED]> wrote: On 4/7/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: > hi, > I just installed php 5.2.1-win32-installer on win

Re: [PHP] PHP has encountered an Access Violation at 01F13157?!?!?!?

2007-04-07 Thread Afan Pasalic
use IIS. Tijnema ! wrote: On 4/7/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: hi, I just installed php 5.2.1-win32-installer on win box (XP). use IIS. created index.html file and localhost/index.html is ok. created phpinfo.php (with only phpinfo()) and was ok. then installed Zend 5.5.

[PHP] PHP has encountered an Access Violation at 01F13157?!?!?!?

2007-04-06 Thread Afan Pasalic
hi, I just installed php 5.2.1-win32-installer on win box (XP). use IIS. created index.html file and localhost/index.html is ok. created phpinfo.php (with only phpinfo()) and was ok. then installed Zend 5.5.0 (try) and suddenly, IE is giving me blank screen. installed firefox 2 and got the error m

Re: [PHP] what settings I have to use in php 5.1.2?

2006-11-23 Thread Afan Pasalic
Thanks Dave, good one. -afan Dave Goodchild wrote: Also, turn off display_errors before going into production, at which stage enable error logging. On 11/23/06, Jochem Maas <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: >> [EMAIL PROTECTED] wrote: >>> hi! >>> >>> the company I work for

Re: [PHP] Re: moving to other web server

2006-10-11 Thread Afan Pasalic
right. that would be actually the best thing to do. thanks. Chris wrote: [EMAIL PROTECTED] wrote: currently using mysql 4.0.18. want to move to 5.0 (latest stable version for commercil use). is there anytihng I have to be considered DB will not work? I really suggest you set up a test box

[PHP] moving to other web server

2006-10-10 Thread Afan Pasalic
hi to all, we are moving our web server from one to other hosting company. we have chance to request what version of php i want to be installed, 4 or 5. Current web server works on php 4.3.4 we don't use any classes, functions only. as far as I know, in our case moving from 4 to 5 shouldn't be

[PHP] script to check if form is submitted from the same page?

2006-08-12 Thread Afan Pasalic
could I use this code to check if form is submitted from the same page/same domain if ($_POST['form_submitted'] == 'Yes') { if (preg_match($_SERVER['HTTP_HOST'], $_SERVER["HTTP_REFERER"]) == 0) { die ('^&[EMAIL PROTECTED]'); } } thanks -afan -- PHP General Mailing List (http:/

Re: [PHP] remove keys from array

2006-06-11 Thread Afan Pasalic
if you pull this array from mysql use this: $query = mysql_query("SELECT * FROM table"); $result = mysql_fetch_array($query, MYSQL_ASSOC); -afan Rabin Vincent wrote: On 6/11/06, Ahmed Abdel-Aliem <[EMAIL PROTECTED]> wrote: when i have array in the form of : Array ( [0] => 2 [ID] => 2 [1] => as

  1   2   >