Re: [PHP] Parse Error

2006-02-21 Thread Claudio Corlatti
Hi, you need to finish every line with ; $host="localhost" ; $user="ray" ; $password="*" ; Bye Ray Cantwell wrote: Hi all, I am a noob and super confused right now. I have some really simple code and i am getting an error that reads: *Parse error*: syntax error, unexpected T_VARIABLE in

Re: [PHP] Parse Error

2006-02-21 Thread Ray
Jay Blanchard wrote: [snip] I am a noob and super confused right now. I have some really simple code and i am getting an error that reads: *Parse error*: syntax error, unexpected T_VARIABLE in */var/www/mysql_up.php* on line here is the code: Test MySQL Thanks. did i say i was a n00b

Re: [PHP] Parse Error

2006-02-21 Thread John Nichel
Ray Cantwell wrote: Hi all, I am a noob and super confused right now. I have some really simple code and i am getting an error that reads: *Parse error*: syntax error, unexpected T_VARIABLE in */var/www/mysql_up.php* on line here is the code: Test MySQL Terminate your php lines with a

Re: [PHP] Parse Error

2006-02-21 Thread benifactor
- Original Message - From: "Ray Cantwell" <[EMAIL PROTECTED]> To: Sent: Tuesday, February 21, 2006 1:27 PM Subject: [PHP] Parse Error > Hi all, > I am a noob and super confused right now. I have some really simple code > and i am getting an error that reads: > *Parse error*: syntax er

Re: [PHP] Does this If statement make sense?

2006-02-21 Thread Richard Lynch
On Tue, February 21, 2006 9:55 am, Jeff wrote: > I'm again working with someone else's code and I have a problem I > believe is in the section below. The problem is, I can't seem to > understand what the "IF" conditions are saying here. The problem I > have > is with the second condition. To me

[PHP] CLI utility

2006-02-21 Thread Ray Cantwell
Hello again, I was wondering if any of you knew of a good command line utility for php5 on linux? The box i write on has no X-windows. Ray. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] question about foreach and associate array

2006-02-21 Thread Richard Lynch
On Mon, February 20, 2006 8:57 pm, jonathan wrote: > I have the following construct: > > $arg['textarea']['body']="Hello"; > > >foreach($arg['textarea'] as $row) >{ > echo $row['body'].""; > echo $arg['textarea']['body'].""; > >} > > I would expect bo

Re: [PHP] Proper OOP Syntax

2006-02-21 Thread Richard Lynch
On Mon, February 20, 2006 5:25 pm, Albert Padley wrote: > $password = (strlen($this->user_pw) < 32) ? md5($this->user_pw) : > $this->user_pw; So, if I use a password with more than 32 characters, you're NOT going to md5() it?! This is not really the Right Way to do this, imho. >

[PHP] Re: regular pattern to match åäö

2006-02-21 Thread Cristian MARIN
Normally the \w in documentation is written that it does this trick matching based on the locale that your machine having the pcre installed use: http://www.php.net/manual/en/reference.pcre.pattern.syntax.php " ... A "word" character is any letter or digit or the underscore character, that is

Re: [PHP] HOSTNAME Environment variable

2006-02-21 Thread Richard Lynch
On Tue, February 21, 2006 1:37 am, Ruben Rubio Rey wrote: > How to set "Hostname" environment variable? (It contains the servers > name, not the servers domain) > Its a Linux server. The environment variables come *FROM* the environment into PHP. If you want them changed, you have to change your

[PHP] Re: Reading binary http post

2006-02-21 Thread Cristian MARIN
This is actually not a solution as is not solving Dirk's problem. The 'A' will make the isset($_POST['data']) to be always true. Another thing is that the $_POST['data'] is still not containing the binary code that is expected as the PHP will get the & and will start a new variable A solution

RE: [PHP] Parse Error

2006-02-21 Thread Emmanuel Job
[snip] for ($j = 0; $j < mysql_num_fields(result); $j++) [/snip] need to change this as well (forgot a $). should be: for ($j = 0; $j < mysql_num_fields($result); $j++) -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 21, 2006 1:34 PM To: php-genera

[PHP] Re: PHP5.1.2/Apache2/WindowsXP

2006-02-21 Thread Cristian MARIN
Most probably this is a bug that should be first isolated (see what line exactly line of your code make the Apache crash). You should report this to bugs.php.net. I had a similar situation and on Windows is quite difficult to report such a bug: http://bugs.php.net/bug.php?id=35940 --

