[PHP] Re: function problem

2005-01-03 Thread Viktor Popov
Hi, thank you for your reply! I'll consider carefully this holes. Thank you! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: function problem

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

Re: [PHP] Re: function problem

2005-01-03 Thread Richard Lynch
If you were trying to use the result from mysql_pconnect() as the second optional argument to mysql_query() in your function, be sure you declare it 'global' inside the function. Read PHP docs on variable scope if this is what tripped you up. If not, I have no idea why the database is not

[PHP] Re: function problem

2005-01-02 Thread Greg Beaver
Hi Viktor, Viktor Popov wrote: Hi, I'm trying to do the following but I don't have any success. Could you help me here... I have this code in mu page: ?php include script/functions.php; require 'script/common.inc'; $valid = TRUE; if (isset ($_POST['submit'])) { foreach($_POST as $key=$value) {

[PHP] Re: function problem

2004-09-04 Thread Torsten Roehr
Matthias Bauw [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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

Re: [PHP] Re: function problem

2004-09-04 Thread Andre Dubuc
On Saturday 04 September 2004 03:42 pm, Torsten Roehr wrote: Matthias Bauw [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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

[PHP] Re: Function Problem

2004-09-01 Thread Jasper Howard
the checkpermission(); function should be run before php can pharse anything farther down the script, try putting an exit; after the header() statement. -- -- Jasper Howard :: Database Administration Velocity7 1.530.470.9292

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

2004-01-13 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hi List, I have a self-made function that uses a MySql statement something like this: Function MyFunc(){ sql = mysql_query(select * from table where somefield=\somevar\){ while(blah blah){ $var =blah blah; } } return

Re: [PHP] Re: Function Problem

2002-11-10 Thread Ernest E Vogelsinger
At 08:16 10.11.2002, conbud said: [snip] also I have the function wrong in my original question I have it as function db_conn($host,$user,$pass,$dab) { $db = mysql_connect($host, $user,$pass mysql_select_db($dab,$db); } and not function

[PHP] Re: Function Problem

2002-11-09 Thread conbud
also I have the function wrong in my original question I have it as function db_conn($host,$user,$pass,$dab) { $db = mysql_connect($host, $user,$pass mysql_select_db($dab,$db); } and not function db_conn($host,$user,$pass,$dab) { $db = mysql_connect($host, $user,$pass)mysql_select_db($dab,$db); }

Re: [PHP] Re: Function Problem

2002-11-09 Thread Maxim Maletsky
you need to return $db: function db_conn($host,$user,$pass,$dab) { $db = mysql_connect($host, $user,$pass mysql_select_db($dab,$db); return $db; } and then use $db = db_conn(,,,); or make it global: function db_conn($host,$user,$pass,$dab) { blobal $db; $db = mysql_connect($host, $user,$pass

Re: [PHP] Re: Function Problem

2002-11-09 Thread conbud
huh I thought I tried that befoer and it didnt work but this time it worked good, thanks everyone. Also whats the difference between $globals['$variable'] and just global -Lee Maxim Maletsky [EMAIL PROTECTED] wrote in message news:20021110082455.7C29.MAXIM;php.net... you need to return $db: