Re: [PHP] Help needed with php.ini

2011-06-06 Thread Joe Francis
I remember that there's 2 php.ini in Fedora, one is for SAPI like apache or
other CGIServer, and another is for CLI.

Can you confirm that you edited  a right config file?

On Mon, Jun 6, 2011 at 4:55 AM, Camilo Sperberg unrea...@gmail.com wrote:

 On 05-06-2011, at 10:31, Adam Tong adam.to...@gmail.com wrote:

  Hi,
 
  I can't set correctly the error display and reporting properties. I
  don't know what i'm doing wrong.
 
  Here is the section that i modified in php.ini:
  -
  display_errors = On
  ;   Default Value: On
  ;   Development Value: On
  ;   Production Value: Off
 
  display_startup_errors = On
  ;   Default Value: Off
  ;   Development Value: On
  ;   Production Value: Off
 
  error_reporting = E_ALL | E_STRICT
  ;   Default Value: E_ALL  ~E_NOTICE
  ;   Development Value: E_ALL | E_STRICT
  ;   Production Value: E_ALL  ~E_DEPRECATED
  
 
  And here is the output of phpinfo():
  -
  display_errorsOffOff
  display_startup_errorsOffOff
  doc_rootno valueno value
  docref_extno valueno value
  docref_rootno valueno value
  enable_dlOffOff
  error_append_stringno valueno value
  error_logno valueno value
  error_prepend_stringno valueno value
  error_reporting22527 22527
  -
 
  I'm using a default installation (using yum) of php on Fedora14. This
  is my development environment, and want to see all the errors on
  standard output.
 
  Thank you
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 Have you modified the example values instead of the ones mid-way php.ini?
 If so, scroll down to check. The latest settings should override the
 previous one.

 Have you restarted apache with service httpd restart or /etc/init.d/httpd
 restart? (or apachectl restart)

 In your php script or htaccess file, do you override those values?

 Sent from my iPhone 5 Beta [Confidential use only]
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Powered By Francis™.
Welcome to my website: http://www.francistm.com
Rewrite to francis...@gmail.com please.


[PHP] Help needed with php.ini

2011-06-05 Thread Adam Tong
Hi,

I can't set correctly the error display and reporting properties. I
don't know what i'm doing wrong.

Here is the section that i modified in php.ini:
-
 display_errors = On
;   Default Value: On
;   Development Value: On
;   Production Value: Off

 display_startup_errors = On
;   Default Value: Off
;   Development Value: On
;   Production Value: Off

 error_reporting = E_ALL | E_STRICT
;   Default Value: E_ALL  ~E_NOTICE
;   Development Value: E_ALL | E_STRICT
;   Production Value: E_ALL  ~E_DEPRECATED


And here is the output of phpinfo():
-
display_errors  Off Off
display_startup_errors  Off Off
doc_rootno valueno value
docref_ext  no valueno value
docref_root no valueno value
enable_dl   Off Off
error_append_string no valueno value
error_log   no valueno value
error_prepend_stringno valueno value
error_reporting 22527   22527
-

I'm using a default installation (using yum) of php on Fedora14. This
is my development environment, and want to see all the errors on
standard output.

Thank you

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



Re: [PHP] Help needed with php.ini

2011-06-05 Thread Richard Quadling
 

 And here is the output of phpinfo():
 -

In the same phpinfo() output, what is the path/location of the php.ini
file you are using?

Loaded Configuration File   D:\PHP\INI\php-cgi-fcgi.ini

for example.


-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

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



Re: [PHP] Help needed with php.ini

2011-06-05 Thread Camilo Sperberg
On 05-06-2011, at 10:31, Adam Tong adam.to...@gmail.com wrote:

 Hi,
 
 I can't set correctly the error display and reporting properties. I
 don't know what i'm doing wrong.
 
 Here is the section that i modified in php.ini:
 -
 display_errors = On
 ;   Default Value: On
 ;   Development Value: On
 ;   Production Value: Off
 
 display_startup_errors = On
 ;   Default Value: Off
 ;   Development Value: On
 ;   Production Value: Off
 
 error_reporting = E_ALL | E_STRICT
 ;   Default Value: E_ALL  ~E_NOTICE
 ;   Development Value: E_ALL | E_STRICT
 ;   Production Value: E_ALL  ~E_DEPRECATED
 
 
 And here is the output of phpinfo():
 -
 display_errorsOffOff
 display_startup_errorsOffOff
 doc_rootno valueno value
 docref_extno valueno value
 docref_rootno valueno value
 enable_dlOffOff
 error_append_stringno valueno value
 error_logno valueno value
 error_prepend_stringno valueno value
 error_reporting2252722527
 -
 
 I'm using a default installation (using yum) of php on Fedora14. This
 is my development environment, and want to see all the errors on
 standard output.
 
 Thank you
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


Have you modified the example values instead of the ones mid-way php.ini? If 
so, scroll down to check. The latest settings should override the previous one.

Have you restarted apache with service httpd restart or /etc/init.d/httpd 
restart? (or apachectl restart)

In your php script or htaccess file, do you override those values?

Sent from my iPhone 5 Beta [Confidential use only]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help needed with mysql import

2011-03-02 Thread Alex
You shouldn't have a default value in an auto increment field. You can set 
AUTO_INCREMENT to 0 and start with 1, but as auto increment is a unique field 
and its automagically incremented, you should not set a default value on it...
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Thijs Lensselink d...@lenss.nl wrote:

-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/02/2011 07:56 AM, Ashim 
Kapoor wrote:  Dear all,   I am trying to make a website with php and I 
found the following code in a  book and I am trying to import it. The 
following are the beginning of the  file i am trying to import with the 
command   mysql -u root -pmypassword certainty  dump   I get the following 
error : ERROR 1067 (42000) at line 9: Invalid default  value for 'id'   but 
when I see line 9 i see the value '0' for id which seems ok to me, I  also 
tried removing the quotes but same error.   Can someone guide me ?   Thank 
you,  Ashim   # MySQL dump 7.1  #  # Host: [host deleted] Database: 
certainty  #_
 # Server version 3.22.32  #  # Table structure for table 'high_scores'  # 
  CREATE TABLE high_scores (  id int(11) DEFAULT '0' NOT NULL 
 auto_increment,  name varchar(30),  answer_count int(11),  credit 
 double(16,4),  PRIMARY KEY (id)  );  It's not really a PHP question. But 
 here goes. Your first field id is an auto_increment field this means the 
 counter goes up by every insert. Normally this will start at 1 not 0. So 
 either change the 0 to a higher number or remove the auto_increment part 
 before you import change the 0 after and alter the table to put back 
 auto_increment -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 
 (GNU/Linux) iQIcBAEBAgAGBQJNbfOvAAoJEMffsHAOnubXC7UP/1k5qA4TDxDnUKrYZLV/rl9s 
 bLRPTQ21riFMIzt0ne14No4+MTwjNtfVAdSnjpCWEZP+Y2MEixaiz8gIcOt9GIOD 
 f9QPJZFEIcVADs3lqeS88eqdgRBNiYy3x2PHyslR3jtuaeFrRvxOLBTgBISq6Ih4 
 Dd5nRCbo6WObQ5e26HhbDeMJDAnOw4iQMjpoxc6UD9syxkJrORYw6XFvEmJA/QNF 
 RDTNIO7P62ROamGor8urmPdfIemFLyqjD5YAQ64O6aWVHp0ehjO4l1xPWCeI84sV
2g8C3yqi06UjYOE8NHrf64VYcQtvLFkJbzGT6mmPwEP0gBdqX6o2YDwnudv7+APN 
F5zoVBv/7wygFaP+P0zgJ+EWVML35VfJFuq5VCH3CUk1hROS4X/JtsNXdVkAbaFA 
BpEhQ4jN0x/34HrI1cWjEUwaUuU6m9XoMIuO+1tQRLFatEW9I5z1c3hrJsPUNImX 
qSxEGLAZyA7tex++4YFn8DZXWz4mdllI7yejRe0nl1vl4Nn1+t2se/vF0TfZAGdB 
HgDeUWTdY/N2KeT4z9gPjGEDlRp8Wqo13Sv1yVhzWDdAJQdWaH8+Kk0GCI0jBrgT 
Pthmjr0e4bKCW19SJtL7/mTRU12qX/kbjMG5JqIh1ixn72qgqcvkTjgvEeQ1Y0DM 
xBBFUUedwoKevRJI05/2 =mdri -END PGP SIGNATURE- -- PHP General Mailing 
List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php 



Re: [PHP] Help needed with mysql import

2011-03-02 Thread Jim Lucas
On 3/2/2011 4:25 AM, Alex wrote:
 You shouldn't have a default value in an auto increment field. You can 
 set AUTO_INCREMENT to 0 and start with 1, but as auto increment is a
 unique field and its automagically incremented, you should not set a
 default value on it...

This is fine and dandy until you want to do a restore of your data.

With a restore, you will probably want to retain your auto-increment IDs since
they are probably used else where in your DB.

Jim

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



Re: [PHP] Help needed with mysql import

2011-03-02 Thread Jim Lucas
On 3/2/2011 9:48 AM, Ashley Sheridan wrote:
 Jim Lucas li...@cmsws.com wrote:
 
 On 3/2/2011 4:25 AM, Alex wrote:
 You shouldn't have a default value in an auto increment field. You
 can 
 set AUTO_INCREMENT to 0 and start with 1, but as auto increment is a
 unique field and its automagically incremented, you should not set a
 default value on it...

 This is fine and dandy until you want to do a restore of your data.

 With a restore, you will probably want to retain your auto-increment
 IDs since
 they are probably used else where in your DB.

 Jim

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 Restoring data wouldn't need default values though, would it. You can just 
 perform a regular insert statement and update the next id value to be used if 
 necessary.
 
 Also, I'm not 100% sure on this one, but I thought that some versions of 
 Mysql had problems with a 0 in an auto_inc field?
 
 
 Thanks
 Ash

Ash,

Sorry, I didn't mean to imply that the AUTO_INCREMENT set to 0 is fine.

Doing an export of the table structure for one of my smaller tables (that is
empty), I see that the AUTO_INCREMENT value is set to 1 by default.


CREATE TABLE IF NOT EXISTS `ajax_products` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(64) NOT NULL default '',
  `version` tinytext NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

It doesn't show a default value, but rather a default starting point for the
AUTO_INCREMENT

OP: Show us an export of your db table structure.

Jim

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



Fwd: [PHP] Help needed with mysql import

2011-03-02 Thread Ashim Kapoor
-- Forwarded message --
From: Ashim Kapoor ashimkap...@gmail.com
Date: Thu, Mar 3, 2011 at 7:22 AM
Subject: Re: [PHP] Help needed with mysql import
To: Jim Lucas li...@cmsws.com