Re: [PHP] Reading binary http post

2006-02-21 Thread Dirk Vanden Boer
Thanks for the info, it was really helpfull. One question though, is it necessary to first encode my data with the base64 algo, or can I skip that step and immediately urlencode my data? Dirk On 2/21/06, Richard Lynch <[EMAIL PROTECTED]> wrote: > You probably should be URL-encoding your data in t

Re: [PHP] CLI utility

2006-02-21 Thread Richard Lynch
On Tue, February 21, 2006 4:03 pm, Ray Cantwell wrote: > I was wondering if any of you knew of a good command line utility for > php5 on linux? The box i write on has no X-windows. E. Assuming I understand the question... lynx is a text-based browser which you can use to surf to pages and se

Re: [PHP] Page validation: Un-wanted PHP session ID added to links????

2006-02-21 Thread Richard Lynch
On Mon, February 20, 2006 2:19 pm, Michael Hulse wrote: > On Feb 20, 2006, at 12:10 PM, John Nichel wrote: >> It's all in the manual > > Hi, thanks for pointing that out. I guess I should have RTFM first, > then ask q's second... noob mistake, wont happen again. :D > > I guess I just do not unders

Re: [PHP] newbie problem

2006-02-21 Thread Richard Lynch
On Mon, February 20, 2006 1:14 pm, Robert Voogdgeert wrote: > When working with an HTML file with a form with > > > > the somename.php file is served (completely) to my browser as plain > text > after the 'submit' button is clicked on my machine (MacOS X). On the > external webhost though ever

Re: [PHP] Reading binary http post

2006-02-21 Thread Richard Lynch
You'd have to check if URL-encoding supports whatever sort of characters/data is your input. I would *THINK* that URL-encoding standard would support binary data of any kind, and be the correct way to do this, in THEORY. In PRACTICE, it may be that the implementation of URL-encode would not corre

Re: [PHP] need a php multiple/mysql choice quiz

2006-02-21 Thread Richard Lynch
On Mon, February 20, 2006 9:49 am, Ross wrote: > I am looking for a php/mysql multiple choice quiz. One that saves the > answers to a database. A basic example I can expand on is all that is > required. You may want to expand your search to "PHP Poll" as it will also have most of what you need, an

Re: [PHP] PHP generated JavaScript

2006-02-21 Thread Richard Lynch
On Mon, February 20, 2006 1:59 am, Tim Burgan wrote: > Is is possible to make an external Javascript with PHP. > > Am I doing this correcT? > > > header("Content-Type: text/javascript"); > > $text = "Hello World"; > > echo "alert('".$text."');"; You may need to include the trailing newline on

Re: [PHP] need a php multiple/mysql choice quiz

2006-02-21 Thread tedd
On Mon, February 20, 2006 9:49 am, Ross wrote: I am looking for a php/mysql multiple choice quiz. One that saves the answers to a database. A basic example I can expand on is all that is required. Perhaps something like this: http://www.xn--ovg.com/form/form_mysql.php Drop me an email and

Re: [PHP] novice with hacked email form issue

2006-02-21 Thread tedd
On 2/21/06, cKc Consultants <[EMAIL PROTECTED]> wrote: An email form that uses a simple server side php code to send the variable values managed to send: Perhaps something here: http://www.weberdev.com/AdvancedSearch.php?searchtype=title&search=%2Bemail+%2Bform&Submit1.x=0&Submit1.y=0 ted

Re: [PHP] CLI utility

2006-02-21 Thread Björn Bartels
moin,  richard nice idea , but i'd rather think according to probability calculation chance for this to happen converge to 0, doesn't it... ;) >There MIGHT be a curses-based web browser "out there"... I mean, in >theory, there could be one, right? > >And it might even be able to render vector

Re: [PHP] Working with a config file

2006-02-21 Thread Curt Zirzow
On Mon, Feb 20, 2006 at 05:21:51PM -0500, Benjamin Adams wrote: > I'm trying to parse a config file, example of the config is: > [fred] > id=8782 > section=s1 > years=4 > download1=mirror1 > ... I'd say http://php.net/parse-ini-file is your best option. Curt. -- cat .signature: No such file or d

[PHP] __call() and interfaces

2006-02-21 Thread Mike Pfaff
Hello World :) I need to write a class that implements a predefined interface. In my class all(or most) methods will use the same code. At first i thought the ideal solution would be to handle this by defining the magic __call() method in my class, but PHP then complains about the interface n

