Re: [PHP] function problem

2005-01-03 Thread Matthew Weier O'Phinney
* Richard Lynch <[EMAIL PROTECTED]>: > > > '$shippingCountry1')"))) > > { > >echo "the insertiont cannot be done"; > > echo mysql_error(); > > http://php.net/mysql_error > > >exit(); > > } > > header("Location:http://$HTTP_HOST/$DOCROOT/allright.html";); > > DON'T DO THAT!!! > > Just

Re: [PHP] function problem

2005-01-03 Thread Richard Lynch
> '$shippingCountry1')"))) > { >echo "the insertiont cannot be done"; echo mysql_error(); http://php.net/mysql_error >exit(); > } > header("Location:http://$HTTP_HOST/$DOCROOT/allright.html";); DON'T DO THAT!!! Just do: include 'allright.html'; The Location header is for a docu

Re: [PHP] function problem

2005-01-03 Thread Viktor Popov
Hi! Thank you for the reply! I have change the function: function doReg($fname1="",$family1="",$company1="", $MOL1="", $dannum1="", $bulstat1="", $phone1="", $email1="", $username1="", $password1="", $payment1="", $maillist1="", $Addr1="", $City1="", $zipcode1="", $Country1="", $shippingName1=""

Re: [PHP] function problem

2005-01-02 Thread Ligaya Turmelle
Are you getting an error? If so what does it say. Also in your code you have nothing to tell you if something is going wrong. Use echo statements - say something if the connection or the query doesn't go through. Also noticed that when you made the connection to the DB you didn't assign it t

Re: [PHP] Function Problem

2004-09-01 Thread Jim Grill
> I'm having a problem with a php application; > > I have two files: one is ccadduser wich adds users to a controlcenter > that I am currently designing for a website. > > In that ccaduserfile I call for a function checkpermission(); this > function is defined in another file called ccfunctions > >

RE: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Dave Carrera
-Original Message- From: Vincent Jansen [mailto:[EMAIL PROTECTED] Sent: 13 January 2004 13:05 To: 'Dave Carrera'; 'Richard Davey' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Function Problem (Long-ish) I doubt that... MySQL says: Mixing of GROUP columns (MIN(),MAX(),COUNT()...) w

RE: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Vincent Jansen
y' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Function Problem (Long-ish) Thanks for the reply Richard. If I use this sql in my func: $sql = mysql_query("select count(fieldtocount) as cnt, sum(fieldforsum) as total from $tab3 where fieldtocompare =\"$varcomparedwith\"");

RE: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Dave Carrera
I am puzzled why and if you or the list can help I would appreciate it. Thank you Dave C -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: 13 January 2004 12:48 To: Dave Carrera Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Function Problem (Long-ish) Hello Dave, Tue

Re: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Jason Wong
On Tuesday 13 January 2004 20:34, Dave Carrera wrote: [snip] > My Question is Why ? > > Any help is a appreciated and I thank you fully in advance. You're not checking for errors. Incorporate error checking code and make use of mysql_error(). -- Jason Wong -> Gremlins Associates -> www.gremli

Re: [PHP] Function Problem (Long-ish)

2004-01-13 Thread CPT John W. Holmes
From: "Dave Carrera" <[EMAIL PROTECTED]> > I get a Warning: > mysql_fetch_array(): supplied argument is not a valid MySQL result resource Whenever you get this warning it's because your query failed for some reason and you're trying to use a result that's not valid. Use mysql_error() to see wha

Re: [PHP] Function Problem (Long-ish)

2004-01-13 Thread Richard Davey
Hello Dave, Tuesday, January 13, 2004, 12:34:33 PM, you wrote: DC> sql = mysql_query("select *, count(id) as cnt from table where DC> somefield=\"somevar\""){ It's nothing to do with your function, simply that your SQL is invalid. -- Best regards, Richardmailto:[E

RE: [PHP] function problem?

2003-12-30 Thread Jay Blanchard
[snip] Not sure why the last section won't work... ...so much code it made my head hurt [/snip] Not sure either. Did you have a question? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] function problem (simple redirect)

2003-10-27 Thread Chris Shiflett
--- Frank Tudor <[EMAIL PROTECTED]> wrote: > function $payment{ You probably mean payment, not $payment. > header ("location:test_page.html"); The Location header has an uppercase L, a space after the colon, and an absolute URL after the space. Your example violates all three. Hope that helps.

RE: [PHP] function problem (simple redirect)

2003-10-27 Thread Gregory Kornblum
Make that: function payment{ global $payment; -Gregory -Original Message- From: Gregory Kornblum [mailto:[EMAIL PROTECTED] Sent: Monday, October 27, 2003 1:30 PM To: 'Frank Tudor'; 1PHP Subject: RE: [PHP] function problem (simple redirect) >function $payment{ C

RE: [PHP] function problem (simple redirect)

2003-10-27 Thread Gregory Kornblum
>function $payment{ Change that to: function payment{ $global $payment; Regards, -Gregory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] function problem

2003-02-14 Thread Nicholas Wieland
On 2003.02.15 00:11 Peter Gumbrell wrote: [...] $option_block .= " [...] Are you sure it's a scope problem ? You haven't instantiated any $option_block variable when the loop starts, so you're concatenating a string to a bunch of uninitialized memory :) I can't run your script at the moment, so

RE: [PHP] function problem

2003-02-14 Thread Peter Gumbrell
Friday, February 14, 2003 6:41 PM To: Php-General Subject: Re: [PHP] function problem Exactly where does $option_block get put into $string? -Kevin - Original Message - From: "Peter Gumbrell" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Fri

Re: [PHP] function problem

2003-02-14 Thread Kevin Stone
Exactly where does $option_block get put into $string? -Kevin - Original Message - From: "Peter Gumbrell" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 4:11 PM Subject: [PHP] function problem > I have a function below which populates a select l

Re: [PHP] Function Problem

2002-11-09 Thread conbud
Hey, Of course they do, they work if I put the echo in the function its self, but I dont need the echo in the function. - Lee "Marco Tabini" <[EMAIL PROTECTED]> wrote in message news:1036911387.23753.1054.camel@;localhost.localdomain... > Either add > > global $db; > > as the first line of the fu

Re: [PHP] Function Problem

2002-11-09 Thread Marco Tabini
Either add global $db; as the first line of the function or change your function call to: $db = db_conn("$host","$user","$pass","$dab"); I assume that $host, $user, $pass and $dab actually contain some correct values. Marco -- php|architect - The magazine for PHP Professionals T

Re: [PHP] function problem ...

2001-02-07 Thread Frederico Augusto Costa
Try require_once($your_file) or verify in $your_file use the function function_exists() []'s Frederico Augusto Costa [EMAIL PROTECTED] On Wed, 7 Feb 2001, Miguel Loureiro wrote: > Hello > I have a script that use other script file(php) twice, I c