[PHP-DB] Re: Large Arrays in a batch procedure

2004-04-07 Thread J.Veenhuijsen
Probably your scripts time out after 30 seconds.
Try :
set_time_limit(0);
in your script!
JOchem

Antonio Bernabei wrote:
Hi,
I have a problem. On a small lan I need to process a table with about 3
records. The work is to apply a formula to some fields of each record and
update another field of the same table.
I run php on a win2000 professional system and the first approach was to
make a for cycle in which I apply the formula to all records and echo the
result of the formula, just to show that the work is going on.
But I get into a timeout of the system after 30 seconds
Which is the right approach to this type of work, let's call it batch work?
Thank you
Antonio Bernabei
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Transfering large mysql database

2003-12-09 Thread J.Veenhuijsen
You can use phpmyadmin to export structure and data.
You have to be aware that the first line of the output
has to commented (# at start of line)
Otherwise phpmyadmin generates an error.
Jochem

Harlan Lax wrote:

Does anyone have a recomendation on an app that will help me transfer a
large table from one host provider to another.  I have tried phpmyadmin but
if I export to SQL the import doesn't seem to work.  If I export to csv I
lose the column formating.
On one host I have access to the root and on the other I am very limted.

Thanks
Harlan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Web counter question..

2003-12-08 Thread J.Veenhuijsen
Try :

?
session_start();
if ( ! isset($_SESSION['count']) )
{
  $fp=fopen(./counter.txt,r);
  $_SESSION['count']=fread($fp,5);
  fclose($fp);
  $_SESSION['count']++;
  $cnt=$_SESSION['count'];
  $fp=fopen(./counter.txt,w);
  fwrite($fp,$cnt);
  fclose($fp);
}
$c= $_SESSION['count'];
print You are visitor no : b$c/bBR;
?
Jochem

James Hatridge wrote:
Hi all..

I just put up my stamp bulletin on line (issue #100!!). I have a problem with 
it. The counter that I use counts everyone every time they look at the site. 
I want a better counter, can you all suggest one? It's got to work with html 
and php only.

Thanks,

JIM

PS Check out my stamp bulletin, link below!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] works on production server but not on localhost

2003-11-19 Thread J.Veenhuijsen
Try setting security settings on directory itself eg full control for 
IUSR_..

to do this right click on directory -propertys- security  add a user 
IUSR_... and give full access

Works fine for me

Jochem



Paul Ihrig wrote:
already tried that
read write execute scripts.
no go
-Original Message-
From: mustafa ocak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 7:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] works on production server but not on localhost


Settings - Control Panel - Administrative Tools -Internet Services
Manager
Click the Default Web Site on the list, directories will be shown
Right click the directory the files reside and Select Properties
You can give write permission to the directory here.

HTH

Mustafa

- Original Message -
From: Paul Ihrig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 2:44 PM
Subject: RE: [PHP-DB] works on production server but not on localhost


ok...
im on xp running iis win
i tried to figure out how to change permissions on files  did a few
example

but it never seemed to work.
is there a free chmod tool?
or a simple way to do it in windows?

again, i am sure i sound noob, and am...
thanks for the response.
-paul

-Original Message-
From: mustafa ocak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 7:32 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] works on production server but not on localhost
You are probably right, it looks like a permission problem.
What is the OS (win, Linux) of your machine?
It's not about PHP.INI, If your operating system is Windows give write
permission to the directory these text files reside.
You can do it by using Internet Services Manager
If it is a unix box (linux included) you can use
 chmod a+rw filename   or
 chmod 771 filename
to give write permission on these files  to everybody.
Maybe you have to give write permission to the directory too, I'm not sure
about it.
HTH

Mustafa

- Original Message -
From: Paul Ihrig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 2:16 PM
Subject: [PHP-DB] works on production server but not on localhost


hey guys..
just getting back in to using a little php.
have 2 simple hit counters that work fine on the production server.
but on my localhost it throughs several errors. looks like a permissions
thing?
i am not sure if there is a setting in my php.ini file that needs to be
tweaked.
kind of blind to the errors.
looks like a permissions thing?

hit counter: Warning: fopen(counterlog.txt, w) - Permission denied

in