CREATE TABLE IF NOT EXISTS `ajax_products` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(64) NOT NULL default '',
  `version` tinytext NOT NULL,
  PRIMARY KEY  (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

 It doesn't show a default value, but rather a default starting point for
 the
 AUTO_INCREMENT

 OP: Show us an export of your db table structure.

 Dear Jim,
 I read this in a book.  I dont have the table to show you.

Thank you,
Ashim


[PHP] Help needed with mysql import

2011-03-01 Thread Ashim Kapoor
Dear all,

I am trying to make a website with php and I found the following code in a
book and I am trying to import it. The following are the beginning of the
file i am trying to import with the command

mysql -u root -pmypassword certainty  dump

I get the following error : ERROR 1067 (42000) at line 9: Invalid default
value for 'id'

but when I see line 9 i see the value '0' for id which seems ok to me, I
also tried removing the quotes but same error.

Can someone guide me ?

Thank you,
Ashim

# MySQL dump 7.1
#
# Host: [host deleted] Database: certainty
#
# Server version 3.22.32
#
# Table structure for table 'high_scores'
#
CREATE TABLE high_scores (
id int(11) DEFAULT '0' NOT NULL auto_increment,
name varchar(30),
answer_count int(11),
credit double(16,4),
PRIMARY KEY (id)
);


Re: [PHP] Help needed with mysql import

2011-03-01 Thread Thijs Lensselink
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/02/2011 07:56 AM, Ashim Kapoor wrote:
 Dear all,
 
 I am trying to make a website with php and I found the following code in a
 book and I am trying to import it. The following are the beginning of the
 file i am trying to import with the command
 
 mysql -u root -pmypassword certainty  dump
 
 I get the following error : ERROR 1067 (42000) at line 9: Invalid default
 value for 'id'
 
 but when I see line 9 i see the value '0' for id which seems ok to me, I
 also tried removing the quotes but same error.
 
 Can someone guide me ?
 
 Thank you,
 Ashim
 
 # MySQL dump 7.1
 #
 # Host: [host deleted] Database: certainty
 #
 # Server version 3.22.32
 #
 # Table structure for table 'high_scores'
 #
 CREATE TABLE high_scores (
 id int(11) DEFAULT '0' NOT NULL auto_increment,
 name varchar(30),
 answer_count int(11),
 credit double(16,4),
 PRIMARY KEY (id)
 );
 

It's not really a PHP question. But here goes.

Your first field id is an auto_increment field this means the counter
goes up by every insert. Normally this will start at 1 not 0. So either
change the 0 to a higher number or remove the auto_increment part before
you import change the 0 after and alter the table to put back auto_increment
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBAgAGBQJNbfOvAAoJEMffsHAOnubXC7UP/1k5qA4TDxDnUKrYZLV/rl9s
bLRPTQ21riFMIzt0ne14No4+MTwjNtfVAdSnjpCWEZP+Y2MEixaiz8gIcOt9GIOD
f9QPJZFEIcVADs3lqeS88eqdgRBNiYy3x2PHyslR3jtuaeFrRvxOLBTgBISq6Ih4
Dd5nRCbo6WObQ5e26HhbDeMJDAnOw4iQMjpoxc6UD9syxkJrORYw6XFvEmJA/QNF
RDTNIO7P62ROamGor8urmPdfIemFLyqjD5YAQ64O6aWVHp0ehjO4l1xPWCeI84sV
2g8C3yqi06UjYOE8NHrf64VYcQtvLFkJbzGT6mmPwEP0gBdqX6o2YDwnudv7+APN
F5zoVBv/7wygFaP+P0zgJ+EWVML35VfJFuq5VCH3CUk1hROS4X/JtsNXdVkAbaFA
BpEhQ4jN0x/34HrI1cWjEUwaUuU6m9XoMIuO+1tQRLFatEW9I5z1c3hrJsPUNImX
qSxEGLAZyA7tex++4YFn8DZXWz4mdllI7yejRe0nl1vl4Nn1+t2se/vF0TfZAGdB
HgDeUWTdY/N2KeT4z9gPjGEDlRp8Wqo13Sv1yVhzWDdAJQdWaH8+Kk0GCI0jBrgT
Pthmjr0e4bKCW19SJtL7/mTRU12qX/kbjMG5JqIh1ixn72qgqcvkTjgvEeQ1Y0DM
xBBFUUedwoKevRJI05/2
=mdri
-END PGP SIGNATURE-

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



[PHP] Help needed with calculation

2009-11-15 Thread Chris Payne
Hi everyone,

I'm not sure of the correct formula for this, if I have a file - just
for example, that is 10245458756 bytes long and the download speed is
60KB a second, what formula would I use to calculate how many
seconds/minutes/hours it would take to download the file?

Maths really isn't my strong point and formulas go over my head
otherwise I wouldn't ask :-(

Thanks everyone

Chris

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



Re: [PHP] Help needed with calculation

2009-11-15 Thread Adam Shannon
If the download speed is constant (linear) then you can just use.

(10245458756 / 6t)/1000 = kb/second
or
(10245458756 / 6t)/6 = kb/minute

The general form would be.
(size_of_file / download_speed * time) / convert_to_units

Where t (or time) is the amount of seconds that the download has been active.


On Sun, Nov 15, 2009 at 15:39, Chris Payne chris_pa...@danmangames.com wrote:
 Hi everyone,

 I'm not sure of the correct formula for this, if I have a file - just
 for example, that is 10245458756 bytes long and the download speed is
 60KB a second, what formula would I use to calculate how many
 seconds/minutes/hours it would take to download the file?

 Maths really isn't my strong point and formulas go over my head
 otherwise I wouldn't ask :-(

 Thanks everyone

 Chris

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





-- 
- Adam Shannon ( http://ashannon.us )

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



[PHP] PHP Help Needed

2008-12-27 Thread Ayemowa Toyin
Hi,

I am new to PHP and require your help regarding a PHP Script.  Below is what I 
am tryin to achieve

1.  I have created a FILE UPLOAD page that lets users Upload a FIle to the 
site.  This and other details regarding the file stored in a MySQL Database.

2.  I need to create a FILE DOWNLOAD page that will read details from the MYSQL 
database for users to dwnload already uploaded files.  

Your help will be most appricated.

Thanks

Toyin AYemowa
UK


  

Re: [PHP] PHP Help Needed

2008-12-27 Thread Ashley Sheridan
On Sat, 2008-12-27 at 07:47 -0800, Ayemowa Toyin wrote:
 Hi,
 
 I am new to PHP and require your help regarding a PHP Script.  Below is what 
 I am tryin to achieve
 
 1.  I have created a FILE UPLOAD page that lets users Upload a FIle to the 
 site.  This and other details regarding the file stored in a MySQL Database.
 
 2.  I need to create a FILE DOWNLOAD page that will read details from the 
 MYSQL database for users to dwnload already uploaded files.  
 
 Your help will be most appricated.
 
 Thanks
 
 Toyin AYemowa
 UK
 
 
   
RTFM

http://www.php.net



Ash
www.ashleysheridan.co.uk


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



Re: [PHP] PHP Help Needed

2008-12-27 Thread Dotan Cohen
2008/12/27 Ashley Sheridan a...@ashleysheridan.co.uk:
 RTFM

 http://www.php.net


Or STFW
http://justfuckinggoogleit.com/search?q=php%20mysql%20file%20download%20script

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: [PHP] PHP Help Needed

2008-12-27 Thread Daniel Brown
On Sat, Dec 27, 2008 at 10:47, Ayemowa Toyin ayemowa_to...@yahoo.co.uk wrote:
 Hi,

 I am new to PHP and require your help regarding a PHP Script.  Below is what 
 I am tryin to achieve

You require an RTFM and STFW session.
* http://php.net/
* http://google.com/

 1.  I have created a FILE UPLOAD page that lets users Upload a FIle to the 
 site.  This and other details regarding the file stored in a MySQL Database.

 2.  I need to create a FILE DOWNLOAD page that will read details from the 
 MYSQL database for users to dwnload already uploaded files.

If you've already created the UPLOAD page, then the more difficult
of the two tasks is done.  Chances are, you (or whomever wrote the
code for you) should know how to do #2 if you (or another) already did
#1, but if not:

http://www.google.com/search?q=php+mysql+file+download+script
http://www.joeclipart.com/blog/images/2007/06/20070628crack.jpg
http://www.phpbuilder.com/tips/item.php?id=5

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

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



Re: [PHP] PHP Help Needed

2008-12-27 Thread Dotan Cohen
2008/12/27 Daniel Brown danbr...@php.net:
If you've already created the UPLOAD page, then the more difficult
 of the two tasks is done.  Chances are, you (or whomever wrote the
 code for you) should know how to do #2 if you (or another) already did
 #1, but if not:

http://www.google.com/search?q=php+mysql+file+download+script
http://www.joeclipart.com/blog/images/2007/06/20070628crack.jpg
http://www.phpbuilder.com/tips/item.php?id=5


That was subtle :)

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: [PHP] PHP Help Needed

2008-12-27 Thread John Corry
lol, Ashley!

Ayemowa,
http://www.google.com/search?q=becoming+a+programmerie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a

You need to take your 2 steps below and break them down into smaller
steps...and smaller steps...and still smaller steps.

What PHP files will your application require?
Will there be forms?
What will the user interface look like?

Don't start with a 'PHP script'.

Start by defining in excruciating detail what your application is
going to do, how it will do it and then describe every little part
(variables, functions, models, views, controllers...whatever) that
will make it work.

Once you have that description, you can start to think about the code
by writing it's documentation.

Then, once you have the documentation, you can write code based on the
documentation...revising the docs as necessary.

It's a lengthy, complicated process that is going to demand a little
more of you than just reducing your app to 2 steps and asking a
mailing list how to do it.

Good luck, let us know how it goes and how we can help you take (much
smaller) steps.

John Corry

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



[PHP] help needed building php_dblib for PHP 5.2.5 on windows

2008-04-02 Thread Jason

Hi all,

I have previously posted this on the windows specific list, however I 
believe this list reaches a wider audience so i'll try again.


I am trying to recompile php 5.2.5 on win32, specifically trying to 
rebuild the freetds extension with the latest RC code from FreeTDS.org.


I am getting a persistent linking error however and am at a loss as 
to what is causing it. The build environment is VC6 SP6 on WinXP x86 SP2.


The exact error is:

main\internal_functions.c(69) : error C2065: 'phpext_dblib_ptr' : 
undeclared identifier

main\internal_functions.c(69) : error C2099: initializer is not a constant
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'


Help!, Anyone?

TIA
Jason


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



[PHP] Help needed with Curl

2007-07-24 Thread Bosky, Dave

I downloaded a copy of PHP Version 5.2.3 and installed it on Windows
2003. 
Everything seems to work fine except for Curl. 
--
PHP Version 5.2.3
cURL support  enabled  
cURL Information  libcurl/7.16.0 OpenSSL/0.9.8e zlib/1.2.3  
--
It keeps returning this error message.
Reason 'CURL error: error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol'


The code works one machine that has the following setup 
--
PHP Version 5.1.0
cURL support  enabled  
cURL Information  libcurl/7.14.0 OpenSSL/0.9.8b zlib/1.2.3  
--

Do I need to download any other packages for Curl to work? What the heck
am I missing?

Thanks,
Dave

**
HTC Disclaimer:  The information contained in this message may be privileged 
and confidential and protected from disclosure. If the reader of this message 
is not the intended recipient, or an employee or agent responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.  
Thank you.
**

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



RE: [PHP] Help needed with Curl

2007-07-24 Thread Bosky, Dave
Yes. The script is the same on both machines.
I can pull up a web browser and connect to the ssl url that I'm trying
to connect using php/curl. 
The only DLLs I need to add are libeay.dll, ssleay32.dll, right?

I'm running Windows 2003 Server with IIS 6.0



-Original Message-
From: Daniel Brown [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 24, 2007 9:01 AM
To: Bosky, Dave
Cc: php-general@lists.php.net
Subject: Re: [PHP] Help needed with Curl

On 7/24/07, Bosky, Dave [EMAIL PROTECTED] wrote:

 I downloaded a copy of PHP Version 5.2.3 and installed it on Windows 
 2003.
 Everything seems to work fine except for Curl.
 --
 PHP Version 5.2.3
 cURL support  enabled
 cURL Information  libcurl/7.16.0 OpenSSL/0.9.8e zlib/1.2.3
 --
 It keeps returning this error message.
 Reason 'CURL error: error:140770FC:SSL 
 routines:SSL23_GET_SERVER_HELLO:unknown protocol'


 The code works one machine that has the following setup
 --
 PHP Version 5.1.0
 cURL support  enabled
 cURL Information  libcurl/7.14.0 OpenSSL/0.9.8b zlib/1.2.3
 --

 Do I need to download any other packages for Curl to work? What the 
 heck am I missing?

 Thanks,
 Dave

 **
 HTC Disclaimer:  The information contained in this message may be
privileged and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of
this communication is strictly prohibited.  If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer.  Thank you.
 **

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



That actually looks like an OpenSSL problem (despite the fact that
PHP 5.2.3 does have a lot of poorly-made changes, in my opinion),
suggesting that it's attempting to provide (or retrieve) something via
an SSL/HTTPS connection where there is no encryption.

Is the script you're attempting to run the exact same on both
machines?  Can Machine A connect to Machine B and vice-versa using
cURL/SSL in combination with your script?  What do the Apache logs say?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

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



Re: [PHP] Help needed with Curl

2007-07-24 Thread Daniel Brown

On 7/24/07, Bosky, Dave [EMAIL PROTECTED] wrote:


I downloaded a copy of PHP Version 5.2.3 and installed it on Windows
2003.
Everything seems to work fine except for Curl.
--
PHP Version 5.2.3
cURL support  enabled
cURL Information  libcurl/7.16.0 OpenSSL/0.9.8e zlib/1.2.3
--
It keeps returning this error message.
Reason 'CURL error: error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol'


The code works one machine that has the following setup
--
PHP Version 5.1.0
cURL support  enabled
cURL Information  libcurl/7.14.0 OpenSSL/0.9.8b zlib/1.2.3
--

Do I need to download any other packages for Curl to work? What the heck
am I missing?

Thanks,
Dave

**
HTC Disclaimer:  The information contained in this message may be privileged 
and confidential and protected from disclosure. If the reader of this message 
is not the intended recipient, or an employee or agent responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.  
Thank you.
**

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




   That actually looks like an OpenSSL problem (despite the fact that
PHP 5.2.3 does have a lot of poorly-made changes, in my opinion),
suggesting that it's attempting to provide (or retrieve) something via
an SSL/HTTPS connection where there is no encryption.

   Is the script you're attempting to run the exact same on both
machines?  Can Machine A connect to Machine B and vice-versa using
cURL/SSL in combination with your script?  What do the Apache logs
say?

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

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



Re: [PHP] Help needed with Curl

2007-07-24 Thread Daniel Brown

On 7/24/07, Bosky, Dave [EMAIL PROTECTED] wrote:

Yes. The script is the same on both machines.
I can pull up a web browser and connect to the ssl url that I'm trying
to connect using php/curl.
The only DLLs I need to add are libeay.dll, ssleay32.dll, right?

I'm running Windows 2003 Server with IIS 6.0


   I believe so.

   In order to enable cURL on a Windows box, you have to copy
libeay32.dll and ssleay32.dll from the DLL folder of the PHP/ binary
package to the SYSTEM folder. (to be safe, you may want to do both
C:\WINDOWS\SYSTEM\ and C:\WINDOWS\SYSTEM32\, but I think Windows
allows you to `copy *.dll C:\%SYSTEM%  - I'm a *nix guy, but I think I
remember doing that on Windows a while back).

   Then edit php.ini to remove the semicolon from the front of this line:
   extension=php_curl.dll

   That *should* do it, but I'm sure you've already done all of that,
so beyond that point, I'm not really sure what could be causing the
protocol error.  In either case, I think it's definitely an SSL error
as opposed to a cURL/PHP one.

   Sorry I'm not being much help on this one

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

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



Re[2]: [PHP] Help needed with Curl

2007-07-24 Thread Richard Davey
Hi Daniel,

Tuesday, July 24, 2007, 2:34:06 PM, you wrote:

 In order to enable cURL on a Windows box, you have to copy
 libeay32.dll and ssleay32.dll from the DLL folder of the PHP/ binary
 package to the SYSTEM folder. (to be safe, you may want to do both
 C:\WINDOWS\SYSTEM\ and C:\WINDOWS\SYSTEM32\, but I think Windows
 allows you to `copy *.dll C:\%SYSTEM% - I'm a *nix guy, but I think
 I remember doing that on Windows a while back).

*Never* put PHP DLLs into the Windows System folder.
It's neither required, nor sensible.

Keep them where they belong - in your PHP folder.

 Then edit php.ini to remove the semicolon from the front of this
 line: extension=php_curl.dll

He must have already done this to see the output in phpinfo.

Dave - As well as the OpenSSL DLL do you also have a local certificate
created? (curl-ca-bundle.crt by default)

http://curl.netmirror.org/docs/sslcerts.html

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

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



Re: Re[2]: [PHP] Help needed with Curl

2007-07-24 Thread Daniel Brown

On 7/24/07, Richard Davey [EMAIL PROTECTED] wrote:

*Never* put PHP DLLs into the Windows System folder.
It's neither required, nor sensible.

Keep them where they belong - in your PHP folder.



   Heh which is why I prefer to stick with what I know which
is not so much with Windows servers, to be honest.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

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



Re[4]: [PHP] Help needed with Curl

2007-07-24 Thread Richard Davey
Hi Daniel,

Tuesday, July 24, 2007, 3:57:11 PM, you wrote:

 On 7/24/07, Richard Davey [EMAIL PROTECTED] wrote:
 *Never* put PHP DLLs into the Windows System folder.
 It's neither required, nor sensible.

 Keep them where they belong - in your PHP folder.


 Heh which is why I prefer to stick with what I know which
 is not so much with Windows servers, to be honest.

It's not just you - there are tutorials and mailing list posts all
over the net that impart the same advice. So I'm not surprised that
you recommended it, you probably picked it up as a byproduct of
someone else's flawed recommendation long ago :)

As a Linux person - think of the absolute *last* possible root only
place that you could ever stick a PHP library into, with the most risk
to security possible. That is the equivalent of C:\Windows\System.

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

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



Re: Re[4]: [PHP] Help needed with Curl

2007-07-24 Thread Daniel Brown

On 7/24/07, Richard Davey [EMAIL PROTECTED] wrote:

Hi Daniel,

Tuesday, July 24, 2007, 3:57:11 PM, you wrote:

 On 7/24/07, Richard Davey [EMAIL PROTECTED] wrote:
 *Never* put PHP DLLs into the Windows System folder.
 It's neither required, nor sensible.

 Keep them where they belong - in your PHP folder.


 Heh which is why I prefer to stick with what I know which
 is not so much with Windows servers, to be honest.

It's not just you - there are tutorials and mailing list posts all
over the net that impart the same advice. So I'm not surprised that
you recommended it, you probably picked it up as a byproduct of
someone else's flawed recommendation long ago :)

As a Linux person - think of the absolute *last* possible root only
place that you could ever stick a PHP library into, with the most risk
to security possible. That is the equivalent of C:\Windows\System.


   /me nods.

   Makes perfect sense to me when you put it that way.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

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



RE: Re[2]: [PHP] Help needed with Curl

2007-07-24 Thread Bosky, Dave
No I don't have a local certificate created.
I'm only need to do a post using xml-rpc and I have SSLVerifyPeer turned
off. This turns off client certificate authentication 
$xmlrpc_client-setSSLVerifyPeer(0); 


-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 24, 2007 10:56 AM
To: Daniel Brown
Cc: Bosky, Dave; php-general@lists.php.net
Subject: Re[2]: [PHP] Help needed with Curl

Hi Daniel,

Tuesday, July 24, 2007, 2:34:06 PM, you wrote:

 In order to enable cURL on a Windows box, you have to copy 
 libeay32.dll and ssleay32.dll from the DLL folder of the PHP/ binary 
 package to the SYSTEM folder. (to be safe, you may want to do both 
 C:\WINDOWS\SYSTEM\ and C:\WINDOWS\SYSTEM32\, but I think Windows 
 allows you to `copy *.dll C:\%SYSTEM% - I'm a *nix guy, but I think I 
 remember doing that on Windows a while back).

*Never* put PHP DLLs into the Windows System folder.
It's neither required, nor sensible.

Keep them where they belong - in your PHP folder.

 Then edit php.ini to remove the semicolon from the front of this
 line: extension=php_curl.dll

He must have already done this to see the output in phpinfo.

Dave - As well as the OpenSSL DLL do you also have a local certificate
created? (curl-ca-bundle.crt by default)

http://curl.netmirror.org/docs/sslcerts.html

Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window


**
HTC Disclaimer:  The information contained in this message may be privileged 
and confidential and protected from disclosure. If the reader of this message 
is not the intended recipient, or an employee or agent responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.  
Thank you.
**

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



Re[4]: [PHP] Help needed with Curl

2007-07-24 Thread Richard Davey
Hi Dave,

Tuesday, July 24, 2007, 4:45:13 PM, you wrote:

 No I don't have a local certificate created.
 I'm only need to do a post using xml-rpc and I have SSLVerifyPeer turned
 off. This turns off client certificate authentication 
$xmlrpc_client-setSSLVerifyPeer(0); 

What does your PHP error log show-up? (if anything)

I assume that the site you are sending the RPC request to requires it
to be delivered over SSL? (is it the very same site that worked in the
previous build of PHP, but not this one?)

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

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



Re: [PHP] help needed to write an installation script for my php application

2007-04-24 Thread Tijnema !

On 4/23/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hi There,

Could you please help me to write an installation script to install a
php based application in Windows.

1. I have WAMP5.0 running my my IBM T43 laptop.
2. I have created a php application.
3. I would like to know how to create an installation Wizard for my
application. What it should accomplish is that:
   Once the CD containing my application is loaded to CD drive, it
should automatically ask me the standard windows installation questions
to install
   my application in the path specified by me.

Your help will be highly appreciated.

Thanks,
G. Guruswamy (VV, QCG)
+91-93412-74717



Have a look at this page:
http://www.softpedia.com/get/Authoring-tools/Setup-creators/

It contains (nearly) all installer software, softpedia has a rating
system, so search for one with a high rating, and if you don't like
it, pick the second :)

Tijnema

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



Re: [PHP] help needed to write an installation script for my php application

2007-04-24 Thread Richard Lynch
On Mon, April 23, 2007 7:36 am, [EMAIL PROTECTED] wrote:
 Could you please help me to write an installation script to install a
 php based application in Windows.

 1. I have WAMP5.0 running my my IBM T43 laptop.
 2. I have created a php application.
 3. I would like to know how to create an installation Wizard for my
 application. What it should accomplish is that:
 Once the CD containing my application is loaded to CD drive, it
 should automatically ask me the standard windows installation
 questions
 to install
 my application in the path specified by me.

 Your help will be highly appreciated.

Get WISE or that other installer program everybody uses.

There's no PHP involved in writing a Windows installer application.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



[PHP] help needed to write an installation script for my php application

2007-04-23 Thread guruswamy.gurusamy

Hi There, 
 
Could you please help me to write an installation script to install a
php based application in Windows. 
 
1. I have WAMP5.0 running my my IBM T43 laptop.
2. I have created a php application. 
3. I would like to know how to create an installation Wizard for my
application. What it should accomplish is that:
Once the CD containing my application is loaded to CD drive, it
should automatically ask me the standard windows installation questions
to install
my application in the path specified by me. 
 
Your help will be highly appreciated.
 
Thanks,
G. Guruswamy (VV, QCG)
+91-93412-74717
 



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com

Re: [PHP] help needed to write an installation script for my php application

2007-04-23 Thread Ed Oceo
On Mon, April 23, 2007 5:36 am, [EMAIL PROTECTED] wrote:

 Hi There,

 Could you please help me to write an installation script to install a
 php based application in Windows.


NSIS, nullsoft installer is a nice installer to use for Windows applications.

http://nsis.sourceforge.net/Main_Page

-- 
Edoceo, Inc.
http://www.edoceo.com/


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



[PHP] help needed with pager

2006-05-25 Thread Ross

http://scottishsocialnetworks.org/editor.php

http://scottishsocialnetworks.org/editor.phps

the pager in this page works except try and choose aberdeen from the area 
dropdown. You should get 18 answers which is fine except when page 2 is 
pressed at the bottom the query seems to be scrubbed and it returns the full 
database.

any ideas how I can 'save' the query and not create a new blank query every 
time the page is slef submitted? 

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



Re: [PHP] help needed with pager

2006-05-25 Thread Rabin Vincent

On 5/25/06, Ross [EMAIL PROTECTED] wrote:


http://scottishsocialnetworks.org/editor.php

http://scottishsocialnetworks.org/editor.phps

the pager in this page works except try and choose aberdeen from the area
dropdown. You should get 18 answers which is fine except when page 2 is
pressed at the bottom the query seems to be scrubbed and it returns the full
database.

any ideas how I can 'save' the query and not create a new blank query every
time the page is slef submitted?


Get your variables, like 'area', from $_GET if they're not in $_POST.
And then you can change your page navigation links to something
like:

echo $pager-get_prev('a href={LINK_HREF}area=' . $area . '
title=Previouslaquo;/a');

Rabin

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



[PHP] Help needed / failed to open stream: Permission denied

2005-10-19 Thread Ndagi Mutiri
Hello,

Trying to read a binary file in MySQL database, i have the following error :

Warning: fopen(./) [function.fopen]: failed to open stream: Permission denied 
in d:\...\download.php on line 57

This is line 57 $file_handle = fopen(./ . $file_name, r);

and my function 

function db_download_file($dbname, $file, $idreunion) {
//Sélectionne la base de données
mysql_select_db($dbname);

//Requête SQL
$select = SELECT  . $file .  FROM inter_vertaaldienst WHERE 
id_reunion = ' . $idreunion . '; 

//Exécution de la requête
$file_records = @mysql_query($select);

//En cas d'erreur, on affiche un message
if (!$file_records){echo('pErreur :' . mysql_error().'p');}
//Autrement, on affiche le fichier
else{
if($file_record = mysql_fetch_array($file_records)){
$file_handle = fopen(./ . $file_name, r);
$file_bytes = $file_record[0];
fwrite($file_handle, $file_bytes, strlen($file_bytes)); 
$return_value = ./ . $file_name;  
}
}
return($return_value);
}

Thank for your help.
Ndagi

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



RE: [PHP] Help needed / failed to open stream: Permission denied

2005-10-19 Thread Jim Moseby

 
 Hello,
 
 Trying to read a binary file in MySQL database, i have the 
 following error :
 
 Warning: fopen(./) [function.fopen]: failed to open stream: 
 Permission denied in d:\...\download.php on line 57
 
 This is line 57 $file_handle = fopen(./ . $file_name, r);
 
 and my function 
 
 function db_download_file($dbname, $file, $idreunion) {
 //Sélectionne la base de données
   mysql_select_db($dbname);
 
   //Requête SQL
   $select = SELECT  . $file .  FROM 
 inter_vertaaldienst WHERE id_reunion = ' . $idreunion . '; 
  
 
   //Exécution de la requête
   $file_records = @mysql_query($select);
 
   //En cas d'erreur, on affiche un message
   if (!$file_records){echo('pErreur :' . mysql_error().'p');}
   //Autrement, on affiche le fichier
   else{
   if($file_record = mysql_fetch_array($file_records)){
   $file_handle = fopen(./ . $file_name, r);
   $file_bytes = $file_record[0];
   fwrite($file_handle, $file_bytes, 
 strlen($file_bytes)); 
   $return_value = ./ . $file_name;  
   }
   }
   return($return_value);
 }

Place an:

echo ./ . $file_name;

...just above line 57 and make sure that the filename is what you expect it
to be.  If it is, make sure the user the webserver is running as has
permissions sufficient to open the file for reading.  You could, as a test,
temporarily chmod 777 the file to rule out permission issues.

JM

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



Re: [PHP] Help needed / failed to open stream: Permission denied

2005-10-19 Thread Jochem Maas

Ndagi Mutiri wrote:

Hello,


I can't be of any help here but couldn't help noticing
that th OP (Ndagi) is dealing with dutch language DB entities and
comments/output in french and code (vars etc) in english 

bet that can be a PITA :-)



Trying to read a binary file in MySQL database, i have the following error :

Warning: fopen(./) [function.fopen]: failed to open stream: Permission denied 
in d:\...\download.php on line 57

This is line 57 $file_handle = fopen(./ . $file_name, r);

and my function 


function db_download_file($dbname, $file, $idreunion) {
//Sélectionne la base de données
mysql_select_db($dbname);

//Requête SQL
	$select = SELECT  . $file .  FROM inter_vertaaldienst WHERE id_reunion = ' . $idreunion . ';			   


//Exécution de la requête
$file_records = @mysql_query($select);

//En cas d'erreur, on affiche un message
if (!$file_records){echo('pErreur :' . mysql_error().'p');}
//Autrement, on affiche le fichier
else{
if($file_record = mysql_fetch_array($file_records)){
$file_handle = fopen(./ . $file_name, r);
$file_bytes = $file_record[0];
			fwrite($file_handle, $file_bytes, strlen($file_bytes)); 
			$return_value = ./ . $file_name;  
		}

}
return($return_value);
}

Thank for your help.
Ndagi



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



[PHP] Help Needed

2005-08-26 Thread David Skyers
I have an annoying problem, I'm trying to write a simple PHP page that
says if a record is found in an Oracle database display 'Data Found'
else display 'No Data Found' but it does not seem to be working. 

?php

require(../passit.php);

$stmt = OCIParse(select UPI, ORG from WEB_DS where REC_VALUE =
'uczmdsk1');

OCIExecute($stmt);

echo $stmt;

$nrows = OCIFetchStatement($stmt);

if ($nrows  0) {

echo Data found;

} else {

echo No data found; 

} 

?

David

--
David Skyers
Support Analyst
Management Systems, UCL
[EMAIL PROTECTED]
020 7679 1849 (internal 41849) 

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



Re: [PHP] Help Needed

2005-08-26 Thread Raz
David

but it does not seem to be working.

Might be helpful for folks if you describe the nature of the fault
i.e. what you get back when you run this - at this stage there are a
multitude of possibilities...

raz

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



RE: [PHP] Help Needed

2005-08-26 Thread David Skyers
Hi Raz

Good Point. It displays 'No data found' when it should display 'Data
found'

Thanks
David

-Original Message-
From: Raz [mailto:[EMAIL PROTECTED] 
Sent: 26 August 2005 12:06
To: David Skyers
Cc: php-general@lists.php.net
Subject: Re: [PHP] Help Needed


David

but it does not seem to be working.

Might be helpful for folks if you describe the nature of the fault i.e.
what you get back when you run this - at this stage there are a
multitude of possibilities...

raz

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



Re: [PHP] Help Needed

2005-08-26 Thread Raz
Leading back in the code, that would suggest that $nrows is not
greater than zero - could be a problem with $nrows then, and anything
associated with that, i.e. $stmt, whether there is content in the db
where REC_VALUE = 'uczmdsk1' etc. etc.

Work back down the chain and see if you can find anomalies...

raz

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



Re: [PHP] Help Needed

2005-08-26 Thread Angelo Zanetti
does the actual SQL statement bring back any info if you do it through
the oracle interface, perhaps the problem isnt php but the SQL statement.
HTH

Angelo


Raz wrote:

Leading back in the code, that would suggest that $nrows is not
greater than zero - could be a problem with $nrows then, and anything
associated with that, i.e. $stmt, whether there is content in the db
where REC_VALUE = 'uczmdsk1' etc. etc.

Work back down the chain and see if you can find anomalies...

raz

  


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



RE: [PHP] Help Needed

2005-08-26 Thread David Skyers
The following statement brings back nothing

select UPI, ORG from REDEP.UPI_WEB_DS where REC_VALUE = 'test'

The following statement brings back one row
select UPI, ORG from REDEP.UPI_WEB_DS where REC_VALUE = 'uczmdsk1'



-Original Message-
From: Angelo Zanetti [mailto:[EMAIL PROTECTED] 
Sent: 26 August 2005 13:14
To: Raz
Cc: David Skyers; php-general@lists.php.net
Subject: Re: [PHP] Help Needed


does the actual SQL statement bring back any info if you do it through
the oracle interface, perhaps the problem isnt php but the SQL
statement. HTH

Angelo


Raz wrote:

Leading back in the code, that would suggest that $nrows is not greater

than zero - could be a problem with $nrows then, and anything 
associated with that, i.e. $stmt, whether there is content in the db 
where REC_VALUE = 'uczmdsk1' etc. etc.

Work back down the chain and see if you can find anomalies...

raz

  


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



Re: [PHP] Help Needed

2005-08-26 Thread Raz
David,

 If I change the code to ($nrows = 1) then it displays 'Data found',
 however if I have a REC_VALUE = 'does not exist' it still displays 'Data
 found'
 
That would suggest that something is being returned - do you have
command line access or some other way to look at what is being
returned by the sql statement?

Peel back the layers...

raz

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



[PHP] Help needed in changing row color

2005-07-26 Thread suma parakala

Hi
I am retrieving data from postgresql and displaying it in form of table in 
different rows.
my problem is when check box is clicked i need to change the color of the 
row .agai when the check box is unclicked it should hold the old color.

Can any one please help me
Thanks  regards
Suma

_
Formula One fan? http://server1.msn.co.in/sp05/tataracing/ Get news, 
wallpapers and photos of Narain Karthikeyan.


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



Re: [PHP] Help needed in changing row color

2005-07-26 Thread Dotan Cohen
On 7/26/05, suma parakala [EMAIL PROTECTED] wrote:
 Hi
 I am retrieving data from postgresql and displaying it in form of table in
 different rows.
 my problem is when check box is clicked i need to change the color of the
 row .agai when the check box is unclicked it should hold the old color.
 Can any one please help me
 Thanks  regards
 Suma
 

That is a javascript challenge, not php.

http://www.google.fi/search?hl=fiq=javascriptbtnG=Google-hakumeta=

Dotan
http://lyricslist.com/lyrics/artist_albums/260/houston_whitney.php
Houston, Whitney Song Lyrics

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



Re: [PHP] Help needed in changing row color

2005-07-26 Thread Burhan Khalid

suma parakala wrote:

Hi
I am retrieving data from postgresql and displaying it in form of table 
in different rows.
my problem is when check box is clicked i need to change the color of 
the row .agai when the check box is unclicked it should hold the old color.

Can any one please help me


This is a javascript question, not a PHP one.  You will need to google 
for a javascript snippet that changes the background of table cells.


Google 'javascript table dom'

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



RE: [PHP] help needed on imagettftext()

2005-01-28 Thread Harish Rao K
Hi Marek Kilimajer,

Thank You Marek it worked for me also.

-Harish Rao K
-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 27, 2005 9:19 PM
To: Harish Rao K
Cc: php-general@lists.php.net
Subject: Re: [PHP] help needed on imagettftext()


Harish Rao K wrote:
 Hello,

 While working with some CAPTCHA stuff I get the following
error:
 Fatal error: Call to undefined function imagettftext().
 I have compiled with GD support and all the supporting
libraries
 (Freetype, TTF, jpeg, X11R6 etc).

 What am I missing?

 Below is the configure command that I have used.

 './configure' '--with-gd'
 '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-pgsql'
 '--with-jpeg-dir=/usr/local/jpeg-6b'
 '--with-zlib-dir=/usr/local/zlib-1.2.1'
'--enable-gd-native-ttf'
 '--with-png' '--with-ttf'
 '--with-freetype-dir=/usr/local/freetype-2.1.9'
 '--with-xpm-dir=/usr/X11R6'

 Thanks  Regards,
 Harish Rao K,

make clean
make
make install

this helped me. I guess there are wrong dependencies in the
Makefiles

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


Nous Infosystems
This e-mail transmission may contain confidential or legally privileged
information that is intended only for the individual(s) or entity(ies) named
in the e-mail address. If you are not the intended recipient, please reply to
the [EMAIL PROTECTED], so that arrangements can be made for proper
delivery, and then please delete all copies and attachments.Any disclosure,
copying, distribution, or reliance upon the contents of this e-mail, by any
other than the intended recipients, is strictly prohibited.

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



[PHP] help needed on imagettftext()

2005-01-27 Thread Harish Rao K
Hello,

While working with some CAPTCHA stuff I get the following error:
Fatal error: Call to undefined function imagettftext().
I have compiled with GD support and all the supporting libraries
(Freetype, TTF, jpeg, X11R6 etc).

What am I missing?

Below is the configure command that I have used.

'./configure' '--with-gd'
'--with-apxs2=/usr/local/apache2/bin/apxs' '--with-pgsql'
'--with-jpeg-dir=/usr/local/jpeg-6b'
'--with-zlib-dir=/usr/local/zlib-1.2.1' '--enable-gd-native-ttf'
'--with-png' '--with-ttf'
'--with-freetype-dir=/usr/local/freetype-2.1.9'
'--with-xpm-dir=/usr/X11R6'

Thanks  Regards,
Harish Rao K,


Nous Infosystems
This e-mail transmission may contain confidential or legally privileged
information that is intended only for the individual(s) or entity(ies) named
in the e-mail address. If you are not the intended recipient, please reply to
the [EMAIL PROTECTED], so that arrangements can be made for proper
delivery, and then please delete all copies and attachments.Any disclosure,
copying, distribution, or reliance upon the contents of this e-mail, by any
other than the intended recipients, is strictly prohibited.

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



Re: [PHP] help needed on imagettftext()

2005-01-27 Thread Marek Kilimajer
Harish Rao K wrote:
Hello,
While working with some CAPTCHA stuff I get the following error:
Fatal error: Call to undefined function imagettftext().
I have compiled with GD support and all the supporting libraries
(Freetype, TTF, jpeg, X11R6 etc).
What am I missing?
Below is the configure command that I have used.
'./configure' '--with-gd'
'--with-apxs2=/usr/local/apache2/bin/apxs' '--with-pgsql'
'--with-jpeg-dir=/usr/local/jpeg-6b'
'--with-zlib-dir=/usr/local/zlib-1.2.1' '--enable-gd-native-ttf'
'--with-png' '--with-ttf'
'--with-freetype-dir=/usr/local/freetype-2.1.9'
'--with-xpm-dir=/usr/X11R6'
Thanks  Regards,
Harish Rao K,
make clean
make
make install
this helped me. I guess there are wrong dependencies in the Makefiles
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] help needed on imagettftext()

2005-01-27 Thread Richard Lynch
Harish Rao K wrote:
 While working with some CAPTCHA stuff I get the following error:
 Fatal error: Call to undefined function imagettftext().
 I have compiled with GD support and all the supporting libraries
 (Freetype, TTF, jpeg, X11R6 etc).

 What am I missing?

Check the log files from in the PHP source directory -- Often configure
will seem to work fine, but have error messages buried in that zillion
lines of output...

And, as always, you might have forgotten to re-start apache.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Help needed on php/mysql

2004-11-02 Thread Garth Hapgood - Strickland
Well my page doesnt have any of the spoken about elements on it yet, because I am not 
clear as to go about it.

The fields I speak of are things that need to be added extra to my page. 

Here is my pages code so far...

  ?php
  require('includes/application_top.php');
  require('registration_globals.php');
  require('includes/form_check.js.php');
  ?
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
  html
  head
  titleMatchmakers - empowerment opportunities network/title
  meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
  link href=style.css rel=stylesheet type=text/css
  script language=JavaScript type=text/JavaScript

  !--

  function MM_preloadImages() { //v3.0 
  var d=document; if(d.images){ if(!d.MM_p) d .MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; ia.length; i++)
  if (a[i].indexOf(#)!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  }

  !-- Hide from old browsers
  function error_popup() {
  newwin = window.open(error_popup.php,sss,height=470,width=450)
  }
  // end hiding --

  //-- 

  /script

  /head
  body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0
  !-- header //--
  ?php require('includes/header.php'); ?
  !-- header_eof //--
  !-- body //--
  table width=100% border=0 cellspacing=2 cellpadding=5 
background=images/page_bg.gif
  tr 
  td valign=toptable width=130
  tr
  td width=120 align=right class=pagetitlebrregistrationimg 
src=images/register_image.gif/td
  /tr
  /table/td 
  td
  table width=100% border=0 cellpadding=0 cellspacing=0
  tr valign=top 
  pbrbrbFill in all the fields below correct and accurately, then click 
Register Now./bbrbr
  /tr
  tr
  tdtable width=65%
  form title=register method=post onsubmit=return check_form();
?php
if (isset($submit)  $submit == Register Now){
  if (strlen($business_name) == 0) {}
  else if (strlen($business_owner) == 0) {}
  else if (strlen($street_address) == 0) {}
  else if (strlen($suburb) == 0) {}
  else if (strlen($city_town) == 0) {}
  else if (strlen($province_desc) == 0) {}

  $email_popup(); (the code i was trying to use to call popup window)
}
else {
  $insertquery = INSERT INTO business
  (BusinessName, BusinessOwner, StreetAdress, Suburb, CityTown, ProvinceID, 
StreetCode, PostalAddress, PostalCode, WebsiteAddress, IndustryID, IndustryOther, 
BusinessAge, AnnualTurnoverID, EmpowermentProfileID, BEEScoreCardID, 
PreferredLocationID, PreferredProductService, PreferredMatchPartner, PreferredAgeID, 
PreferredTurnoverID, PreferredEmpowermentProfileID, DateRegistered, MarketSourceID) 
  VALUES
  ($business_name, $business_owner, $street_address, '', '', '', '', '', '', '', 
'', '', '', '', '', '', '', '', '', '', '', '', '', '',); 

echo Your registration has been submitted; 
}

? 
  tr
  td class=formAreaTitle.: Business Contact Details/td
  /tr
  tr
  td class=main
  table border=0 width=100% cellspacing=4 cellpadding=0 class=formArea
  tr
  td width=45% align=right class=contentBusiness Name:/td
  td width=55%input class=content type=text size=35 maxlength=100 
name=business_name/td
  /tr
  tr
  td width=45% align=right class=contentBusiness Owner:/td
  td width=55%input class=content type=text size=35 maxlength=100 
name=business_owner/td
  /tr
  tr
  td width=45% align=right class=contentStreet Address:/td
  td width=55%input class=content type=text size=35 maxlength=100 
name=street_address/td
  /tr
  tr
  td width=45% align=right class=contentSuburb:/td
  td width=55%input class=content type=text size=35 maxlength=100 
name=suburb/td
  /tr
  tr
  td width=45% align=right class=contentCity/Town:/td
  td width=55%input class=content type=text size=35 maxlength=100 
name=city_town/td
  /tr
  tr
  td width=45% align=right class=contentProvince:/td
  td width=55% 
  select class=content name=province_desc id=selectoption value=-- select 
one --/option
  ?PHP for($x=0;$x$number_provinces;$x++)
  {
  echo('option value='.$rijprovinces[$x][ProvinceID].'');
  echo(''.$rijprovinces[$x][Description].'/option');
  }
  ?
  /select
  /td
  /tr
  tr
  td width=45% align=right class=contentStreet Code:/td
  td width=55%input class=content type=text size=5 maxlength=4 
name=street_code/td
  /tr
  tr
  td width=45% align=right class=contentPostal Address:/td
  td width=55%textarea rows=5 cols=35 class=content 
name=postal_address/textarea/td
  /tr
  tr
  td width=45% align=right class=contentPostal Code:/td
  td width=55%input class=content type=text size=5 maxlength=4 
name=postal_code/td
  /tr
  tr
  td width=45% align=right class=contentWebsite Address:/td
  td width=55%input class=content type=text size=35 maxlength=50 
name=website_address/td
  /tr
  /table
  /td 
  /tr 
  tr
  td class=formAreaTitle.: Business Information/td
  /tr
  tr
  td class=main width=60%
  table border=0 width=100% cellspacing=4 cellpadding=0 class=formArea
  tr
  td width=45% align=right 

Re: [PHP] Help needed on php/mysql

2004-11-02 Thread Lists
Hmmm...I'm not sure I'm following you.  You just want to know how to  
deal with multiple drop down lists?  Or do you want to be able to check  
and make sure all the mandatory selections have been chosen?
-dg
http://www.rexruff.com

On Nov 2, 2004, at 4:58 AM, Garth Hapgood - Strickland wrote:
Well my page doesnt have any of the spoken about elements on it yet,  
because I am not clear as to go about it.

The fields I speak of are things that need to be added extra to my  
page.

Here is my pages code so far...
  ?php
  require('includes/application_top.php');
  require('registration_globals.php');
  require('includes/form_check.js.php');
  ?
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
  html
  head
  titleMatchmakers - empowerment opportunities network/title
  meta http-equiv=Content-Type content=text/html;  
charset=iso-8859-1
  link href=style.css rel=stylesheet type=text/css
  script language=JavaScript type=text/JavaScript

  !--
  function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d .MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;  
ia.length; i++)
  if (a[i].indexOf(#)!=0){ d.MM_p[j]=new Image;  
d.MM_p[j++].src=a[i];}}
  }

  !-- Hide from old browsers
  function error_popup() {
  newwin = window.open(error_popup.php,sss,height=470,width=450)
  }
  // end hiding --
  //--
  /script
  /head
  body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0
  !-- header //--
  ?php require('includes/header.php'); ?
  !-- header_eof //--
  !-- body //--
  table width=100% border=0 cellspacing=2 cellpadding=5  
background=images/page_bg.gif
  tr
  td valign=toptable width=130
  tr
  td width=120 align=right class=pagetitlebrregistrationimg  
src=images/register_image.gif/td
  /tr
  /table/td
  td
  table width=100% border=0 cellpadding=0 cellspacing=0
  tr valign=top
  pbrbrbFill in all the fields below correct and accurately,  
then click Register Now./bbrbr
  /tr
  tr
  tdtable width=65%
  form title=register method=post onsubmit=return check_form();
?php
if (isset($submit)  $submit == Register Now){
  if (strlen($business_name) == 0) {}
  else if (strlen($business_owner) == 0) {}
  else if (strlen($street_address) == 0) {}
  else if (strlen($suburb) == 0) {}
  else if (strlen($city_town) == 0) {}
  else if (strlen($province_desc) == 0) {}

  $email_popup(); (the code i was trying to use to call popup  
window)
}
else {
  $insertquery = INSERT INTO business
  (BusinessName, BusinessOwner, StreetAdress, Suburb, CityTown,  
ProvinceID, StreetCode, PostalAddress, PostalCode, WebsiteAddress,  
IndustryID, IndustryOther, BusinessAge, AnnualTurnoverID,  
EmpowermentProfileID, BEEScoreCardID, PreferredLocationID,  
PreferredProductService, PreferredMatchPartner, PreferredAgeID,  
PreferredTurnoverID, PreferredEmpowermentProfileID, DateRegistered,  
MarketSourceID)
  VALUES
  ($business_name, $business_owner, $street_address, '', '', '',  
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',  
'',);

echo Your registration has been submitted;
}
?
  tr
  td class=formAreaTitle.: Business Contact Details/td
  /tr
  tr
  td class=main
  table border=0 width=100% cellspacing=4 cellpadding=0  
class=formArea
  tr
  td width=45% align=right class=contentBusiness Name:/td
  td width=55%input class=content type=text size=35  
maxlength=100 name=business_name/td
  /tr
  tr
  td width=45% align=right class=contentBusiness Owner:/td
  td width=55%input class=content type=text size=35  
maxlength=100 name=business_owner/td
  /tr
  tr
  td width=45% align=right class=contentStreet Address:/td
  td width=55%input class=content type=text size=35  
maxlength=100 name=street_address/td
  /tr
  tr
  td width=45% align=right class=contentSuburb:/td
  td width=55%input class=content type=text size=35  
maxlength=100 name=suburb/td
  /tr
  tr
  td width=45% align=right class=contentCity/Town:/td
  td width=55%input class=content type=text size=35  
maxlength=100 name=city_town/td
  /tr
  tr
  td width=45% align=right class=contentProvince:/td
  td width=55%
  select class=content name=province_desc id=selectoption  
value=-- select one --/option
  ?PHP for($x=0;$x$number_provinces;$x++)
  {
  echo('option value='.$rijprovinces[$x][ProvinceID].'');
  echo(''.$rijprovinces[$x][Description].'/option');
  }
  ?
  /select
  /td
  /tr
  tr
  td width=45% align=right class=contentStreet Code:/td
  td width=55%input class=content type=text size=5  
maxlength=4 name=street_code/td
  /tr
  tr
  td width=45% align=right class=contentPostal Address:/td
  td width=55%textarea rows=5 cols=35 class=content  
name=postal_address/textarea/td
  /tr
  tr
  td width=45% align=right class=contentPostal Code:/td
  td width=55%input class=content type=text size=5  
maxlength=4 name=postal_code/td
  /tr
  tr
  td width=45% align=right class=contentWebsite Address:/td
  td 

Re: [PHP] Help needed on php/mysql {Scanned}

2004-11-02 Thread Garth Hapgood - Strickland
As you can see from my code, I do want to check if all mandatory fields are
selected or filled in. As well as the issue of the communicationtyes.

SO far I do not have fields or anything for the user to use, to select the
different CommunicationTypes he wants. I am not sure how to go about this
because, there is the issue that more than one Destination can be added
for a single CommType. And the number of CommTypes is not fixed and could
vary, so thats why Im not sure how much input fields etc to put on page.

Does this make sense.
Garth


 Hmmm...I'm not sure I'm following you.  You just want to know how to
 deal with multiple drop down lists?  Or do you want to be able to check
 and make sure all the mandatory selections have been chosen?
 -dg
 http://www.rexruff.com

 On Nov 2, 2004, at 4:58 AM, Garth Hapgood - Strickland wrote:

  Well my page doesnt have any of the spoken about elements on it yet,
  because I am not clear as to go about it.
 
  The fields I speak of are things that need to be added extra to my
  page.
 
  Here is my pages code so far...
 
?php
require('includes/application_top.php');
require('registration_globals.php');
require('includes/form_check.js.php');
?
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
titleMatchmakers - empowerment opportunities network/title
meta http-equiv=Content-Type content=text/html;
  charset=iso-8859-1
link href=style.css rel=stylesheet type=text/css
script language=JavaScript type=text/JavaScript
 
!--
 
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d .MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
  ia.length; i++)
if (a[i].indexOf(#)!=0){ d.MM_p[j]=new Image;
  d.MM_p[j++].src=a[i];}}
}
 
!-- Hide from old browsers
function error_popup() {
newwin = window.open(error_popup.php,sss,height=470,width=450)
}
// end hiding --
 
//--
 
/script
 
/head
body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0
!-- header //--
?php require('includes/header.php'); ?
!-- header_eof //--
!-- body //--
table width=100% border=0 cellspacing=2 cellpadding=5
  background=images/page_bg.gif
tr
td valign=toptable width=130
tr
td width=120 align=right class=pagetitlebrregistrationimg
  src=images/register_image.gif/td
/tr
/table/td
td
table width=100% border=0 cellpadding=0 cellspacing=0
tr valign=top
pbrbrbFill in all the fields below correct and accurately,
  then click Register Now./bbrbr
/tr
tr
tdtable width=65%
form title=register method=post onsubmit=return check_form();
  ?php
  if (isset($submit)  $submit == Register Now){
if (strlen($business_name) == 0) {}
else if (strlen($business_owner) == 0) {}
else if (strlen($street_address) == 0) {}
else if (strlen($suburb) == 0) {}
else if (strlen($city_town) == 0) {}
else if (strlen($province_desc) == 0) {}
 
$email_popup(); (the code i was trying to use to call popup
  window)
  }
  else {
$insertquery = INSERT INTO business
(BusinessName, BusinessOwner, StreetAdress, Suburb, CityTown,
  ProvinceID, StreetCode, PostalAddress, PostalCode, WebsiteAddress,
  IndustryID, IndustryOther, BusinessAge, AnnualTurnoverID,
  EmpowermentProfileID, BEEScoreCardID, PreferredLocationID,
  PreferredProductService, PreferredMatchPartner, PreferredAgeID,
  PreferredTurnoverID, PreferredEmpowermentProfileID, DateRegistered,
  MarketSourceID)
VALUES
($business_name, $business_owner, $street_address, '', '', '',
  '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
  '',);
 
  echo Your registration has been submitted;
  }
 
  ?
tr
td class=formAreaTitle.: Business Contact Details/td
/tr
tr
td class=main
table border=0 width=100% cellspacing=4 cellpadding=0
  class=formArea
tr
td width=45% align=right class=contentBusiness Name:/td
td width=55%input class=content type=text size=35
  maxlength=100 name=business_name/td
/tr
tr
td width=45% align=right class=contentBusiness Owner:/td
td width=55%input class=content type=text size=35
  maxlength=100 name=business_owner/td
/tr
tr
td width=45% align=right class=contentStreet Address:/td
td width=55%input class=content type=text size=35
  maxlength=100 name=street_address/td
/tr
tr
td width=45% align=right class=contentSuburb:/td
td width=55%input class=content type=text size=35
  maxlength=100 name=suburb/td
/tr
tr
td width=45% align=right class=contentCity/Town:/td
td width=55%input class=content type=text size=35
  maxlength=100 name=city_town/td
/tr
tr
td width=45% align=right class=contentProvince:/td
td width=55%
select class=content name=province_desc id=selectoption

[PHP] Help needed on php/mysql

2004-11-01 Thread Garth Hapgood - Strickland
I have written a registration page in php and have a number of edit boxes
and drop-down lists. The lists are pulling data out of their respective
tables, whereas the edit boxes are just for saving data.

Now my main table where all my data is being saved is called Business. Onto
this I have a table called BusinessCommunication which has the fields
(BusinessCommunicationID, BusinessID, CommunicationTypeID, Destination).

BusinessCommunicationID = Primary Key
BusinessID = Foreign key from Business Table
CommunicationTypeID = Foreign key from CommunicationType table (lists all
communication types)
Destination = field where data is stored (tel number, email address or fax
number etc)

Now the problem is that I want the person registering to be able to select
the Communication Type/s he wants to add and then be able to enter the
relevant information for each selected CommType. There must also be ability
to add 2 of the same CommType.

How can I achieve this as simply and affective as possible on my
registration page.

If you have any solutions are need more information. Please let me know

Many thanx
Garth

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



Re: [PHP] Help needed on php/mysql

2004-11-01 Thread Lists
Seeing the page might help.
On Nov 1, 2004, at 2:52 AM, Garth Hapgood - Strickland wrote:
I have written a registration page in php and have a number of edit 
boxes
and drop-down lists. The lists are pulling data out of their respective
tables, whereas the edit boxes are just for saving data.

Now my main table where all my data is being saved is called Business. 
Onto
this I have a table called BusinessCommunication which has the fields
(BusinessCommunicationID, BusinessID, CommunicationTypeID, 
Destination).

BusinessCommunicationID = Primary Key
BusinessID = Foreign key from Business Table
CommunicationTypeID = Foreign key from CommunicationType table (lists 
all
communication types)
Destination = field where data is stored (tel number, email address or 
fax
number etc)

Now the problem is that I want the person registering to be able to 
select
the Communication Type/s he wants to add and then be able to enter the
relevant information for each selected CommType. There must also be 
ability
to add 2 of the same CommType.

How can I achieve this as simply and affective as possible on my
registration page.
If you have any solutions are need more information. Please let me know
Many thanx
Garth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-dg
http://www.rexruff.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Help needed

2004-10-29 Thread suma parakala
Hi
 I developed a html form in which I have text box and combo box. Now my 
problem is I have to pass the values of this page to another page. How can i 
pass the values/variables to next page using href
Kindly help me
Thanks
Suma

_
Hey there NRIs!  Desi news, films, ‘n more! http://www.msn.co.in/nri/ Stay 
in the loop!

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


Re: [PHP] Help needed

2004-10-29 Thread Greg Donald
On Fri, 29 Oct 2004 15:22:29 +0530, suma parakala
[EMAIL PROTECTED] wrote:
   I developed a html form in which I have text box and combo box. Now my
 problem is I have to pass the values of this page to another page. How can i
 pass the values/variables to next page using href
 Kindly help me

You have to submit the form in some way, GET, POST, or a perhaps a
javascript invocation of either.  Once the form is submitted to the
next page, the variables will be available via the $_GET or $_POST
arrays.  You can view these arrays with print_r().  This is the
theory, but if you post your actual code, people will most likely help
you debug it.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



RE: [PHP] Help needed

2004-10-29 Thread Graham Cossey

 Hi
   I developed a html form in which I have text box and combo
 box. Now my
 problem is I have to pass the values of this page to another
 page. How can i
 pass the values/variables to next page using href
 Kindly help me
 Thanks
 Suma

As you've posted to a PHP list I will assume your second page is a PHP page.

Set your FORM action to the second page ie:

FORM name=myForm method=POST action=page2.php
  INPUT type=TEXT name=field1

Then within page2.php all the form fields will be available in the $_POST
array.

$field1 = $_POST['field1'];

You can also use GET in place of POST.

As for using href, well this isn't a form option as far as I am aware. If
you wish to subsequently pass variables using href:

a href=pagex.php?var1=val1var2=val2Link Text/a

--OR--

?php
echo a href=\pagex.php?var1=$var1var2=$var2\Link Text/a;
?

HTH
Graham

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



[PHP] Help needed Postgresql and PHP

2004-10-05 Thread suma parakala
Hi
I am developing an application using php and postgresql . My problem is I 
need to retrieve name and addresses from table(postgres sql table)  and 
print letter (body of letter will be same). Kindly help /Suggest how i can 
do this
Thanks
Suma

_
Looking for a soulmate?  http://www.shaadi.com/ptnr.php?ptnr=hmltag Log onto 
Shaadi.com.

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


RE: [PHP] Help needed Postgresql and PHP

2004-10-05 Thread Warren Vail
Extracting name and addresses from postgres as a comma separated values
CSV file should be doable with postgress utilities or scripts.  Assuming
you have access to a word processor like Microsoft Word, that has a Mail
Merge capability, where your letter can be merged and printed with names
and addresses from your CSV file.

Factors affecting the wisdom of this approach are;
* The volume of letters you expect to print and the printers you expect to
use (bubble jet ink cartridges are expensive).
* If name and address are the only substitutions in the letter.  Greetings,
additional content may require more that a CSV solution.
* Special bulk mail requirements like zip code sort and selections should be
doable in postgres.
* For really large volumes you will need to break down the workload for
multiple printers in a fashion that makes sense.

If you want to reinvent the wheel by developing your own mail merge process,
I would recommend against it, unless there is some significant gain by doing
that.  I'm guessing that your have already considered this, but are looking
for some other solution for some reason that is not apparent to me.

Good Luck,

Warren Vail


-Original Message-
From: suma parakala [mailto:[EMAIL PROTECTED]
Sent: Monday, October 04, 2004 11:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Help needed Postgresql and PHP

Hi
I am developing an application using php and postgresql . My problem is I
need to retrieve name and addresses from table(postgres sql table)  and
print letter (body of letter will be same). Kindly help /Suggest how i can
do this
Thanks
Suma

_
Looking for a soulmate?  http://www.shaadi.com/ptnr.php?ptnr=hmltag Log onto
Shaadi.com.

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

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



[PHP] Help needed

2004-07-02 Thread Ingrid Angelin
Hi,

I am completely new to PHP and would need some help.

I have just opened a site for my manufaturing business and would like to
create a section where each of my clients get their own account in which
they can login and check the status of their order.
For this I would need a script for accounts (SQL, I guess?) and also a
script for updating the status page of each order. I do want something like
an admin area since there are several of us who would update the pages.
Basically I just want to have diffeent fields with information which are
easily updated but for different accounts/clients.
Is there somewhere I can read up on how to make such a thing or do I need to
hire someone to do this

Thanks,
Christian

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



Re: [PHP] help needed with tiger tree hashes

2004-06-06 Thread Carl S. in 't Veld
Ah yes! Thanks, I see the problem; I have to switch the 8-byte chunks in
byte-order! (Why is Directconnect doing this...)
Thanks for your help. Greetings, Carl.

Thijs Lensselink [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 check: http://www.cs.technion.ac.il/~biham/Reports/Tiger/testresults.html
 The results you posted seem to be right.

 Carl S. in 't Veld wrote on vrijdag 4 juni 2004 0:52:

  I am trying to generate tiger tree hashes the same way as
  directconnect does, but I am failing.
 
  I checked the output from php with the reference vectors from
  http://www.cs.technion.ac.il/~biham...ssie-format.dat
  and they appear to be different!
 
  echo bin2hex(mhash(MHASH_TIGER, 'abc')).br/\n;
  outputs
  f258c1e88414ab2a527ab541ffc5b8bf935f7b951c132951
  instead of
  2AAB1484E8C158F2BFB8C5FF41B57A525129131C957B5F93
 
  and, for example,
  echo bin2hex(mhash(MHASH_TIGER, 'message digest')).br/\n;
  outputs
  951a2078cbf881d91c441e754830cf0df6295aa51aca7f51
  instead of
  D981F8CB78201A950DCF3048751E441C517FCA1AA55A29F6
 
  What am I doing wrong here?

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



RE: [PHP] help needed with tiger tree hashes

2004-06-04 Thread Thijs Lensselink
check: http://www.cs.technion.ac.il/~biham/Reports/Tiger/testresults.html
The results you posted seem to be right.

Carl S. in 't Veld wrote on vrijdag 4 juni 2004 0:52:

 I am trying to generate tiger tree hashes the same way as
 directconnect does, but I am failing.
 
 I checked the output from php with the reference vectors from
 http://www.cs.technion.ac.il/~biham...ssie-format.dat
 and they appear to be different!
 
 echo bin2hex(mhash(MHASH_TIGER, 'abc')).br/\n;
 outputs
 f258c1e88414ab2a527ab541ffc5b8bf935f7b951c132951
 instead of
 2AAB1484E8C158F2BFB8C5FF41B57A525129131C957B5F93
 
 and, for example,
 echo bin2hex(mhash(MHASH_TIGER, 'message digest')).br/\n;
 outputs
 951a2078cbf881d91c441e754830cf0df6295aa51aca7f51
 instead of
 D981F8CB78201A950DCF3048751E441C517FCA1AA55A29F6
 
 What am I doing wrong here?

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



[PHP] help needed with tiger tree hashes

2004-06-03 Thread Carl S. in 't Veld
I am trying to generate tiger tree hashes the same way as directconnect
does, but I am failing.

I checked the output from php with the reference vectors from
http://www.cs.technion.ac.il/~biham...ssie-format.dat
and they appear to be different!

echo bin2hex(mhash(MHASH_TIGER, 'abc')).br/\n;
outputs
f258c1e88414ab2a527ab541ffc5b8bf935f7b951c132951
instead of
2AAB1484E8C158F2BFB8C5FF41B57A525129131C957B5F93

and, for example,
echo bin2hex(mhash(MHASH_TIGER, 'message digest')).br/\n;
outputs
951a2078cbf881d91c441e754830cf0df6295aa51aca7f51
instead of
D981F8CB78201A950DCF3048751E441C517FCA1AA55A29F6

What am I doing wrong here?


begin 666 frown.gif
M1TE.#EA#P`/`-4_`/_XH-++?L[(?-7/@-_8AO_WF__[SO_XI__YL=W6A/_\
MW/_ZO?_WG?_XJ_KREO_[TO_YL/_\U?WUF.[GC__XHO_[Q\K#?_[RO'JD.]
M=?!=^;?BO_ZP/_WF?_XI?_[R=S5A/[VF/_[T?_\W?_[R__ZO/_XJO;NE/_\
MV*\=?CPEKCC/_\V/_YK__YMO%OGQE?_[QO_ZO__XH__YM.CAB^':A]3-
[EMAIL PROTECTED]/B,[= ```*2DI'Y! $``#\`+ `/``\```:3
MP)]0ZL6A\A?4%Z7#A'I$\Q\D4,,1_DX!OZ6BKH2*C^1B.KO+A$Y%P.U#
MX,[EMAIL PROTECTED]LU-D4+R5%``P%11L)`T4(T-% 4=$BK0$O11XS% `%
M$CHP$P0!BE%(0XJ)T9%`AD]/73*SX\! #%CZT:CX;!#DW`A:SM+5`P(:
.RLIJ7K_044E*L$E!`#L`
`
end

begin 666 confused.gif
M1TE.#EA#P`6`-4_`,.]=?GQE?#HD/_XH=++?O_WF_'JD;?BL[(?.KCC,?!
M=__XJ__[Q__[RO_\W-7.@/_YL?_YL-W6A/_[TOKREO_WG=_8AO_\U?WUF/_\
MV?_YM?_XHO_[SO_ZO?_ZN__XI^[GC__XI?3MD_;ND__ZP/_[QLK#GBC/[V
MF/_\V/_[RO%O_ZO/_YM/_XJO_XH__YK][7A?_\T__\U^':A__ZPO_ZO__W
MF?_\W?_XJ/STE_;NE/_\V\[= ```*2DI'Y! $``#\`+ `/`!8```:E
MP-_/)Q02B\A4GDD)I?(O1)E5JOTBH2R\7ZOE_NUY:-$CAK /'[EMAIL PROTECTED]
MZ9ME,FZK96K4)H3,E\U'AI?% 9.# TJ7Q$NSX)S1?'1TL@L#%04Z!@2
M#U\0$# +P4W,[EMAIL PROTECTED]P,%#H!(!8$@!?*!0!.R([EMAIL PROTECTED] `]/4X@
@[EMAIL PROTECTED]@6/@\()LL^S'3:M343T/XVE7TN5!`#L`
`
end

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



[PHP] help needed to install php on my xp home edition pc

2004-02-20 Thread danny cobbinah
i have installed apache 2 and mysql 3 on my pc (running xp home) i have
installed php 4.3.4 but have hit a snag. the php doesnt seem to gel with
apache at all. any help please? how do i configure apache and php to mix?

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



[PHP] HELP NEEDED PLEASE - IMAP, MySQL and PHP

2003-12-28 Thread Vernon
Hello all,

I have been struggling for some time now to develop or find some product
that will allow me to scan documents (I have that part down no problem,
using OMNIPAGE 14.0) and put then into a searchable database with a copy of
it in some form that is readable like a formatted txt file.

I am looking for the easiest way to do this. I'm thinking if I can have the
files emailed into a MySQL database that would work expect the programs I
have found, however,will not allow me to bring the attachments into the
database. I've tried Xeoport which uses IMAP to access the email records and
pull all but the attachments in. Anyone know of anything that will help me
do this?

Thanks

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



[PHP] Help needed - Dynamically Zip Files Sub-Directories

2003-10-14 Thread TWSC HQ
Hi everybody -

What is wrong with this php zip class (file : phpzip.inc.php)?

I've got this code on one page:

require(phpzip.inc.php);
 $z = new PHPZip();
 $z - Zip(directory_name/, out.zip);

where all files and sub-directories + files should be zipped into the zip
file called out.zip

trouble is the class does zip the files in the directory_name directory
but does not include the subdirectories and their files.
Works on Windows server but not on unix server

Thanks!

this is the class:

?php
#
# PHPZip v1.2 by Sext ([EMAIL PROTECTED]) 2002-11-18
#  (Changed: 2003-03-01)
#
# Makes zip archive
#
# Based on Zip file creation class, uses zLib
#
#

class PHPZip
{
 function Zip($dir, $zipfilename)
 {
 if (@function_exists('gzcompress'))


   $curdir = getcwd();
   if (is_array($dir))
   {
 $filelist = $dir;
   }
   else
   {
$filelist = $this - GetFileList($dir);
   }

   if ((!empty($dir))(!is_array($dir))(file_exists($dir))) chdir($dir);
   else chdir($curdir);

   if (count($filelist)0)
   {
foreach($filelist as $filename)
{
 if (is_file($filename))
 {
  $fd = fopen ($filename, r);
  $content = fread ($fd, filesize ($filename));
  fclose ($fd);

  if (is_array($dir)) $filename = basename($filename);
  $this - addFile($content, $filename);
 }
}
$out = $this - file();

chdir($curdir);
$fp = fopen($zipfilename, w);
fwrite($fp, $out, strlen($out));
fclose($fp);
   }
   return 1;
  }
  else return 0;
 }

 function GetFileList($dir)
 {
  if (file_exists($dir))
  {
   $args = func_get_args();
   $pref = $args[1];

   $dh = opendir($dir);
   while($files = readdir($dh))
   {
if (($files!=.)($files!=..))
{
 if (is_dir($dir.$files))
 {
  $curdir = getcwd();
  chdir($dir.$files);
  $file = array_merge($file, $this - GetFileList(, $pref$files/));
  chdir($curdir);
 }
 else $file[]=$pref.$files;
}
   }
   closedir($dh);
  }
  return $file;
 }

var $datasec  = array();
var $ctrl_dir = array();
var $eof_ctrl_dir = \x50\x4b\x05\x06\x00\x00\x00\x00;
var $old_offset   = 0;

/**
 * Converts an Unix timestamp to a four byte DOS date and time format
(date
 * in high two bytes, time in low two bytes allowing magnitude
comparison).
 *
 * @param  integer  the current Unix timestamp
 *
 * @return integer  the current date in a four byte DOS format
 *
 * @access private
 */
function unix2DosTime($unixtime = 0) {
$timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);

if ($timearray['year']  1980) {
 $timearray['year']= 1980;
 $timearray['mon'] = 1;
 $timearray['mday']= 1;
 $timearray['hours']   = 0;
 $timearray['minutes'] = 0;
 $timearray['seconds'] = 0;
} // end if

return (($timearray['year'] - 1980)  25) | ($timearray['mon'] 
21) | ($timearray['mday']  16) |
($timearray['hours']  11) | ($timearray['minutes']  5) |
($timearray['seconds']  1);
} // end of the 'unix2DosTime()' method


/**
 * Adds file to archive
 *
 * @param  string   file contents
 * @param  string   name of the file in the archive (may contains the
path)
 * @param  integer  the current timestamp
 *
 * @access public
 */
function addFile($data, $name, $time = 0)
{
$data = str_replace(\x0a, \x0d\x0a, $data);
$name = str_replace('\\', '/', $name);

$dtime= dechex($this-unix2DosTime($time));
$hexdtime = '\x' . $dtime[6] . $dtime[7]
  . '\x' . $dtime[4] . $dtime[5]
  . '\x' . $dtime[2] . $dtime[3]
  . '\x' . $dtime[0] . $dtime[1];
eval('$hexdtime = ' . $hexdtime . ';');

$fr   = \x50\x4b\x03\x04;
$fr   .= \x14\x00;// ver needed to extract
$fr   .= \x00\x00;// gen purpose bit flag
$fr   .= \x08\x00;// compression method
$fr   .= $hexdtime; // last mod time and date

// local file header segment
$unc_len = strlen($data);
$crc = crc32($data);
$zdata   = gzcompress($data);
$c_len   = strlen($zdata);
$zdata   = substr(substr($zdata, 0, strlen($zdata) - 4), 2); // fix
crc bug
$fr  .= pack('V', $crc); // crc32
$fr  .= pack('V', $c_len);   // compressed filesize
$fr  .= pack('V', $unc_len); // uncompressed filesize
$fr  .= pack('v', strlen($name));// length of filename
$fr  .= pack('v', 0);// extra field length
$fr  .= $name;

// file data segment
$fr .= $zdata;

// data descriptor segment (optional but necessary if archive is
not
// served as file)
$fr .= pack('V', $crc); // crc32
$fr .= pack('V', $c_len);

[PHP] help needed with this mcal script

2003-08-21 Thread Sn!per
the output of this short mcal-php script is 0. and the no /var/calendar/[EMAIL 
PROTECTED] mcal file was created.

appreciate some advise.

?php
$year = 2003; $month = 8; $day = 21;
$description = the description; $category = 2; $title = the title;

$stream=mcal_open({/mstore}[EMAIL PROTECTED],cal,passwd);

mcal_event_set_title($stream,$title);
mcal_event_set_description($stream,$description);
mcal_event_set_category($stream,$category);
mcal_event_set_start($stream,$year,$month,$day);
$err=mcal_store_event($stream);

print $err;

?

--
rgds


---
Sign Up for free Email at http://ureg.home.net.my/
---

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



[PHP] Help needed

2003-06-30 Thread Nirmala P
Hi All,

I am new to  PHP world.

Could any body tell me how to call any function(written in PHP) 
from  Java script.
Actually my PHP function return a string value  which i need to 
access in my java script code.

Thanks in Advance..

Nirmala
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Help needed

2003-06-30 Thread Nirmala P
Hi All,

I am new to  PHP world.

Could any body tell me how to call any function(written in PHP) 
from  Java script.
Actually my PHP function return a string value  which i need to 
access in my java script code.

Thanks in Advance..

Nirmala
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Help needed

2003-06-30 Thread Haseeb
hi,
here is how you do it
?
$strJavaScriptValue=Hello;
?
script language=JavaScript
alert('? echo $strJavaScriptValue?');
/script

this will alert Hello!. i think you get the point.
Haseeb

- Original Message - 
From: Nirmala P [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 30, 2003 10:45 AM
Subject: [PHP] Help needed


 Hi All,
 
 I am new to  PHP world.
 
 Could any body tell me how to call any function(written in PHP) 
  from  Java script.
 Actually my PHP function return a string value  which i need to 
 access in my java script code.
 
 Thanks in Advance..
 
 Nirmala
 ___
 Click below to experience Sooraj Barjatya's latest offering
 'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
 Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



[PHP] Help needed

2003-06-30 Thread Nirmala P
Hi list,
This time i am pasting my code could any body tell where wrong I 
am ?

?
  function LangItem($field,$lang)
  {
   $db = mysql_connect(localhost, root);
   /*Check For Connection to local host*/
   if(!$db) echo(Connect to localhost mysql database failed);

   if(!mysql_select_db(eshop,$db)) echo (Selection of eshop 
failed on MySQL database);

   $Sql = SELECT  . $field . FROM language where LangCode = 
.'.$lang.';

   $result = mysql_query($Sql,$db);

   if($result)
   {
 $myrow = mysql_fetch_array($result);
 $value = $myrow[$field];
   }
   else echo (h1 No Record Found/h1);
   return($value);
  }
?
script language=JavaScript
  FieldName = Material;
  LangName = E;
  alert(? LangItem(FieldName,LangName)?);
/script
Loking for help..
Nirmala
___
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan  Kareena Kapoor http://www.mpkdh.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Help needed

2003-06-18 Thread Shishir Kumar Mishra
Hi List,

Is it possible to read XML data and return as string to browser (as string)?  
I do have css file but I need to get data from database and create a XML string  (with 
the css file). This xml string has to be returned in browser(I.E.) rather than as XML 
file. 

regards.. 
Shishir Kumar Mishra




[PHP] Help needed

2003-04-01 Thread Andy
Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.

I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201

But the only thing on line 201 is:
default:

I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)

Thank you



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



RE: [PHP] Help needed

2003-04-01 Thread Clint Tredway
Please post more of your code. It is difficult for us to help you without
seeing your code.

Clint

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 8:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help needed


Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.

I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201

But the only thing on line 201 is:
default:

I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)

Thank you



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

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



RE: [PHP] Help needed

2003-04-01 Thread Mike Brum
Realize that when you see error line... it doesn't mean that the error is
definately on that line. PHP is only *so* smart. You'll find that making
mistakes on line X will result in errors being reported on line X+1 or
further down in your code.

Don't take the errors at face value all the time - they're an amazingly
useful tool, but it's only a machine and is forced by a set of rules.

-Mike

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 9:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help needed


Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.

I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201

But the only thing on line 201 is:
default:

I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)

Thank you



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





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



Re: [PHP] Help needed

2003-04-01 Thread Andy
);
$message_new = $newname already used. Select another
 username.;
include(login_form.inc);
exit();
  }
  else
  {
$today = time(Y-m-d);
$sql = INSERT INTO Members
(company,name,address,town,county,postcode,phone,email,username,password,cre
ateDate,) VALUES
('$company', '$name','$address','$town','$county',

'$postcode','$phone','$email','$newname',password('$newpass'),'$today');
mysql_query($sql);
$auth=yes;
$logname = $newname;
/* send email to new member */
$emess1=A new Member Account has been setup for you. ;
$emess2=Your Username and password are: ;
$emess3=\n\n\t$newname\n\t$newpass\n\n;
$emess4=Thank you for your interest in ASK Support ;
$emess5=at ask-support.co.uk\n\n;
$emess6=If you have any questions or problems, email ;
$emess7=[EMAIL PROTECTED];
$emess =
   $emess1.$emess2.$emess3.$emess4.$emess5.$emess6.emess7;
$ehead=From: [EMAIL PROTECTED];
$subject = Your new Member Account from ASK Support;
$mailsend=mail($email,$subject,$emess,$ehead);
header(Location: New_member.php);
  }
break;

default:
include(login_form.inc);
  }
?

Clint Tredway [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Please post more of your code. It is difficult for us to help you without
 seeing your code.

 Clint

 -Original Message-
 From: Andy [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 8:17 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Help needed


 Hi all

 Can someone help?
 I am new to PHP and need some help, i have tried to build a members only
 section to my website but i am finding it very hard.

 I get this error when i go to the login page:

 Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
 on line 201

 But the only thing on line 201 is:
 default:

 I don't understand?
 I get the feeling i will need more help even if someone solves this for me
 :o)

 Thank you



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



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



Re: [PHP] Help needed

2003-04-01 Thread Chris Hayes
At 16:17 1-4-03, you wrote:
Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.
I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201
But the only thing on line 201 is:
default:
The parse error is starting to be a problem on line 201, but that may be 
caused by something you ommitted in an earlier line, maybe you did not 
close a quoted string, or maybe you did not end a line with a ;semicolon;.
If you get a very strange error message try to find the translation on 
www.zend.com rather than on www.php.net. Hint: with Google you can look 
for  [ site:www.zend.com   StrangeErrorWord ].

I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)
In deed. Well you got PHP working so that already shows you're computer 
literate.

The best book to start with that i know of  is the PHP Bible second 
edition, by Converse and Parker. It is an inve$tment though...

On php.net is a simple tutorial with links: 
http://www.php.net/manual/en/tutorial.php. Also please (!) do read the 
first chapters of the online manual on www.php.net, this manual then 
proceeds with a lot of functions, have a quick look at them and dig a bit 
deeper in the functions for strings, arrays, datetime, and your database.

I collected some specific links on www.hieris.info/over/php. I wrote it in 
Dutch and the layout is primitive but do try the links!!

Then there was a usefull list of do's and don'ts on zend, let me look 
http://www.zend.com/zend/art/mistake.php about classic mistakes. Don't be 
intimidated by it though. PHP is very flex.

Chris Hayes.

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


Re: [PHP] Help needed

2003-04-01 Thread Chris Hayes
I would suppose that you have an unbalanced {} somewhere.

Restructure your code (yes, even more!) so it is easier to see such a mistake.

Some coders prefer this:

if () {
code
 }
but i prefer
if ()
 {
code
 }
so i see immediately what {braces} belong together.
With nested braces I nest each brace set one tab deeper.

Start with the   case new: part as i removed some of your if  brace-sets 
within that condition and then i saw it had some closing braces left within 
the case:, and that is a _sin_.



Chris
PS Do you have a colorcoding editor?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Help needed

2003-04-01 Thread Ernest E Vogelsinger
At 16:27 01.04.2003, Andy spoke out and said:
[snip]
Hi Clint
OK hope this is not too much and there are likely to be more errors in it.
Thank you
Andy
[snip] 

At the line 
if ($num == 1)  // login name was found{
you have the curly bracket after the comment slashes - this is
diesregarded. Put it before the comment slashes.

At the line 
if ($num2  0) // password is correct  {
you have the curly bracket after the comment slashes - this is
diesregarded. Put it before the comment slashes.

After this construct
$message_new = $phone is not a valid phone number.
Please try again.;
include(login_form.inc);
exit();
you have a closing curly brace that doesn't belong here. Remove it.


Now your code should run without errors (syntax errors, that is)

Hint: You should make a habit of using a more clear indentation (if your
code is actually as it is in the mail). A single column indentation is not
enough to make block levels clear at the first sight. You better use 4 or 8
columns indentation width.


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/


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



Re: [PHP] Help needed

2003-04-01 Thread Andy
Same error clint. I think the error is between
case new: foreach($HTTP_POST_VARS as $key = $value)
and
  /* check to see if login name already exists */
I copied the code from PHP for Dummies (while trying to learn it) and
changed the code between the above to add in the extra fields for my form, i
think this is where the error is but i cannot see it!

Andy


Clint Tredway [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Please post more of your code. It is difficult for us to help you without
 seeing your code.

 Clint

 -Original Message-
 From: Andy [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 8:17 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Help needed


 Hi all

 Can someone help?
 I am new to PHP and need some help, i have tried to build a members only
 section to my website but i am finding it very hard.

 I get this error when i go to the login page:

 Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
 on line 201

 But the only thing on line 201 is:
 default:

 I don't understand?
 I get the feeling i will need more help even if someone solves this for me
 :o)

 Thank you



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



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



Re: [PHP] Help needed

2003-04-01 Thread Andy
Thank you Ernest

I am a little confused with the closing curly bracket after
$message_new = $phone is not a valid phone number etc

which one should i delete?
}
  if (!ereg(^[0-9)(xX -]{7,20}$,$phone))
{
unset($do);
$message_new = $phone is not a valid phone number.
Please try again.;
include(login_form.inc);
exit();

Andy

Ernest E Vogelsinger [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 At 16:27 01.04.2003, Andy spoke out and said:
 [snip]
 Hi Clint
 OK hope this is not too much and there are likely to be more errors in
it.
 Thank you
 Andy
 [snip]

 At the line
 if ($num == 1)  // login name was found{
 you have the curly bracket after the comment slashes - this is
 diesregarded. Put it before the comment slashes.

 At the line
 if ($num2  0) // password is correct  {
 you have the curly bracket after the comment slashes - this is
 diesregarded. Put it before the comment slashes.

 After this construct
 $message_new = $phone is not a valid phone number.
 Please try again.;
 include(login_form.inc);
 exit();
 you have a closing curly brace that doesn't belong here. Remove it.


 Now your code should run without errors (syntax errors, that is)

 Hint: You should make a habit of using a more clear indentation (if your
 code is actually as it is in the mail). A single column indentation is not
 enough to make block levels clear at the first sight. You better use 4 or
8
 columns indentation width.


 --
O Ernest E. Vogelsinger
(\) ICQ #13394035
 ^ http://www.vogelsinger.at/




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



Re: [PHP] Help needed

2003-04-01 Thread Chris Hayes
At 17:17 1-4-03, you wrote:
Thank you Ernest

I am a little confused with the closing curly bracket after
$message_new = $phone is not a valid phone number etc
there are two, and there is nothing inbetween, so technicaly it does not 
matter to the PHP interpreter.



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


Re: [PHP] Help needed

2003-04-01 Thread J.Veenhuijsen
Maybe the error is here -
 $emess =$emess1.$emess2.$emess3.$emess4.$emess5.$emess6.emess7;
Shouldnt it be $emess7  ???
Jochem

Andy wrote:
Same error clint. I think the error is between
case new: foreach($HTTP_POST_VARS as $key = $value)
and
  /* check to see if login name already exists */
I copied the code from PHP for Dummies (while trying to learn it) and
changed the code between the above to add in the extra fields for my form, i
think this is where the error is but i cannot see it!
Andy

Clint Tredway [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Please post more of your code. It is difficult for us to help you without
seeing your code.
Clint

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 8:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help needed
Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.
I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201
But the only thing on line 201 is:
default:
I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)
Thank you



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





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


Re: [PHP] Help needed

2003-04-01 Thread Ernest E Vogelsinger
At 17:17 01.04.2003, Andy spoke out and said:
[snip]
Thank you Ernest

I am a little confused with the closing curly bracket after
$message_new = $phone is not a valid phone number etc

which one should i delete?
}
  if (!ereg(^[0-9)(xX -]{7,20}$,$phone))
{
unset($do);
$message_new = $phone is not a valid phone number.
Please try again.;
include(login_form.inc);
exit();

directly here after the exit(); line.


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/


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



[PHP] Help Needed

2003-03-10 Thread Pushpinder Singh Garcha
Hey All

My Php App is trying to fopen() and fread() a File that is located in 
the Web Server. This works if the file is a simple html file. However 
the complicated  part is that the file is not displayed correctly i.e. 
it has missing gifs if, it was created using Fireworks and then 
subsequently exported as a html.

Any help will be highly appreciated
TIA
Pushpinder Singh Garcha
_
Web Architect


RE: [PHP] Help Needed

2003-03-10 Thread Michael Roger C. Bianan
Garcha,

Kindly check your file paths.  When you export it, it may not point
to what really is the real path online. 

May I ask what are you trying to achieve?

-Original Message-
From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 1:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Help Needed


Hey All


My Php App is trying to fopen() and fread() a File that is located in 
the Web Server. This works if the file is a simple html file. However 
the complicated  part is that the file is not displayed correctly i.e. 
it has missing gifs if, it was created using Fireworks and then 
subsequently exported as a html.

Any help will be highly appreciated
TIA

Pushpinder Singh Garcha
_
Web Architect


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



Re: [PHP] Help Needed

2003-03-10 Thread Pushpinder Singh Garcha
Thanks for the prompt reply Michael

I am trying to protect files on the site, my script checks for a valid 
session ID and fopens() a File. This file is located in a different Dir 
from the php script. When the file is a simple html file , I can easily 
fopen() the file  (Even though it contains gifs)

The real problem arises is when this html file has been exported from 
Fireworks (I.E. .png file ) The resulting file shows many missing 
links wihen  I try to fread() the html file. Although the file is 
displayed fine when I point my Browser (Mozilla)
to it. I am testing on the MAC OS Jaguar Platform

Thanks again
--pS
On Tuesday, March 11, 2003, at 09:12 AM, Michael Roger C. Bianan wrote:

Garcha,

Kindly check your file paths.  When you export it, it may not point
to what really is the real path online.
May I ask what are you trying to achieve?

-Original Message-
From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 1:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Help Needed
Hey All

My Php App is trying to fopen() and fread() a File that is located in
the Web Server. This works if the file is a simple html file. However
the complicated  part is that the file is not displayed correctly i.e.
it has missing gifs if, it was created using Fireworks and then
subsequently exported as a html.
Any help will be highly appreciated
TIA
Pushpinder Singh Garcha
_
Web Architect
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Pushpinder Singh Garcha
_
Web Architect


RE: [PHP] Help Needed

2003-03-10 Thread Michael Roger C. Bianan
I agree with the security on files especially on case 
of downloadable files.

I suggest you use absolute paths for retrieving your files.

say ( http://www.a.com/pathofyourfile/ or 
simply the platform /home/user/htdocs/files/pathtoyourfile/)

Also, it's neat to have sorta config file on your scripts
to maintain the directory paths.

But oops, I maybe over acting here:)))

Yet, I'm sorry I'm not familiar with the MacOS Jag Platform,
but perhaps PNG files aren't compatible on that machine.

Thanks,

Miches

-Original Message-
From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 2:13 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Help Needed


Thanks for the prompt reply Michael

I am trying to protect files on the site, my script checks for a valid 
session ID and fopens() a File. This file is located in a different Dir 
from the php script. When the file is a simple html file , I can easily 
fopen() the file  (Even though it contains gifs)

The real problem arises is when this html file has been exported from 
Fireworks (I.E. .png file ) The resulting file shows many missing 
links wihen  I try to fread() the html file. Although the file is 
displayed fine when I point my Browser (Mozilla)
to it. I am testing on the MAC OS Jaguar Platform


Thanks again
--pS

On Tuesday, March 11, 2003, at 09:12 AM, Michael Roger C. Bianan wrote:

 Garcha,

 Kindly check your file paths.  When you export it, it may not point
 to what really is the real path online.

 May I ask what are you trying to achieve?

 -Original Message-
 From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 10, 2003 1:45 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Help Needed


 Hey All


 My Php App is trying to fopen() and fread() a File that is located in
 the Web Server. This works if the file is a simple html file. However
 the complicated  part is that the file is not displayed correctly i.e.
 it has missing gifs if, it was created using Fireworks and then
 subsequently exported as a html.

 Any help will be highly appreciated
 TIA

 Pushpinder Singh Garcha
 _
 Web Architect


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



Pushpinder Singh Garcha
_
Web Architect



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



[PHP] help needed with code!!

2003-03-10 Thread Karl James
Can anyone give me some pointers on why im note seeing 
Any output to the browser.

Thanks Karl


my link
http://66.12.3.67/webdb/webdb13/assignment_1.php

my code
http://nopaste.php-q.net/7560

ultimatefootballleague.com/index.php
[EMAIL PROTECTED]
 



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



Re: [PHP] help needed with code!!

2003-03-10 Thread Hugh Danaher
You might try changing ? to ?php and ? to php?
something about short tags
hugh
- Original Message - 
From: Karl James [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 10, 2003 10:14 PM
Subject: [PHP] help needed with code!!


 Can anyone give me some pointers on why im note seeing 
 Any output to the browser.
 
 Thanks Karl
 
 
 my link
 http://66.12.3.67/webdb/webdb13/assignment_1.php
 
 my code
 http://nopaste.php-q.net/7560
 
 ultimatefootballleague.com/index.php
 [EMAIL PROTECTED]
  
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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



[PHP] Help Needed

2003-03-06 Thread Pushpinder Singh Garcha
Hello All

I am writing again with reference to my dir Protection PHP script.

The scenario is explained below.

Whenever a user clicks a particular URL, it triggers a php file which 
first checks if the user's session exists or not. If the user's session 
exists, it should fopen() the particular file for him. My question is: 
after checking for the session, how does the php script know what file 
to open..meaning what file was linked by that URL.

Please help!



Pushpinder Singh Garcha
_
Web Architect : www.MasterStream.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Help needed - move_uploaded_file

2003-02-24 Thread David T-G
Hi!

...and then Fat Lizard said...
% 
% Hi,
% I'm trying to use move_uploaded_file, but so far with no success, no matter
% what I try.

Do you have register_globals turned on?

Did you really use input name='userfile' in your form code?

Are you sure that $userfile has a value?  What is it?

What if you turn things around a bit and run

  move_uploaded_file()
or die(Explanatory message $!\n) ;

to see if m_u_f() is complaining?


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] Help needed - please check site

2003-02-24 Thread Paul Godard
Hi

I am very new to dynamic web site (I am using GoLive6 on Mac together 
with php  mySQL) and I am very confused about variables.  I would 
appreciate your feedback on my first dynamic site 
http://www.vergelegen.co.za (Media section - login test - password 
test).

1/ There are quite a few things that don't work yet but the main 
issue is to use session variable to check if the Login_Name is 
authorize to browse the site and later on if it has admin access to 
update/delete records in the database.  I also want to pass the value 
of Login_Name from Search to EditProfile... How do I do that with 
Session Variables?

http://www.vergelegen.co.za/xDBMedia/AccessPassword/Login.php?First=1 
- http://www.vergelegen.co.za/xDBMedia/DBMedia/Search.php?First=1 -
http://www.vergelegen.co.za/xDBMedia/AccessPassword/EditProfile.php?Login_Name=test 
- ...

2/ My other concern is how do I secure the database?
--
Kind regards, Paul.

Gondwana
[EMAIL PROTECTED]
http://www.gondwanastudio.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Help needed - move_uploaded_file

2003-02-23 Thread Fat Lizard
Hi,
I'm trying to use move_uploaded_file, but so far with no success, no matter
what I try.
The file info. is loaded from a form via POST.
Here's the snippet that get's called:

:
  case(add_image):
 $res = mysql_query(select allowed_imgs,max_image_size,files_umask from
.$table_prefix.flags);
 list($allowed_types,$max_image_size,$files_umask) =
mysql_fetch_row($res);

 @umask((int)$files_umask);
 $image_name = @basename($image);
 if(@move_uploaded_file($userfile, $image_directory.$image_name))
 {
//if (chmod($random_image_directory.$image_name, 0644))
{
 mysql_query (insert into  . $table_prefix. randomimage_list
(file_name) values ('$image_name'););
}
 }
 else
:
:
$image_directory is defined elsewhere:
$image_directory = /randomimage/images/;


On error, the values echo out as, typically:

image = C:\\phpdev\\www\\images\\add.gif
image_name = add.gif
image_directory.image_name = c:\phpdev\www\randomimage\images\add.gif

Other 3rd party code I have 'uploads' correctly on the local server, and
also remote server.

What am I missing or overlooking?



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



[PHP] Help needed for submitting multiple files!

2003-02-10 Thread Geckodeep
I am building a page that submits an article with 9 jpgs images of 45 to
60ko in size.

I got it working with no problems for two to three files, until when I
tested with all nine images I saw the real problem, that wouldn't uploaded
it.

When I consulted with my service provider they said they have put a limit to
upload of 200ko per submit.

Here I am stuck with no real solution to this problem, except that I have
this idea of submitting the article by breaking it down in 3 steps and by
presenting three different forms which should be ok, but what will I do if
the person wanted to edit the article after having submitted e.g. to modify
the article later on.

How will I go fetching the article and presenting it in 3 steps, but this
time for update and taking it into consideration of the images stored in the
file and referenced in the db.


I am opened to all advice and suggestion.

Thanks again.
GD



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




[PHP] Help Needed

2003-02-04 Thread Pushpinder Singh Garcha
Hello All:

My question is related to authentication. I have made a login system 
using PHP Sessions and MySQL. Once the user gets authenticated on the 
website I want to be able to allow him to see some html pages on the 
website. Only users who have logged in are able to see such a files. I 
have asked this question before , but still I have some doubts.

My code will check for:


  if (session_is_registered($valid_user))
{
  /// display the reqd page
}


else {

DISPLAY ERROR MESSAGE and ASK USER TO LOGIN
}


How should I display the page ... the page has a lot of html code and 
trying to write echoblah  blah blah . ;
will not be a an option. Please suggest a way out .


Many Thanks
Pushpinder




Pushpinder Singh Garcha
_
Web Architect


Re: [PHP] Help Needed

2003-02-04 Thread Philip Olson
[snip]
 How should I display the page ... the page has a lot of html code and 
 trying to write echoblah  blah blah . ;
 will not be a an option. Please suggest a way out .

Use includes:
 http://www.php.net/include

And write HTML as HTML:

h3Greetings/h3
pHello b?php echo $username ?/b, we hope you 
enjoy this webpage./p

Or a little heredoc:
 
http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

Regards,
Philip


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




  1   2   >