[PHP] creating sql statements?? was:confused big time

2004-04-07 Thread Andy B
I always found this way of inserting data into a database messy. Here is a handy function to do array inserts and it builds the sql for you. function arrayINSERT($a,$tablename) { $sql = INSERT INTO $tablename (; foreach($a as $key = $value) { $sql .= $key .,; } $sql[strlen($sql)-1] =

[PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Dan Phiffer
Hello, I have what I hope to be a simple question about SimpleXML. Is it possible to get the attributes of a SimpleXML node as an associative array? Consider the following: ?php $sxe = simplexml_load_string('root attr=value/'); print_r($sxe-attributes()); // Gives: simplexml_element Object (

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Red Wingate
There is a way, but somehow i don't like it though ( but you can find this in the documentation ): This is config.xml: ?xml version=1.0 encoding=iso-8859-1 ? config lib_error param name=error_logfile_write type=booleanFALSE/param /lib_error /config And my Testfile: $xml =

Re: [PHP] radio buttons checked or not

2004-04-07 Thread Daniel Clark
My understanding is if the variable exists then the radio button was checked. i have this code: ?if($old['Type']==Annual){? input type=radio name=eventtype value=Annualchecked accesskey=yYes ?}else {? input type=radio name=eventtype value=OneTime checked accesskey=nNo?}? was just

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread John W. Holmes
From: Dan Phiffer [EMAIL PROTECTED] I have what I hope to be a simple question about SimpleXML. Is it possible to get the attributes of a SimpleXML node as an associative array? Consider the following: ?php $sxe = simplexml_load_string('root attr=value/'); print_r($sxe-attributes()); //

Re: [PHP] radio buttons checked or not

2004-04-07 Thread Andy B
- Original Message - From: Daniel Clark [EMAIL PROTECTED] To: Andy B [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 4:22 PM Subject: Re: [PHP] radio buttons checked or not My understanding is if the variable exists then the radio button was checked. i

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Dan Phiffer
Red Wingate wrote: ?xml version=1.0 encoding=iso-8859-1 ? config lib_error param name=error_logfile_write type=booleanFALSE/param /lib_error /config $xml = simplexml_load_file( 'config.xml' ); foreach ( $xml-lib_error-param AS $id = $param ) { echo $param['name'] ;

[PHP] PHP OO concepts

2004-04-07 Thread jdavis
Hello, I have am checking out PHP OOP and it's pretty smooth. I have a decent amount of Java experience so PHP OOP is really easy to pick up. However I have a few questions I was hoping someone could help me with. Can php have a main()? If not ... how to you start a program that is purley PHP

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Dan Phiffer
John W. Holmes wrote: Have you seen Example 4 here: http://us2.php.net/manual/en/ref.simplexml.php Not sure if that helps or not, though, but it looks like it's already an associative array. It certainly looks like an associative array, but the array_keys() function chokes on it: Warning:

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Red Wingate
So, this one will work out quite well ( maybe one should take a look at the documentation of attributes() :-) foreach ( $xml-lib_error-param AS $param ) { $n = 0 ; while ( is_object ( $xml-lib_error-param[$n] ) ) { foreach( $xml-lib_error-param[$n]-attributes() AS $a = $b ){

Re: [PHP] PHP OO concepts

2004-04-07 Thread Robert Cummings
On Wed, 2004-04-07 at 16:44, jdavis wrote: Hello, I have am checking out PHP OOP and it's pretty smooth. I have a decent amount of Java experience so PHP OOP is really easy to pick up. However I have a few questions I was hoping someone could help me with. Can php have a main()? If

[PHP] OOP Question

2004-04-07 Thread Richard Lewis
What do members think that this code should do: class A { var $a, $b; function A($a) { $this-$a = $a; } function prnt() { echo bra= . $this-$a; } } class B extends A { function B($a, $b) { parent::A($a); $this-$b = $b; } function prnt() {

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Dan Phiffer
Red Wingate wrote: So, this one will work out quite well ( maybe one should take a look at the documentation of attributes() :-) Wow I can't believe I missed that. Hehe. I guess the lesson here is don't always trust what you get from print_r(). Thanks for the responses, -Dan foreach (

[PHP] Newbie question about operators

2004-04-07 Thread Gabe
Looking at the code below, what exactly is happening with the $name=$value part? I looked in the PHP online documentation and I can't find that operator. What is it doing exactly and what is it called? foreach ($some_array as $name=$value) { ... some code ... } Thanks alot! -- PHP General

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Red Wingate
Guess it was quite luck i saw the little note in the documentation: Note: SimpleXML has made a rule of adding iterative properties to most methods. They cannot be viewed using var_dump() or anything else which can examine objects. Guess i will have to take a look at my config parser again :-)

Re: [PHP] Newbie question about operators

2004-04-07 Thread Matt Matijevich
[snip] foreach ($some_array as $name=$value) { ... some code ... } [/snip] http://www.php.net/foreach will give you a good explanation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP OO concepts

2004-04-07 Thread Red Wingate
You will find some usefull ressources over at http://www.phppatterns.com/ -- red Robert Cummings wrote: [...] Hello, I have am checking out PHP OOP and it's pretty smooth. I have a decent amount of Java experience so PHP OOP is really easy to pick up. However I have a few questions I was

[PHP] APACHE

2004-04-07 Thread Wykis
Guys... I Think I Am In Wrong Place... But What Is Address Of Apache Newsgroups? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OOP Question

2004-04-07 Thread Robert Cummings
On Wed, 2004-04-07 at 17:07, Richard Lewis wrote: What do members think that this code should do: class A { var $a, $b; function A($a) { $this-$a = $a; } function prnt() { echo bra= . $this-$a; } } class B extends A { function B($a, $b) {

Re: [PHP] Newbie question about operators

2004-04-07 Thread Gabe
Thanks for the page. That was helpful. Just to make sure, is that operator only typically used then with foreach loops and arrays? Matt Matijevich [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] foreach ($some_array as $name=$value) { ... some code ... } [/snip]

Re: [PHP] Newbie question about operators

2004-04-07 Thread Red Wingate
arrays :-) you are defining arrays like: $x = array ( 'a' = 'Apple' , 'b' = 'Banana' , ... ); -- red Gabe wrote: Thanks for the page. That was helpful. Just to make sure, is that operator only typically used then with foreach loops and arrays? Matt Matijevich [EMAIL PROTECTED] wrote in

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread William Lovaton
I don't think so, Wouldn't be better if ctype_digit() return false on an empty string?? any way an empty string is not a digit. This change will brake backward compatibility so it is not an option. if you look carefully the function that you propose is doing two things at once... at this level

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread Red Wingate
JFYI : var_dump ( '' == 0 ) eq TRUE William Lovaton wrote: I don't think so, Wouldn't be better if ctype_digit() return false on an empty string?? any way an empty string is not a digit. This change will brake backward compatibility so it is not an option. if you look carefully the function

[PHP] Administrator page and password problem

2004-04-07 Thread Erik Gjertsen
I try to made a administrator page that I need to writ user name and password. But I have problem with the password. There comes one error where I writ 1..(one) I have not made a table on MySql but in the book I read it scowl work. Can some one tell me why it not work. Here is the code: ?php #

[PHP] writing a class in php to print form elements

2004-04-07 Thread Andy B
hi... is it totally usefull/reasonable to write a class in php that prints different different form elements in html... i.e. inputs, buttons, drop downs, multi selects and son? that way (at least i think) then it would be easier to change the element attributes dynamically... -- PHP General

Re: [PHP] Administrator page and password problem

2004-04-07 Thread Red Wingate
You mixed up here a little :-) [...] if (strlen($_POST['password1']) 0) { if ($_POST['password1'] == ($_POST['password2'] { 1. $password = TRUE; } else { $password = FALSE; echo 'pYour password did not match the confirmed password!/p'

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread William Lovaton
Yeah, sometimes this is an annoying problem with PHP. Somehow, , null, 0 and 0 is the same thing. The last two are considered empty() too. -William El mi? 07-04-2004 a las 16:34, Red Wingate escribió: JFYI : var_dump ( '' == 0 ) eq TRUE William Lovaton wrote: I don't think so,

[PHP] Password

2004-04-07 Thread Erik Gjertsen
I try to made a administrator page that I need to writ user name and password. But I have problem with the password. There comes one error where I writ 1..(one) I have not made a table on MySql but in the book I read it scowl work. Can some one tell me why it not work. Here is the code: ?php #

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread Red Wingate
They are typecasted to match the current contexts needs - often a problem but even - but this is one of PHPs strenghs :-) -- red William Lovaton wrote: Yeah, sometimes this is an annoying problem with PHP. Somehow, , null, 0 and 0 is the same thing. The last two are considered empty() too.

[PHP] Re: Can someone with list access please remove these two?

2004-04-07 Thread Justin Patrin
Richard Davey wrote: Hi, Subject says it all - they're causing auto-responder junk to any list poster and it's annoying: Information Desk [EMAIL PROTECTED] Advance Credit Suisse Bank [EMAIL PROTECTED] I second the motion! -- paperCrane Justin Patrin -- PHP General Mailing List

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread Chris Shiflett
--- William Lovaton [EMAIL PROTECTED] wrote: Yeah, sometimes this is an annoying problem with PHP. Somehow, , null, 0 and 0 is the same thing. You can always use === if you don't want it to cast. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming Fall 2004

[PHP] Re: writing a class in php to print form elements

2004-04-07 Thread Justin Patrin
Andy B wrote: hi... is it totally usefull/reasonable to write a class in php that prints different different form elements in html... i.e. inputs, buttons, drop downs, multi selects and son? that way (at least i think) then it would be easier to change the element attributes dynamically... Sure

[PHP] Re: Hinding URL

2004-04-07 Thread Wykis
You Can try ?php include(hiddenpage.htm); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Can someone with list access please remove these two?

2004-04-07 Thread William Lovaton
me too! -William El mi? 07-04-2004 a las 16:44, Justin Patrin escribió: Richard Davey wrote: Hi, Subject says it all - they're causing auto-responder junk to any list poster and it's annoying: Information Desk [EMAIL PROTECTED] Advance Credit Suisse Bank [EMAIL PROTECTED]

Re: [PHP] Re: Can someone with list access please remove these two?

2004-04-07 Thread Red Wingate
yep William Lovaton wrote: me too! -William El mi? 07-04-2004 a las 16:44, Justin Patrin escribió: Richard Davey wrote: Hi, Subject says it all - they're causing auto-responder junk to any list poster and it's annoying: Information Desk [EMAIL PROTECTED] Advance Credit Suisse Bank [EMAIL

Re: [PHP] Re: session_exist() ?? Can this be done?

2004-04-07 Thread Jochem Maas
Jochem Maas wrote: for those who haven't yet read it: I meant to add a link above to a tutorial (which I later decided was rubbish!) - it was not meant to be some strange 'dis' to Monty. BTW: if Monty is the Monty from Smarty fame: good on ya! :-) Monty wrote: Hi Red... Actually, I have my

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread William Lovaton
Red, Chris, Good advice, I rarely have to use it, though. -William El mi? 07-04-2004 a las 16:44, Chris Shiflett escribió: --- William Lovaton [EMAIL PROTECTED] wrote: Yeah, sometimes this is an annoying problem with PHP. Somehow, , null, 0 and 0 is the same thing. You can always use

Re: [PHP] assigning NULL to a variable

2004-04-07 Thread Marek Kilimajer
William Lovaton wrote: El mar, 06-04-2004 a las 07:41, Marek Kilimajer escribió: Andy B wrote: how would you assign NULL to a variable if its original value is ? otherwise leave it with its value... if($var === '') $var = NULL; what about: if ($var == '') unset($var); No - NULL is not the

Re: [PHP] assigning NULL to a variable

2004-04-07 Thread Justin Patrin
Marek Kilimajer wrote: William Lovaton wrote: El mar, 06-04-2004 a las 07:41, Marek Kilimajer escribió: Andy B wrote: how would you assign NULL to a variable if its original value is ? otherwise leave it with its value... if($var === '') $var = NULL; what about: if ($var == '')

[PHP] Re: Administrator page and password problem

2004-04-07 Thread Erik Gjertsen
Thanks for help Red. Cut and past is not always work But I got a new problem in the last line. I don't understand watt the problem is here Thanks Erik Gjertsen Erik Gjertsen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I try to made a administrator page that I need to writ user

[PHP] Re: Administrator page and password problem

2004-04-07 Thread Erik Gjertsen
Thanks for help Red. Cut and past is not always wok But I have a new problem in the last line. I don't understand why it's problem here Thanks Erik Gjertsen !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html

Re: [PHP] confused big time

2004-04-07 Thread Andy B
- Original Message - From: Chris W. Parker [EMAIL PROTECTED] To: Andy B [EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 6:30 PM Subject: RE: [PHP] confused big time Andy B mailto:[EMAIL PROTECTED] on Wednesday, April 07, 2004 2:09 PM said: yes you can absolutely do it that way.

[PHP] very large and long if statement

2004-04-07 Thread Andy B
I have this very large and long if statement: if (!empty($_SESSION['add']['type']) !empty($_SESSION['add']['start_date'] !empty($_SESSION['add']['end_date']) !empty($_SESSION['add']['name']) !empty($_SESSION['add']['county']) !empty($_SESSION['add']['discription'])

Re: [PHP] very large and long if statement

2004-04-07 Thread Robert Cummings
On Wed, 2004-04-07 at 18:47, Andy B wrote: I have this very large and long if statement: if (!empty($_SESSION['add']['type']) !empty($_SESSION['add']['start_date'] !empty($_SESSION['add']['end_date']) !empty($_SESSION['add']['name']) !empty($_SESSION['add']['county'])

Re: [PHP] very large and long if statement

2004-04-07 Thread Justin Patrin
Robert Cummings wrote: On Wed, 2004-04-07 at 18:47, Andy B wrote: I have this very large and long if statement: if (!empty($_SESSION['add']['type']) !empty($_SESSION['add']['start_date'] !empty($_SESSION['add']['end_date']) !empty($_SESSION['add']['name']) !empty($_SESSION['add']['county'])

Re: [PHP] PHP based Voice Chat Module

2004-04-07 Thread DvDmanDT
That's because he post to the newsgroup, Cc to the list, and the list system automaticly sends one to you personally.. :p -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Raditha Dissanayake [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Pushpinder, 1 message is

[PHP] Dynamic method calling

2004-04-07 Thread Darren Beale
Hi I'm trying to dynamically choose and call a method from within a class but actually calling a method dynamically does not seem to work whatever I try using php 4.3.3 Hopefully this test script will illustrate my point better, I always get to the I know we get to here bit, but there is no

Re: [PHP] very large and long if statement

2004-04-07 Thread Robert Cummings
On Wed, 2004-04-07 at 19:01, Justin Patrin wrote: Robert Cummings wrote: On Wed, 2004-04-07 at 18:47, Andy B wrote: I have this very large and long if statement: if (!empty($_SESSION['add']['type']) !empty($_SESSION['add']['start_date'] !empty($_SESSION['add']['end_date'])

[PHP] Re: Dynamic method calling

2004-04-07 Thread Justin Patrin
Darren Beale wrote: Hi I'm trying to dynamically choose and call a method from within a class but actually calling a method dynamically does not seem to work whatever I try using php 4.3.3 Hopefully this test script will illustrate my point better, I always get to the I know we get to here

Re: [PHP] PHP based Voice Chat Module

2004-04-07 Thread DvDmanDT
Hmm.. I'm pretty sure you can get Flash for Mac.. -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Pushpinder Singh [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Thanks Raditha, Yes we are primarily looking at a PHP chat module which will allow us conduct

Re: [PHP] Re: Dynamic method calling

2004-04-07 Thread Darren Beale
Justin Patrin wrote: For member fuctions: $a = 'nameOfMemberFunction'; $this-$a(); Typically the only thing I didn't try thanks++ Darren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Administrator page and password problem

2004-04-07 Thread Red Wingate
Add this into the VERY last line : ?php } ? [...] ?php # script 3.11 register.php if (isset($_POST['submit'])) { // Handel the form // check for name if (strlen($_POST['name']) 0) { $name = TRUE; } else { $name = FALSE; echo 'pyou have forgot to enter your name/p'; } // check for

[PHP] path to binary for php on linux

2004-04-07 Thread Andy B
anybody know what the exact path for the php binary on linux is? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: APACHE

2004-04-07 Thread zerof
http://www.apache.org/foundation/mailinglists.html - zerof - Wykis [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Guys... I Think I Am In Wrong Place... But What Is Address Of Apache Newsgroups? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] path to binary for php on linux

2004-04-07 Thread Curt Zirzow
* Thus wrote Andy B ([EMAIL PROTECTED]): anybody know what the exact path for the php binary on linux is? Depends on how it was installed, a common place is: /usr/local/bin/php Or you can type: which php and it will tell you where it is. Curt -- I used to think I was indecisive, but now

[PHP] Re: stuck with simple query..... Plz have a look

2004-04-07 Thread Ligaya Turmelle
You need to do a join. SELECT table1.ID AS PL_NAME, table1.ID AS PC_NAME, table1.ID AS PA_NAME FROM table1, table2 WHERE (table2.PL = table1.ID) AND (table2.PC = table1.ID) and (table2.PA = table1.ID) ; Or something like that. Sorry I couldn't be of more help. Respectfully, Ligaya Turmelle

[PHP] Cookies

2004-04-07 Thread Wykis
Does Any One Knows How To Set And Get Cookies? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] path to binary for php on linux

2004-04-07 Thread Andy B
it was installed with get and which php doesnt do anything just returns to the prompt with no output - Original Message - From: Curt Zirzow [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 8:11 PM Subject: Re: [PHP] path to binary for php on linux * Thus wrote

Re: [PHP] Cookies

2004-04-07 Thread Larry E . Ullman
Does Any One Knows How To Set And Get Cookies? The PHP manual is really good for stuff like this. Check out the setcookie() function. Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Newbie question about operators

2004-04-07 Thread Ligaya Turmelle
it is refering to the associative array, specifically the $key = $value . Note here (http://www.php.net/manual/en/language.types.array.php). Respectfully, Ligaya Turmelle Gabe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Looking at the code below, what exactly is happening with the

[PHP] Adding a new entry using PHP

2004-04-07 Thread Alistair Hayward
Hi, I am an ASP user, now learning PHP. When adding a record in ASP, I do this: Recordset.AddNew Field1 = whatever RecordSet.Update How is this done in PHP? I have built a recordset using a query, and have all the information needed to go into the different fields, but how do I 'Edit' or

Re: [PHP] smarty

2004-04-07 Thread Justin French
On 07/04/2004, at 1:33 AM, Angelo Zanetti wrote: hi all has anyone used smarty before? what do you think of it? I think it's pretty nice to seperate your script (code) from your design. i would like to hear your comments and if you have any alternatives let me know. PHP itself is a great

[PHP] Re: Password

2004-04-07 Thread Ligaya Turmelle
You have an error with your brackets. Your code looks like this if (strlen($_POST['password1']) 0) { if ($_POST['password1'] ==($_POST['password2'] { $password = TRUE; } if (strlen($_POST['password1']) 0) { if ($_POST['password1']

[PHP] Re: Adding a new entry using PHP

2004-04-07 Thread Justin Patrin
Alistair Hayward wrote: Hi, I am an ASP user, now learning PHP. When adding a record in ASP, I do this: Recordset.AddNew Field1 = whatever RecordSet.Update How is this done in PHP? I have built a recordset using a query, and have all the information needed to go into the different fields,

RE: [PHP] smarty

2004-04-07 Thread Jason Sheets
I can see your point and have used this technique in very small applications where the benefit of Smarty or other template engines are negated by the performance/resource usage overhead. However intermixing markup and PHP has introduced many problems in too many PHP projects for me to use this

RE: [PHP] PDF Page Pulling

2004-04-07 Thread Jason Sheets
I'd suggest taking a look at ghostscript it, it is available under AFPL and GPL licenses and offers the ability to convert individual pages to jpeg or other file formats. http://www.ghostscript.com Jason -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Wednesday,

[PHP] Combining SimpleXML objects

2004-04-07 Thread Dan Phiffer
Another quickie: is there an easy way to combine SimpleXML objects? Something Like: $a = simplexml_load_string('ab//a'); $c = simplexml_load_string('cdFoo/d/c'); $a-b = $c-d; print_r($a); Here's what I get: Warning: It is not possible to assign complex types to nodes in D:\...\test.php on line

Re: [PHP] Can someone with list access please remove these two?

2004-04-07 Thread Curt Zirzow
* Thus wrote Richard Davey ([EMAIL PROTECTED]): Hi, Subject says it all - they're causing auto-responder junk to any list poster and it's annoying: Information Desk [EMAIL PROTECTED] Advance Credit Suisse Bank [EMAIL PROTECTED] Forwarding mail to [EMAIL PROTECTED] just gets rejected to

[PHP] simple mysql_result() question

2004-04-07 Thread jdavis
hello, I am trying to authenticate users. I run this MySQL query using vars provided via a form select password from dealers where username = '$user' this works great if $user is actually a user in the database. otherwise i get this error Warning: mysql_result(): Unable to jump to row

[PHP] Unsubscribe!!

2004-04-07 Thread Ken Heath
Please remove me from the mailing list. Many different efforts has failed. :-( I apology to everyone who receive this message. _ Get rid of annoying pop-up ads with the new MSN Toolbar – FREE!

Re: [PHP] smarty

2004-04-07 Thread Kelly Hallman
Apr 8 at 10:26am, Justin French wrote: PHP itself is a great templating language :) h1?=$title?/h1 table ? foreach($staff as $person): ?tr td?=$person['firstname']? ?=$person['surname']?/td td?=$person['role']?/td td?=$person['phone']?/td tda

RE: [PHP] very large and long if statement

2004-04-07 Thread Tyler Replogle
hey, i don't know how to make it smaller but should it be if (!empty($_SESSION['add']['type']) !empty($_SESSION['add']['start_date']) !empty($_SESSION['add']['end_date']) !empty($_SESSION['add']['name']) !empty($_SESSION['add']['county']) !empty($_SESSION['add']['discription'])

RE: [PHP] Cookies

2004-04-07 Thread Tyler Replogle
yes i do but here is a really good tutorial on it http://www.phpfreaks.com/tutorials/120/0.php From: Wykis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] Cookies Date: Fri, 2 Apr 2004 16:52:23 +0100 Does Any One Knows How To Set And Get Cookies? -- PHP General Mailing List

RE: [PHP] very large and long if statement

2004-04-07 Thread Chris de Vidal
I have this very large and long if statement: if (!empty($_SESSION['add']['type']) !empty($_SESSION['add']['start_date'] !empty($_SESSION['add']['end_date']) !empty($_SESSION['add']['name']) !empty($_SESSION['add']['county']) !empty($_SESSION['add']['discription'])

Re: [PHP] smarty

2004-04-07 Thread Robert Cummings
On Wed, 2004-04-07 at 21:35, Kelly Hallman wrote: Apr 8 at 10:26am, Justin French wrote: PHP itself is a great templating language :) h1?=$title?/h1 table ? foreach($staff as $person): ?tr td?=$person['firstname']? ?=$person['surname']?/td td?=$person['role']?/td

Re: [PHP] SMS from pc to mobile phone

2004-04-07 Thread saepudin
On Wednesday 07 April 2004 10:29, saepudin wrote: hi, I want to send an SMS(to mobile phone etc) based on a database trigger or on completion of an php page. the site runs on linux. how to do this. How do i send the mobile no . what is the language, protocol, syntax and platform. if

Re: [PHP] smarty

2004-04-07 Thread John W. Holmes
Kelly Hallman wrote: Apr 8 at 10:26am, Justin French wrote: PHP itself is a great templating language :) h1?=$title?/h1 table ? foreach($staff as $person): ?tr td?=$person['firstname']? ?=$person['surname']?/td td?=$person['role']?/td td?=$person['phone']?/td tda

Re: [PHP] smarty

2004-04-07 Thread Kelly Hallman
Apr 7 at 10:01pm, Robert Cummings wrote: Smarty is a bit of a hack too... why do I need to declare my templates within the PHP code? If I'm an HTML designer I'd like to create a new page, include templates, use some data that's been made available and have it all in the template. I sure as

Re: [PHP] PDF Page Pulling

2004-04-07 Thread Evan Nemerson
http://marc.theaimsgroup.com/?l=php-generalm=107723910931417w=2 On Wednesday 07 April 2004 05:53 pm, Jason Sheets wrote: I'd suggest taking a look at ghostscript it, it is available under AFPL and GPL licenses and offers the ability to convert individual pages to jpeg or other file formats.

Re: [PHP] smarty

2004-04-07 Thread Justin French
On 08/04/2004, at 11:35 AM, Kelly Hallman wrote: Apr 8 at 10:26am, Justin French wrote: PHP itself is a great templating language :) h1?=$title?/h1 table ? foreach($staff as $person): ?tr td?=$person['firstname']? ?=$person['surname']?/td td?=$person['role']?/td td?=$person['phone']?/td tda

Re: [PHP] simple mysql_result() question

2004-04-07 Thread Richard Harb
Uhm .. I usually do: SELECT COUNT(id) FROM users WHERE name='$username' AND password='$password' if (username is found) // hopefully it's unique found ya else sorry This way you aleays have a value returned... HTH Richard Thursday, April 8, 2004, 3:29:11 AM, you wrote: hello, I am

Re: [PHP] very large and long if statement

2004-04-07 Thread Richard Harb
Thursday, April 8, 2004, 3:59:39 AM, you wrote: I have this very large and long if statement: if (!empty($_SESSION['add']['type']) !empty($_SESSION['add']['start_date'] !empty($_SESSION['add']['end_date']) !empty($_SESSION['add']['name']) !empty($_SESSION['add']['county'])

Re: [PHP] smarty

2004-04-07 Thread Kelly Hallman
Apr 7 at 10:22pm, John W. Holmes wrote: Uhhh, yeah--that's not templating, that's called spaghetti code :) +1 - Use of buzzword Right about here I could sense where this was going I don't know, what would you call it? Is there a non-buzzword term you'd be happier with? That term

[PHP] problems with md5()

2004-04-07 Thread jdavis
hello, I have a database containing usernames and md5 encrypted passwords. When i use md5() to encrypt a users password recived via a form to compare to the md5ed passwd in the database i get problems... for instance ... user foo has passwd 'pass' 'pass' md5ed in database is this

RE: [PHP] smarty

2004-04-07 Thread Jason Sheets
Some excellent points, however Smarty makes it much easier to do certain tasks than doing it in strait PHP and Smarty is extendable with PHP both directly and indirectly, you can create Smarty modifiers and functions and if necessary write inline PHP code. Web development has an hourly cost

RE: [PHP] problems with md5()

2004-04-07 Thread Chris
The second, longer, one is the correct one. It looks like the column you've got the password stored in is too small, it must be 32 characters long Chris -Original Message- From: jdavis [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 9:36 PM To: PHP List Subject: [PHP] problems

Re: [PHP] problems with md5()

2004-04-07 Thread Jason Wong
On Thursday 08 April 2004 12:35, jdavis wrote: hello, I have a database containing usernames and md5 encrypted passwords. When i use md5() to encrypt a users password recived via a form to compare to the md5ed passwd in the database i get problems... for instance ... user foo has passwd

Re: [PHP] problems with md5()

2004-04-07 Thread Richard Harb
could it be that the field in the database is of type varchar(25) ? looks like it's too small to hold the complete hash: that one always consists of 32 characters. Thursday, April 8, 2004, 6:35:47 AM, you wrote: hello, I have a database containing usernames and md5 encrypted passwords. When

RE: [PHP] problems with md5()

2004-04-07 Thread jdavis
On Wed, 2004-04-07 at 22:59, Chris wrote: The second, longer, one is the correct one. It looks like the column you've got the password stored in is too small, it must be 32 characters long Chris On Wed, 2004-04-07 at 22:57, Jason Wong wrote: md5() returns a 32 character string so

[PHP] Exceptions and builtin functions in PHP5

2004-04-07 Thread Tumurbaatar S.
If I understand right, PHP5 has an exception handling mechanism but it is only for manual using, i.e. a programmer can use try/catch but only for own code. PHP's built-in functions and functions from extensions still use old return value method. Yes? -- PHP General Mailing List

[PHP] Re: stuck with simple query..... Plz have a look

2004-04-07 Thread Yayati Kasralikar
Try something like is: select a.Name as PL_Name,b.Name as PC_Name,c.Name as PA_Name from (select * from table1,table2 where table1.ID=table2.PL) a, (select * from table1,table2 where table1.ID=table2.PC) b, (select * from table1,table2 where table1.ID=table2.PA) c where

<    1   2