C:\Inetpub\wwwroot\WCBE\counter.php on line 4 Warning: fwrite():

supplied

argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\counter.php on line 5 Warning: fclose():

supplied

argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\counter.php on line 6 12
hit counter2: 1
Warning: fopen(FX_DataCounter/wcbecounter.txt, r+) - Permission

denied

in C:\Inetpub\wwwroot\WCBE\nav.php on line 19 Warning: fgets(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 20 Warning: Cannot send session
cookie - headers already sent by (output started at
C:\Inetpub\wwwroot\WCBE\nav.php:19) in C:\Inetpub\wwwroot\WCBE\nav.php

on

line 21 Warning: Cannot send session cache limiter - headers already

sent

(output started at C:\Inetpub\wwwroot\WCBE\nav.php:19) in
C:\Inetpub\wwwroot\WCBE\nav.php on line 21 Warning: fseek(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 23 Warning: flock(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 24 Warning: fputs(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 25 Warning: flock(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 26 Warning: fclose(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 27
any help would be great.
thanks
-paul
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] works on production server but not on localhost

2003-11-19 Thread J.Veenhuijsen
Do you have NTFS of FAT32 as filesystem??
If NTFS you can set permissions in directories or files
if FAT32 you can not.
Jochem

Paul Ihrig wrote:
i don't have a security tab under properties when just browsing the
directory.
i only get a Directory Security tab when i am in the Internet Information
Services
there i have Anonymous access checked
User name IUSR_BAlgh
pass *
Allow IIS to control password checked
also Integrated Windows authentication checked.
seems funky...
i appreciate the help guys.
-paul
-Original Message-
From: J.Veenhuijsen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 8:27 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] works on production server but not on localhost
Try setting security settings on directory itself eg full control for
IUSR_..
to do this right click on directory -propertys- security  add a user
IUSR_... and give full access
Works fine for me

Jochem



Paul Ihrig wrote:

already tried that
read write execute scripts.
no go
-Original Message-
From: mustafa ocak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 7:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] works on production server but not on localhost


Settings - Control Panel - Administrative Tools -Internet Services
Manager
Click the Default Web Site on the list, directories will be shown
Right click the directory the files reside and Select Properties
You can give write permission to the directory here.

HTH

Mustafa

- Original Message -
From: Paul Ihrig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 2:44 PM
Subject: RE: [PHP-DB] works on production server but not on localhost



ok...
im on xp running iis win
i tried to figure out how to change permissions on files  did a few
example


but it never seemed to work.
is there a free chmod tool?
or a simple way to do it in windows?

again, i am sure i sound noob, and am...
thanks for the response.
-paul

-Original Message-
From: mustafa ocak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 7:32 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] works on production server but not on localhost
You are probably right, it looks like a permission problem.
What is the OS (win, Linux) of your machine?
It's not about PHP.INI, If your operating system is Windows give write
permission to the directory these text files reside.
You can do it by using Internet Services Manager
If it is a unix box (linux included) you can use
chmod a+rw filename   or
chmod 771 filename
to give write permission on these files  to everybody.
Maybe you have to give write permission to the directory too, I'm not sure
about it.
HTH

Mustafa

- Original Message -
From: Paul Ihrig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 2:16 PM
Subject: [PHP-DB] works on production server but not on localhost



hey guys..
just getting back in to using a little php.
have 2 simple hit counters that work fine on the production server.
but on my localhost it throughs several errors. looks like a permissions
thing?
i am not sure if there is a setting in my php.ini file that needs to be
tweaked.
kind of blind to the errors.
looks like a permissions thing?

hit counter: Warning: fopen(counterlog.txt, w) - Permission denied

in


C:\Inetpub\wwwroot\WCBE\counter.php on line 4 Warning: fwrite():

supplied


argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\counter.php on line 5 Warning: fclose():

supplied


argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\counter.php on line 6 12
hit counter2: 1
Warning: fopen(FX_DataCounter/wcbecounter.txt, r+) - Permission

denied


in C:\Inetpub\wwwroot\WCBE\nav.php on line 19 Warning: fgets(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 20 Warning: Cannot send session
cookie - headers already sent by (output started at
C:\Inetpub\wwwroot\WCBE\nav.php:19) in C:\Inetpub\wwwroot\WCBE\nav.php

on


line 21 Warning: Cannot send session cache limiter - headers already

sent


(output started at C:\Inetpub\wwwroot\WCBE\nav.php:19) in
C:\Inetpub\wwwroot\WCBE\nav.php on line 21 Warning: fseek(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 23 Warning: flock(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 24 Warning: fputs(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 25 Warning: flock(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 26 Warning: fclose(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 27
any help would be great.
thanks
-paul
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net

Re: [PHP-DB] works on production server but not on localhost

2003-11-19 Thread J.Veenhuijsen
Try setting permissions on counterlog.txt itself inside IIS and and on 
the file itself

Jochem

Paul Ihrig wrote:
i don't have a security tab under properties when just browsing the
directory.
i only get a Directory Security tab when i am in the Internet Information
Services
there i have Anonymous access checked
User name IUSR_BAlgh
pass *
Allow IIS to control password checked
also Integrated Windows authentication checked.
seems funky...
i appreciate the help guys.
-paul
-Original Message-
From: J.Veenhuijsen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 8:27 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] works on production server but not on localhost
Try setting security settings on directory itself eg full control for
IUSR_..
to do this right click on directory -propertys- security  add a user
IUSR_... and give full access
Works fine for me

Jochem



Paul Ihrig wrote:

already tried that
read write execute scripts.
no go
-Original Message-
From: mustafa ocak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 7:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] works on production server but not on localhost


Settings - Control Panel - Administrative Tools -Internet Services
Manager
Click the Default Web Site on the list, directories will be shown
Right click the directory the files reside and Select Properties
You can give write permission to the directory here.

HTH

Mustafa

- Original Message -
From: Paul Ihrig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 2:44 PM
Subject: RE: [PHP-DB] works on production server but not on localhost



ok...
im on xp running iis win
i tried to figure out how to change permissions on files  did a few
example


but it never seemed to work.
is there a free chmod tool?
or a simple way to do it in windows?

again, i am sure i sound noob, and am...
thanks for the response.
-paul

-Original Message-
From: mustafa ocak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 7:32 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] works on production server but not on localhost
You are probably right, it looks like a permission problem.
What is the OS (win, Linux) of your machine?
It's not about PHP.INI, If your operating system is Windows give write
permission to the directory these text files reside.
You can do it by using Internet Services Manager
If it is a unix box (linux included) you can use
chmod a+rw filename   or
chmod 771 filename
to give write permission on these files  to everybody.
Maybe you have to give write permission to the directory too, I'm not sure
about it.
HTH

Mustafa

- Original Message -
From: Paul Ihrig [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 2:16 PM
Subject: [PHP-DB] works on production server but not on localhost



hey guys..
just getting back in to using a little php.
have 2 simple hit counters that work fine on the production server.
but on my localhost it throughs several errors. looks like a permissions
thing?
i am not sure if there is a setting in my php.ini file that needs to be
tweaked.
kind of blind to the errors.
looks like a permissions thing?

hit counter: Warning: fopen(counterlog.txt, w) - Permission denied

in


C:\Inetpub\wwwroot\WCBE\counter.php on line 4 Warning: fwrite():

supplied


argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\counter.php on line 5 Warning: fclose():

supplied


argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\counter.php on line 6 12
hit counter2: 1
Warning: fopen(FX_DataCounter/wcbecounter.txt, r+) - Permission

denied


in C:\Inetpub\wwwroot\WCBE\nav.php on line 19 Warning: fgets(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 20 Warning: Cannot send session
cookie - headers already sent by (output started at
C:\Inetpub\wwwroot\WCBE\nav.php:19) in C:\Inetpub\wwwroot\WCBE\nav.php

on


line 21 Warning: Cannot send session cache limiter - headers already

sent


(output started at C:\Inetpub\wwwroot\WCBE\nav.php:19) in
C:\Inetpub\wwwroot\WCBE\nav.php on line 21 Warning: fseek(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 23 Warning: flock(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 24 Warning: fputs(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 25 Warning: flock(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 26 Warning: fclose(): supplied
argument is not a valid File-Handle resource in
C:\Inetpub\wwwroot\WCBE\nav.php on line 27
any help would be great.
thanks
-paul
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http

Re: [PHP-DB] works on production server but not on localhost

2003-11-19 Thread J.Veenhuijsen
if it is ntfs you should have a security tab if you right click
in the file counterlog.txt .
If not the you should login as administrator.
then set full controll to counterlog.txt for IUSR_...
Jochem

Paul Ihrig wrote:
it's ntfs
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Can anyone see why unlink isn't working?

2003-08-28 Thread J.Veenhuijsen
maybe $path$nameb is wrong
$path.$nameb???
Try echoing $path$nameb and see if is is a valid file path.

Jochem

Chris Payne wrote:
Hi there everyone,

I have image details stored in my DB, and i'm trying to remove the ones I select, but I keep getting an error saying that there is an unexpected T_Variable, can anyone see what is wrong here?  It's probably obvious, but for the life of me 

if (count($del) = 1) { 
for ($i=0;$icount($del);$i++) { 

$nameb = $del[$i];

echo $nameb;

unlink($path$nameb);

};

Thanks for any help :-)

Chris
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: mysql_fetch_array

2003-02-25 Thread J.Veenhuijsen
Maybe on the 14th record the while statement is false.

Try do...while ???

Jochem

F.Collineau wrote:
Hi, 
 
Here is my code: 
? 
	require(util.php); 
	$sql= new MySQL_class; 
	$sql-Setup(user,user,localhost); 
	$sql-connexion(materiel); 
	$sql-Query(select nom from personne); 
	$cpt=0; 
	while($row=mysql_fetch_array($sql-result)) 
	{ 
		print($cpt); 
		print(br);  
		print($row[nom]); 
		print(br); 
		$cpt++; 
	}		 
	$sql-close; 
? 
 
The personne table has 14 articles. 
but with this code i can see only 13 articles 
 
here is the output on a browser: 
0BRUYÈRE 
1COLLINEAU 
2ELIAS 
3GLOANEC 
4HUGOT 
5LE BRIS 
6LE FLOCH 
7LEMAUVIEL 
8LOUVEL 
9MARTINIERE 
10OGUET 
11THOMAS 
12VASSELET 
 
What is the problem ? 
 
Thanks 
 
Franck 
 
--

Faites un voeu et puis Voila ! www.voila.fr 




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: PHP session problems

2003-02-25 Thread J.Veenhuijsen
Is the session.save_path in php.ini set and does the directory it refers 
to exist?

Jochem

David Rice wrote:
I have been having trouble with PHP sessions, the session variables are 
not able to be called through the script.

If have commented the area at the bottome where the session variable is 
NULL when var dump is called to check it (about 20 lines from the 
bottom... depending on if the text is wrapping or not)

here is the actual code
==
?
session_start();
session_register('valid_user');
session_register('name');
/* Start A Session */
include library/include/header.php ;
include library/include/database.php ;
/* Include a header file and a database connections/functions file
*/
if ( ( !isset ( $HTTP_COOKIE_VARS[username] ) )  ( !isset ( 
$proceed ) )  ( !isset ( $submit ) ) ) {

/* The Cookie is not set, so load the page as if it is the first 
time
*/



?

form name=login method=post action=? echo $PHP_SELF; ?
  select name=staff
?
  $query =  SELECT * FROM Staff ;
  $result = mysql_query($query) or die( mysql_error () );
  While( $row = mysql_fetch_array($result) ) {

?
 option value=? echo $row[0]; ?? echo $row[1]; 
echo  ;  echo $row[2] ;?/option
?
 }
?
   /select
   input type=submit name=proceed value=proceed
/form
?
}





elseif( ( !isset ( $HTTP_COOKIE_VARS[username] ) )  ( !isset ( 
$submit ) )  ( isset ( $proceed ) ) )  {
/* The User is now attempting to register */
?

form name=register method=post action=? echo $PHP_SELF; ?
?
$staffid = $HTTP_POST_VARS[staff];
$query =  SELECT * FROM Staff WHERE StaffId = '$staffid';
  $result = mysql_query($query) or die( mysql_error () );
  $row = mysql_fetch_array($result);
session_register('valid_user');
  $_SESSION[valid_user] = $staffid;
$_SESSION['name'] = $row[1];
  ?
  table width=536 border=0
   tr
 td width=274Welcome ? echo $row[1] ; ?/td
  td width=252nbsp;/td
   /tr
   tr
tdnbsp;/td
 tdnbsp;/td
   /tr
   tr
 td height=30What is your National Insurance 
Number/td
tdinput name=ni1 type=text size=2 
maxlength=2
   input name=ni2 type=text size=2 maxlength=2
  input name=ni3 type=text size=2 maxlength=2
  input name=ni4 type=text size=2 maxlength=2
   input name=ni5 type=text size=1 
maxlength=1/td
   /tr
   tr
 tdChoose a password/td
 tdinput name=pass1 type=password 
size=20/td
   /tr
   tr
tdEnter it again/td
 tdinput name=pass2 type=password size=20 
maxlength=20/td
   /tr
   tr
   tdinput type=submit name=submit value=submit
   /tr
 /table
  /form
  ?
}





elseif( ( !isset ( $HTTP_COOKIE_VARS[username] ) )  ( isset ( 
$submit ) ) ) {
/* information for registration has been entered, lets check if 
it is valid */
$_SESSION['valid_user'] = $staffid ;
$ni = $HTTP_POST_VARS[ni1] . $HTTP_POST_VARS[ni2] . 
$HTTP_POST_VARS[ni3] . $HTTP_POST_VARS[ni4] . $HTTP_POST_VARS[ni5] ;
$query =  SELECT * FROM Staff WHERE StaffId = '$staffid';
  $result = mysql_query($query) or die( mysql_error () );
  $row = mysql_fetch_array($result);

/* HERE THE SESSION VARIABLE HAS NO VALUE... WHEN I CALL VARDUMP IT IS 
NULL */

  var_dump($_SESSION[valid_user]);
  echo $ni ;
echo $staffid;
if( $ni == $row[4]){
  echo ni check successful;
  if( $pass1 != $pass2 ){
  echo Your Passwords are not the same ;
  }
  else{
  $query = INSERT INTO Staff WHERE StaffId = '$staffid' 
password values ('$pass1');

  if($result=mysql_query($query)){
  echo your password has been set, Continue to the 
site;
  }
}
}
}
include library/include/footer.php ;
?

















_
Stay in touch with MSN Messenger http://messenger.msn.co.uk


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: vaiable from one page to another

2003-02-05 Thread J.Veenhuijsen
Try

p.php:

 ?php
 //Not ?php

 echo($fname);

 ?

Jochem

Bismi Jomon wrote:
hi,

i hav two programs ,

html

 form name=f action=p.php mehtod=post

input type=text name=fname 

input type=submit 

/form

/html

p.php:

?php

echo($fname)

?

i tried these programs and i didnt get the value of the variable in 
another php program. butit is not getting. one our friend told to put like
echo $_post(fname)

but it is also not working. now  getting the error about post array.

so what to do.

help me

regards

bis





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: MySql DB, help, sql error and i don't know why

2003-01-21 Thread J.Veenhuijsen
use `Address` TEXT NOT NULL ,

Jochem

David Rice wrote:


SQL-query :

CREATE TABLE `staff` (

`StaffId` INT( 4 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`Name` VARCHAR( 30 ) NOT NULL ,
`Surname` VARCHAR( 30 ) NOT NULL ,
`Address` TEXT( 225 ) NOT NULL ,
`JobId` SMALLINT( 2 ) NOT NULL ,
`PermissionId` SMALLINT( 2 ) NOT NULL ,
`HomePhone` INT( 11 ) NOT NULL ,
`MobilePhone` INT( 11 ) NOT NULL ,
`TipsPoints` INT( 1 ) NOT NULL ,
`DOB` DATE NOT NULL ,
`Password` VARCHAR( 20 ) NOT NULL ,
`ResterauntId` INT( 1 ) NOT NULL ,
`DateStarted` DATE NOT NULL ,
`StaffStatusId` TINYINT( 1 ) NOT NULL
)

MySQL said:


You have an error in your SQL syntax near '(225) NOT NULL, `JobId` 
SMALLINT(2) NOT NULL, `PermissionId` SMALLINT(2) NOT NUL' at line 1






_
MSN 8: advanced junk mail protection and 2 months FREE*. 
http://join.msn.com/?page=features/junkmail



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: PHP - Ms SQL Database connection.

2003-01-15 Thread J.Veenhuijsen
I guess it is just like connecting to the database
at your local machine .
Check security on wk2 so you are allowed to connect.

Jochem

Rene Groothuis wrote:

Hi All, 

Has somebody made a connection from PHP (4.2.2) running on Linux os to a
Ms SQL database running on a W2K machine. If so how have you done that?
Where can I find some kind of tutorial or howto?

Cheers, Rene.

===
R. Groothuis - Aeqis
Gruttosingel 50
2496 HX Den Haag - The Netherlands
E-mail: [EMAIL PROTECTED]
Tel: +31-15-3618824
Mobile: +31-6-51807877
Fax: +31-15-3618823




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Flat File Upload..HELP!

2003-01-06 Thread J.Veenhuijsen
Try move_uploaded_file()

Jochem

J . Keith Tew wrote:



I know this is not technically a DB question but thought someone may be
able to help with this. I have tried everything I could think of to make
this script work but I keep getting the error message below. I've even
changed the permissions on the files and the folders affected to  allow
full read,write execute priviledges to all users ...but still no luck.
I'm not sure if it is a server (apache on linux)  permission issue or if
it is a typo in the script or a file path issue. ANY HELP would be
greatly appreciated.  I've also included the script below in the event
the mistake is in the script


Thanks in Advance

ERROR MESSAGE

Uploading file...

Warning: Unable to create
'/home/design/public_html/uploads/fbcnews.txt': Permission denied in
/home/design/public_html/uploads/upload1.php on line 35
Problem: Could not move file into directory


UPLOAD SCRIPT

htm
head
   titleUploading.../title
/head
body
h1Uploading file.../h1
?
   // $userfile is where file went on webserver
   // $userfile_name is original file name
   // $userfile_size is size in bytes
   // $userfile_type is mime type e.g. image/gif

/*  echo Variables are:br;
   echo $userfile. .$userfile_name. .$userfile_size.
.$userfile_type.br;
*/

   if ($userfile==none)
   {
 echo Problem: no file uploaded;
 exit;
   }

   if ($userfile_size==0)
   {
 echo Problem: uploaded file is zero length;
 exit;
   }

   if ($userfile_type != text/plain)
   {
 echo Problem: file is not plain text;
 exit;
   }

   $upfile = /home/design/public_html/uploads/.$userfile_name;

   if ( !copy($userfile, $upfile))
   {
 echo Problem: Could not move file into directory;
 exit;
   }


   echo File uploaded successfullybrbr;
   $fp = fopen($upfile, r);
   $contents = fread ($fp, filesize ($upfile));
   fclose ($fp);

   $contents = strip_tags($contents);
   $fp = fopen($upfile, w);
   fwrite($fp, $contents);
   fclose($fp);

   echo Preview of uploaded file contents:brhr;
   echo $contents;
   echo brhr;

?
/body
/html







--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: NewB: Return New Record ID...

2002-12-06 Thread J.Veenhuijsen
Try $last=mysql_insert_id();

Jochem

Doug Coning wrote:

Hi all,

How do I do this:

I need a PHP page that simply creates a blank record so that I have the
record's ID (which is automatically generated).  That same page then needs
to return the record ID back so that I know what the ID is.  I will later
allow that record's information to be populated based on the ID it first
returned.

How would I do this?

Thank you, thank you!

Doug Coning






--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] How to setup LDAP on win2000/IIS5?

2002-11-28 Thread J.Veenhuijsen
What do I need to setup an LDAP server on win2999/IIS5/PHP

I tried QcsLDap but this didn't work.

Thanks

Jochem


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: PHP-dbase conversion

2002-11-28 Thread J.Veenhuijsen
The dbase file must be in the webserver path.

Sean wrote:

Hi all,

I have to convert an old dbase5.0 database server to mysql database which is
located in the web server. The problem is when i use dbase_open function to
read data from the database server it will give this error

Warning: unable to open database ..

Can dbase_open function opens a dbase file on the network?
the path i use is \\server\*.dbf

Please Help
Sean





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php