Re: [PHP] Re: CLASS/Object lifetime - > more info

2006-02-21 Thread Jochem Maas
REFERENCES. the object you get back is a copy (foreach has the same effect as creating a new variable as in the example below). ... see below ... notice the use of the & symbol (and the 'refcount' values). (there is loads of info out there on references/php4/objects out there that explain it be

Re: [PHP] __call() and interfaces

2006-02-21 Thread David Tulloh
I find __call() to be a nasty solution, particularily from a self-documenting code point of view. I personally only use call when the function names are defined at run time; as you clearly know the function names, I would be implementing them as normal functions. If there is a lot of repeated cod

[PHP] Script updating secondary server

2006-02-21 Thread Peter Lauri
Hi, I have one server in USA and one server in Thailand. The server in USA is the one containing the updated information. The Thai server will be a copy of the USA server. I want to write a PHP script that does this for me: 1. Once a day copies the files on the USA server to the Thai server and p

Re: [PHP] Reading binary http post

2006-02-21 Thread Curt Zirzow
On Tue, Feb 21, 2006 at 04:58:01PM -0600, Richard Lynch wrote: > You'd have to check if URL-encoding supports whatever sort of > characters/data is your input. > > I would *THINK* that URL-encoding standard would support binary data > of any kind, and be the correct way to do this, in THEORY. > >

Re: [PHP] Script updating secondary server

2006-02-21 Thread Chris
I have one server in USA and one server in Thailand. The server in USA is the one containing the updated information. The Thai server will be a copy of the USA server. I want to write a PHP script that does this for me: 1. Once a day copies the files on the USA server to the Thai server and put

Re: [PHP] CLI utility

2006-02-21 Thread Curt Zirzow
Just a raw (manual) way to talk to a server. You just need to understand the way a HTTP request is sent to a server (http://w3c.org/). Or if you know how to comminicate with what ever protocol you use manually. The reason to really do it with db-server would be to test to see if is actually ru

Re: [PHP] Script updating secondary server

2006-02-21 Thread Curt Zirzow
On Wed, Feb 22, 2006 at 01:02:29PM +1100, Chris wrote: > > > > >I want to write a PHP script that does this for me: > >1. Once a day copies the files on the USA server to the Thai server and put > >them in the web folder > >2. Once a day copy the database in USA (dump) and then empty the Thai > >d

Re: [PHP] How do I output error messages

2006-02-21 Thread Paul Goepfert
$submit is soppose to be set when the user submits the web form for validation. I am not sure but is there soppose to be a $submit = statement? Paul On 2/21/06, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > if (isset($submit)) > { > //vaildation code > } > else > { > //webpage > } > [/s

[PHP] Special Chars on Form to Image (GD), not displaying properly.

2006-02-21 Thread Louie Miranda
Im having a trouble displaying special characters like #, + on GD (Jpeg) - Image. When i typed in on the form +88 it only shows 88 and the + sign is missing. My code: I made a couple of tests and found this variables. The data that will be pass: +88and# Data from the url (address box): &line_

Re: [PHP] Special Chars on Form to Image (GD), not displaying properly.

2006-02-21 Thread Curt Zirzow
On Wed, Feb 22, 2006 at 12:38:19PM +0800, Louie Miranda wrote: > Im having a trouble displaying special characters like #, + on GD (Jpeg) - > Image. When i typed in on the form +88 it only shows 88 and the + sign is > missing. > > My code: > .. > $line_1_1 = urldecode($_GET["line_1_1"]); You do

Re: [PHP] Special Chars on Form to Image (GD), not displaying properly.

2006-02-21 Thread Louie Miranda
Please read below.. > Im having a trouble displaying special characters like #, + on GD (Jpeg) - > > Image. When i typed in on the form +88 it only shows 88 and the + sign > is > > missing. > > > > My code: > > > .. > > $line_1_1 = urldecode($_GET["line_1_1"]); > > You dont want to urldecode() t

[PHP] array variables with or without quotes

2006-02-21 Thread 2dogs
I recently encountered a situation where I had to retrieve data from a MYSQL database table with a field named "include". My code looked like this: $content_result = mysql_query('SELECT * FROM calander') or die(mysql_error()); $content_row = mysql_fetch_array($content_result); if ($content_row[i

[PHP] "Nested Set Model" or "modified preorder tree traversal"

2006-02-21 Thread Daevid Vincent
I've been searching the web for the past few hours trying to find a simple drop-in class or functions to implement "Nested Set Model" or "modified preorder tree traversal". I've found several tutorials and related links: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html http

Re: [PHP] array variables with or without quotes

2006-02-21 Thread Chris
When I tried to run this, PHP treated the word -include- as a control structure rather than an index name. Understandable. So, I put it in single quotes ('include') to see what would happen and it works fine. But I don't understand why! What is the difference between $content_row [include] a

[PHP] Why does it stop working?

2006-02-21 Thread pine oil
I've used the following counter for some time, but I don't seem to have it work now after I have moved the directory of the files. They used to be in /var/www/html, but moved to /home/webroot/test. Do you think the relocation of the files has something to do with my problem?

Re: [PHP] "Nested Set Model" or "modified preorder tree traversal"

2006-02-21 Thread Chris
Hasn't anyone else done this before (recently)? Did everyone just write their own code every time? Anyone have some easy to use code that allows for: Add, delete, update/rename, select, show tree, bread crumb display, etc. I use PHP 5.0.5 and mySQL 5.0.18, so ideally it would take advantage of a

Re: [PHP] Special Chars on Form to Image (GD), not displaying properly.

2006-02-21 Thread Curt Zirzow
On Wed, Feb 22, 2006 at 01:12:00PM +0800, Louie Miranda wrote: > Please read below.. > > > Im having a trouble displaying special characters like #, + on GD (Jpeg) - > > > Image. When i typed in on the form +88 it only shows 88 and the + sign > > is > > > missing. > > > > > > My code: > > > > >

Re: [PHP] Why does it stop working?

2006-02-21 Thread Chris
pine oil wrote: I've used the following counter for some time, but I don't seem to have it work now after I have moved the directory of the files. They used to be in /var/www/html, but moved to /home/webroot/test. Do you think the relocation of the files has something to do with my problem? I

Re: [PHP] Why does it stop working?

2006-02-21 Thread pine oil
On 2/22/06, Chris <[EMAIL PROTECTED]> wrote: > pine oil wrote: > > I've used the following counter for some time, but I don't seem to > > have it work now after I have moved the directory of the files. > > > > They used to be in /var/www/html, but moved to /home/webroot/test. > > > > Do you think t

Re: [PHP] Why does it stop working?

2006-02-21 Thread Chris
pine oil wrote: On 2/22/06, Chris <[EMAIL PROTECTED]> wrote: pine oil wrote: I've used the following counter for some time, but I don't seem to have it work now after I have moved the directory of the files. They used to be in /var/www/html, but moved to /home/webroot/test. Do you think the

Re: [PHP] "Nested Set Model" or "modified preorder tree traversal"

2006-02-21 Thread Curt Zirzow
On Tue, Feb 21, 2006 at 09:38:53PM -0800, Daevid Vincent wrote: > I've been searching the web for the past few hours trying to find a simple > drop-in class or functions to implement "Nested Set Model" or "modified > preorder tree traversal". I actually fell in love of this method of doing trees w

Re: [PHP] Why does it stop working?

2006-02-21 Thread Curt Zirzow
On Tue, Feb 21, 2006 at 11:54:53PM -0600, pine oil wrote: > I've used the following counter for some time, but I don't seem to > have it work now after I have moved the directory of the files. > >... > $cn = implode("",file("counter.txt")); > $cn++; > $fp = fopen("counter.txt","w+"); > fwrite($fp

Re: [PHP] Re: CLASS/Object lifetime - > more info

2006-02-21 Thread Roger Helgesen
ain't that the other way around ? $var1=$var2 ($var1 is a copy of $var2) $var1=& $var2 ($var1 is a reference to $var2) $var1='Test' echo $var2 (outputs Test) roger Jochem Maas wrote: REFERENCES. the object you get back is a copy (foreach has the same effect as creating a new variable as in th

Re: [PHP] Why does it stop working?

2006-02-21 Thread Sameer N Ingole
Curt Zirzow wrote: On Tue, Feb 21, 2006 at 11:54:53PM -0600, pine oil wrote: I've used the following counter for some time, but I don't seem to have it work now after I have moved the directory of the files. This seems to be Apache problem than PHP problem. Are you sure your Apache can process

[PHP] Problem with mail() on Debian

2006-02-21 Thread George Pitcher
Hi, I am in the process of moving from Windows (NT/XP) to Linux. I'm starting with a new small application which I have working on my Windows XP laptop. On my Linux box, I have php.ini saying: sendmail_path /usr/sbin/sendmail That 'sendmail' is a symbolic link to exim4 in the same directory. I

Re: [PHP] php+ ajax

2006-02-21 Thread Kim Christensen
On 2/20/06, David Dorward <[EMAIL PROTECTED]> wrote: > Element ids may not contain square brackets in HTML documents. Get your facts straight, David. Square brackets works fine in HTML documents as long as you escape the ID when you need to reference them by JS. -- Kim Christensen [EMAIL PROTECTE

Re: [PHP] HOSTNAME Environment variable

2006-02-21 Thread Kim Christensen
On 2/21/06, Ruben Rubio Rey <[EMAIL PROTECTED]> wrote: > How to set "Hostname" environment variable? (It contains the servers > name, not the servers domain) > Its a Linux server. Try the "hostname" command. Depending on your linux distro, you might want to edit /etc/hostname manually afterwards t

[PHP] Re: JPG Compression [detached thread]

2006-02-21 Thread Kim Christensen
Julian, remember to send a new message when posting a thread for the first time, instead of replying to an old one. I'm sure it was a mistake, but most people won't bother to answer these kind of posts. On 2/20/06, julian haffegee <[EMAIL PROTECTED]> wrote: > Is there a php function that lets you

Re: [PHP] HOSTNAME Environment variable

2006-02-21 Thread Ruben Rubio Rey
Kim Christensen wrote: On 2/21/06, Ruben Rubio Rey <[EMAIL PROTECTED]> wrote: How to set "Hostname" environment variable? (It contains the servers name, not the servers domain) Its a Linux server. Try the "hostname" command. Depending on your linux distro, you might want to edit /etc/

Re: [PHP] HOSTNAME Environment variable

2006-02-21 Thread Kim Christensen
On 2/21/06, Ruben Rubio Rey <[EMAIL PROTECTED]> wrote: > Strange. Its already set (in hostname and "echo $HOSTNAME"). I have > realized that is working on version (in my servers) 5.0.5 and its not > working in 5.0.4 version. Is it an old bug? Im updating, we ll see Have you rebooted your mach

Re: [PHP] php+ ajax

2006-02-21 Thread Jochem Maas
Kim Christensen wrote: On 2/20/06, David Dorward <[EMAIL PROTECTED]> wrote: Element ids may not contain square brackets in HTML documents. Get your facts straight, David. Square brackets works fine in HTML David has his facts straight, just because something works (for you) doesn't make it

Re: [PHP] question about foreach and associate array

2006-02-21 Thread Jochem Maas
jonathan wrote: I have the following construct: $arg['textarea']['body']="Hello"; foreach($arg['textarea'] as $row) { echo $row['body'].""; $row contains the _string_ 'Hello'. the thing is you can use array-like notation to get at the individual chars of a string.

Re: [PHP] php+ ajax

2006-02-21 Thread Kim Christensen
On 2/21/06, Jochem Maas <[EMAIL PROTECTED]> wrote: > Kim do the escaped sqaure brackets work in all majors browsers as > far as you know? "Major browsers" as in Firefox and IE for PC/Mac works great, yes - haven't had the chance to try Opera or Konqueror yet, maybe someone could shed a light on th

[PHP] Re: Request for views on ASP/PHP/ASP.NET - please!

2006-02-21 Thread Simon O'Beirne
Gladly :) Due to be finished at the end of march, however results will be analysed start/mid march. Will keep you informed! Simon "Rafael" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Well, I would like to know what conclusion you got, so if possible let me know when you have eno

Re: [PHP] php+ ajax

2006-02-21 Thread David Dorward
--- Kim Christensen <[EMAIL PROTECTED]> wrote: > On 2/21/06, Jochem Maas <[EMAIL PROTECTED]> > wrote: >> Kim do the escaped sqaure brackets work in >> all majors browsers as far as you know? > "Major browsers" as in Firefox and IE for PC/Mac > works great, yes - Many browsers are amazing at bei

[PHP] Help with query

2006-02-21 Thread Ing. Tom�s Liendo
Hi I need the students that didn't take an exam. The tables: exams(id_test, title, desciption, ) results(id_student, id_test, date, qualification...) I'm using a version of MySQL that doesn't support NOT IN, then I tried in this way: SELECT * FROM exams LEFT JOIN results ON exams.id_test=r

[PHP] Re: Help with query

2006-02-21 Thread Barry
Ing. Tomás Liendo wrote: Hi I need the students that didn't take an exam. The tables: exams(id_test, title, desciption, ) results(id_student, id_test, date, qualification...) I'm using a version of MySQL that doesn't support NOT IN, then I tried in this way: SELECT * FROM exams LEFT JOI

Re: [PHP] Problem with Square Brackets [was: php+ ajax]

2006-02-21 Thread Jochem Maas
add to your list of potential book topics?: knowing when to successfully break the rules. (i.e. when to not follow the standards) From a php developer point of view there is one big problem with 'follow the standards' mantra as far as square brackets go (with regard to use in t

RE: [PHP] newbie problem

2006-02-21 Thread Jay Blanchard
[snip] > [snip] > When working with an HTML file with a form with > > > > the somename.php file is served (completely) to my browser as plain text > after the 'submit' button is clicked on my machine (MacOS X). On the > external webhost though everything is processed correctly... > > Is

Re: [PHP] Problem with Square Brackets [was: php+ ajax]

2006-02-21 Thread David Dorward
--- Jochem Maas <[EMAIL PROTECTED]> wrote: > From a php developer point of view there is one > big problem with 'follow the standards' mantra as > far as square brackets go (with regard to use in the > value of name attributes of form fields) ... Nope. The names of form controls MAY contain squar

[PHP] Re: Help with query

2006-02-21 Thread Barry
Ing. Tomás Liendo wrote: Hi I need the students that didn't take an exam. The tables: exams(id_test, title, desciption, ) results(id_student, id_test, date, qualification...) I'm using a version of MySQL that doesn't support NOT IN, then I tried in this way: SELECT * FROM exams LEFT JOI

Re: [PHP] newbie problem

2006-02-21 Thread tedd
Hi all, I have a page that lets people upload images - they are then resized for use throughout my site. It all works fine, but I need to reduce the jpg size (without reducing image size) Is there a php function that lets you compress the jpg? Thanks Jules No -- my understanding is that

Re: [PHP] Problem with Square Brackets [was: php+ ajax]

2006-02-21 Thread Jochem Maas
David Dorward wrote: --- Jochem Maas <[EMAIL PROTECTED]> wrote: From a php developer point of view there is one big problem with 'follow the standards' mantra as far as square brackets go (with regard to use in the value of name attributes of form fields) ... Nope. The names of form controls

Re: [PHP] php+ ajax

2006-02-21 Thread tedd
You can't test in every browser out there - there are too many. You can't test in any browser that hasn't be written yet. Writing code that ignores the standards is just asking for maintainance headaches and other troubles down the line. I have to agree with David on this -- but, future browser

[PHP] [NEWBIE GUIDE] - suggestions for new list members

2006-02-21 Thread Jay Blanchard
= Please feel free to add more points and updates. 20050322jb - Note the new location of PHP Editors list. = 1. If you have any queries/problems about PHP try http://www.php.net/manual/

RE: [PHP] newbie problem [SOLVED]

2006-02-21 Thread Robert Voogdgeert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Have you installed PHP on the localhost and is it running properly? Jay (and others), I solved the problem. I need to use 10.0.1.3/somedir/somedir/somefile.html and not localhost/somedir/somedir/somefile.html, something I don't underst

RE: [PHP] newbie problem [SOLVED]

2006-02-21 Thread Jay Blanchard
[snip] > Have you installed PHP on the localhost and is it running properly? Jay (and others), I solved the problem. I need to use 10.0.1.3/somedir/somedir/somefile.html and not localhost/somedir/somedir/somefile.html, something I don't understand (probably because of lack of knowled

[PHP] Object lifetime

2006-02-21 Thread roger helgesen
I'v got CLASS 1 and CLASS2. CLASS1 makes many instanses of CLASS2 and stores them in an array. Ex. -- load class definition... start_session(); submit form -> and unsreialize it to same var $cl1=unserialize($_SESSION['cla1']); $cl1 is operational with same data

[PHP] CLASS/Object lifetime

2006-02-21 Thread roger helgesen
Hi! I'v got 2 classes. CLASS1 makes a array of instanses of class2. I need thees classes 2 live for the duration of the session so I serialize class1 to a _session var. I submit the form and the page is reloaded. I unserialize class1 back 2 same instanse var. class1 I works. The instanses

Re: [PHP] php+ ajax

2006-02-21 Thread David Dorward
--- tedd <[EMAIL PROTECTED]> wrote: > I have to agree with David on this -- but, future > browser's compliance to standards with is certainly > not guaranteed. I find it less trouble to code to standards and then deal with bugs in browsers, then to code to bugs in browsers and then deal with more

[PHP] Does this If statement make sense?

2006-02-21 Thread Jeff
I'm again working with someone else's code and I have a problem I believe is in the section below. The problem is, I can't seem to understand what the "IF" conditions are saying here. The problem I have is with the second condition. To me this reads in psudo code: If( X and (if Y exists, then W

RE: [PHP] Does this If statement make sense?

2006-02-21 Thread Jay Blanchard
[snip] If( X and (if Y exists, then W otherwise Z)) Does this work? If so how is it evaluated? Here is the actual code. if ($tostaf && ($reply->comment ? $config->send_comment_staf : $config->send_emailreply_staf)) [/snip] IF X then IF Y, W IF X then IF NOT Y, Z There is no ELSE to support

Re: [PHP] CLASS/Object lifetime

2006-02-21 Thread Jochem Maas
roger helgesen wrote: Hi! I'v got 2 classes. CLASS1 makes a array of instanses of class2. I need thees classes 2 live for the duration of the session so I serialize class1 to a _session var. I submit the form and the page is reloaded. I unserialize class1 back 2 same instanse var. class1

Re: [PHP] CLASS/Object lifetime

2006-02-21 Thread roger helgesen
Jochem Maas wrote: roger helgesen wrote: Hi! I'v got 2 classes. CLASS1 makes a array of instanses of class2. I need thees classes 2 live for the duration of the session so I serialize class1 to a _session var. I submit the form and the page is reloaded. I unserialize class1 back 2 same in

[PHP] Re: CLASS/Object lifetime - > Here is the code

2006-02-21 Thread roger helgesen
roger helgesen wrote: Hi! I'v got 2 classes. CLASS1 makes a array of instanses of class2. I need thees classes 2 live for the duration of the session so I serialize class1 to a _session var. I submit the form and the page is reloaded. I unserialize class1 back 2 same instanse var. class1

RE: [PHP] Re: Help with query

2006-02-21 Thread Duffy, Scott E
> SELECT * FROM exams LEFT JOIN results ON exams.id_test=results.id_test WHERE > results.id_test IS NULL AND id_student=".$user exams.id_test=results.id_test results.id_test IS NULL think those are preventing this from happening. Wouldn't you want this Results.id_student IS NULL Since if the s

[PHP] Reading binary http post

2006-02-21 Thread Dirk Vanden Boer
Hi, I have a C++ application that posts binary data to a php script that I created using libcurl. Everything works fine except when my binary data happens to start with the '&' symbol. In that case I can't read the http post data (isset returns false). The post argument then looks like data=&Ñ

[PHP] How do I output error messages

2006-02-21 Thread Paul Goepfert
Hi all, I have a web page that I am doing valildation on. I have figured out how to at least get the page to load the page content. What I can't seem to figure out is how to output the error messages to the screen. The validation is being performed on the same page as the form that is being val

RE: [PHP] How do I output error messages

2006-02-21 Thread Jay Blanchard
[snip] if (isset($submit)) { //vaildation code } else { //webpage } [/snip] What is $submit? Is it set ever? The problem probably lies in the fact that $submit, whatever it is, never gets set. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reading binary http post

2006-02-21 Thread Paul Scott
On Tue, 2006-02-21 at 19:40 +0100, Dirk Vanden Boer wrote: > The post argument then looks like data=&A > Reading the post is done like this: > if (isset($_POST['data']) > Is there a way to fix this problem? > Have you tried base64_encoding the binary data, then decoding it again on the PHP side?

[PHP] Re: Reading binary http post

2006-02-21 Thread Dan Baker
"Dirk Vanden Boer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a C++ application that posts binary data to a php script that I > created using libcurl. Everything works fine except when my binary data > happens to start with the '&' symbol. In that case I can't r

Re: [PHP] Reading binary http post

2006-02-21 Thread Dirk Vanden Boer
Thanks for the hint, I'm not doing any encoding at the moment, I'll try it out tomorrow. Dirk On 2/21/06, Paul Scott <[EMAIL PROTECTED]> wrote: > On Tue, 2006-02-21 at 19:40 +0100, Dirk Vanden Boer wrote: > > The post argument then looks like data=&A > > Reading the post is done like this: > > if

RE: [PHP] How do I output error messages

2006-02-21 Thread Jeremy Schreckhise
You could pass your error message back and forth as an HTTP post. $myMsg = $_GET['error_msg']; if(isset($myMsg)) { //print my message } else { //process as normal } -Original Message- From: Paul Goepfert [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 21, 2006 12:53 PM

[PHP] novice with hacked email form issue

2006-02-21 Thread cKc Consultants
An email form that uses a simple server side php code to send the variable values managed to send: Content-Type: multipart/alternative; > boundary=5c7c7e682d991e8ec1f6825582ea2103 > MIME-Version: 1.0 > Subject: round a rock by way of anchorage > bcc: [EMAIL PROTECTED] > > This is a multi-part

[PHP] Re: CLASS/Object lifetime - > more info

2006-02-21 Thread roger helgesen
The function that gives me trouble - function fyll_sub_konto($pv){ foreach($this->subposter AS $konto){ $konto->fyll_fra_post($pv); } } - $this->subposter is the array of CLASS2 function fyll_fra_post($post_vars){ ec

Re: [PHP] novice with hacked email form issue

2006-02-21 Thread Greg Schnippel
On 2/21/06, cKc Consultants <[EMAIL PROTECTED]> wrote: > An email form that uses a simple server side php code to send the variable > values managed to send: Try looking for articles on 'email injection'. This is a really good place to start for a description of the security risk and ways to patc

Re: [PHP] How do I output error messages

2006-02-21 Thread Richard Lynch
On Tue, February 21, 2006 12:52 pm, Paul Goepfert wrote: $messages = array(); > if (isset($submit)) > { > //vaildation code Each invalid input adds another element to $messages array. //E.G.: if (!isset($_REQUEST['name'])) $messages[] = "Name is a required field."; > } > else > { if

Re: [PHP] novice with hacked email form issue

2006-02-21 Thread Cristian MARIN
Good Resource Greg Schnippel wrote: On 2/21/06, cKc Consultants <[EMAIL PROTECTED]> wrote: An email form that uses a simple server side php code to send the variable values managed to send: Try looking for articles on 'email injection'. This is a really good place to start for a desc

Re: [PHP] Reading binary http post

2006-02-21 Thread Richard Lynch
You probably should be URL-encoding your data in the first place... http://php.net/urlencode http://example.com/$data"; //RIGHT: $URL = "http://example.com/$data_url";; If it's not feasible for your C++ application to replicate urlencode() then you may be able to get what you want with that http

[PHP] Parse Error

2006-02-21 Thread Ray Cantwell
Hi all, I am a noob and super confused right now. I have some really simple code and i am getting an error that reads: *Parse error*: syntax error, unexpected T_VARIABLE in */var/www/mysql_up.php* on line here is the code: Test MySQL Error " . mysql_errno() . ": " . mysql_error

RE: [PHP] Parse Error

2006-02-21 Thread Jay Blanchard
[snip] I am a noob and super confused right now. I have some really simple code and i am getting an error that reads: *Parse error*: syntax error, unexpected T_VARIABLE in */var/www/mysql_up.php* on line here is the code: Test MySQL http://www.php.net/) To unsubscribe, visit: http://www.php.

Re: [PHP] Object lifetime

2006-02-21 Thread Richard Lynch
On Tue, February 21, 2006 9:12 am, roger helgesen wrote: > I'v got CLASS 1 and CLASS2. > CLASS1 makes many instanses of CLASS2 and stores them in an array. > > Ex. > -- > load class definition... > start_session(); > > $cl1=new CLASS1; > > I seria

Re: [PHP] Parse Error

2006-02-21 Thread Ray Hauge
On Tuesday 21 February 2006 14:27, Ray Cantwell wrote: > Hi all, > I am a noob and super confused right now. I have some really simple code > and i am getting an error that reads: > *Parse error*: syntax error, unexpected T_VARIABLE in > */var/www/mysql_up.php* on line > > here is the code: > > >

Re: [PHP] Parse Error

2006-02-21 Thread Kevin Waterson
This one time, at band camp, Ray Cantwell <[EMAIL PROTECTED]> wrote: > $host="localhost" > $user="ray" > $password="*" these need to be terminated with ; $host = 'localhost'; etc etc Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed

Re: [PHP] novice with hacked email form issue

2006-02-21 Thread Richard Lynch
On Tue, February 21, 2006 12:19 pm, cKc Consultants wrote: > An email form that uses a simple server side php code to send the > variable > values managed to send: Here is a stripped-down version of what happened: YOUR BAD CODE: Your Email: Your Message: Here is a crude script specifical

  1   2   >