Fw: [PHP] Re: Excel Table download it

2003-11-25 Thread Larry_Li
header(Content-type: application/vnd.ms-excel); 
header(Content-Disposition: attachment; filename=report.xls); 

- Forwarded by Larry Li/APPLIED MATERIALS on 11/25/2003 03:40 PM -




Phillip Jackson [EMAIL PROTECTED]
11/25/2003 02:30 PM
 
To: [EMAIL PROTECTED]
cc: 
Subject:[PHP] Re: Excel Table  download it
 


excel can read html tables with partial formatting through stylesheets

output html tabletrtd tags and save the file as an *.xls file. i
redirect back to the file after writing to it - ie doesn't display it,
rather it prompts to download.

~phillip

Leon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
hi~

I want generate an excel table  download it as a file (not view in IE),
what HTML mimetype should i use?

leon
[EMAIL PROTECTED]
2003-11-24

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



Re: [PHP] Using JavaScript variables in PHP

2003-11-21 Thread Larry_Li
form method=post action=your_php_file.php
input name=id
/form

in your_php_file.php, try

select * from somedatabase where field=$id








Mike Knittel [EMAIL PROTECTED]
11/20/2003 11:45 PM
 
To: [EMAIL PROTECTED]
cc: 
Subject:[PHP] Using JavaScript variables in PHP
 


How does one go about using a JavaScript variable with PHP code.  I have a
function in JavaScript that takes a single input parameter (ID).  I want 
to
use this ID variable as the value on the where clause of a database query.

Example:  select * from somedatabase where field=ID

Can this be done, and if so how?  I have been unable to figure this out.

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




Re: [PHP] Variable Nightmare

2003-10-08 Thread Larry_Li
Yes. PHP supports this feature you need.
for loop $i
{
 $temp=value.$i;
 $myNewVar = $$temp;
}

Hope it help.







Ryan Thompson [EMAIL PROTECTED]
10/09/2003 01:38 PM
 
To: richard cook [EMAIL PROTECTED], 
[EMAIL PROTECTED]
cc: 
Subject:Re: [PHP] Variable Nightmare
 


The server probably has global variables turn off

Try $_GET['value1'], $_GET['value2']

If you using post method then replace $_GET with $_POST


On Thursday 09 October 2003 00:51, richard cook wrote:
 Hi all,
 I have a problem that I cant solve, any help would be welcomed!


 I have a form which is repeated by a for loop, the form has one element 
an
 input field. The problem im having is the name of this field for example
 ive used the following to name it:

 for loop here

 input name=value?php echo $x;? type=text size=4 maxlength=2
 value=?=$cart_Array[$x][1]? /

 }

 So the input name will increase with each loop like so:

 value1
 value2
 value3
 ...

 This works fine, the source code from the generated page looks as it
 should. So the big question is how do I get to the variable name when 
the
 form is processed, ive tried everything i know. if I use hard coding it
 works :

 $myNewVar = $value1;

 But the whole point of this is that the values need to be pulled out of
 another for loop:

 for loop blah
 $myNewVar = $valueX;
 }




 I hope im explaining this well.



 Regards

 R

-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
A computer scientist is someone who fixes
 things that aren't broken --Unknown

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




[PHP] How to connect ms sql server in linux apache+php?

2003-09-24 Thread Larry_Li
First I can't find something like mssql.so in extensions folder. BTW, I 
also need gd2.so. How could I get them back? Any easy way to connect ms 
sql server? I need migrate my site into linux apache server from win 2k 
IIS.

Thanks a lot,
Larry


[PHP] How to configure GD support in php on linux/apache?

2003-09-24 Thread Larry_Li
Could anybody show me how to configure it? Thanks!

Re: [PHP] ANY ONE ANSWER ME PLEASE !

2003-09-18 Thread Larry_Li
try cgi.force_redirect = Off.






nabil [EMAIL PROTECTED]
09/18/2003 05:28 PM
 
To: [EMAIL PROTECTED]
cc: 
Subject:[PHP] ANY ONE ANSWER ME PLEASE !
 


I m going to tear my hair off, I can not solve the problem.. with the 
stupid
IIS
i got the following error:

The specified CGI application misbehaved by not returning a complete set 
of
HTTP headers
in php.ini
cgi.rfc2616_headers = 1
cgi.force_redirect = 0

what should I do next ?

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




Re: [PHP] [PHP - MSSQL]: Problem with mssql_connect

2003-09-18 Thread Larry_Li
Change MS SQL SERVER Authentication's type to SQL Server and Windows 
instead of windows only.








Ongart Wongsanupa [EMAIL PROTECTED]
09/18/2003 04:25 PM
 
To: [EMAIL PROTECTED]
cc: 
Subject:[PHP] [PHP - MSSQL]: Problem with mssql_connect
 


Please help!...
I have to use 'apache+php' connect to MSSQL Server 2000 in Windows Server
2003, but there are problem.

Computer A: Windows Server 2003 Enterprise, MSSQL Server 2000 Enterprise,

Computer B: Windows XP Professional, Apache, php ( Web Server )

Computer A -- network - Computer B

I try to write php script such this..

mssql_connect('server','sa','');

but the result is:

***message: Login failed for user 'sa'. Reason: Not associated with a
trusted SQL Server connection. (severity 14) in ...***

Please help me find out the problem.. m(_ _)m
and sorry for my english language,

+ + + + + + + + + + + + + + + + + + +
[the thing that I did]...
1. I install client part from MSSQL Server CD Installer into Computer B
already and I'm sure for ntwdblib.dll or php_mssql.dll is newest version
that I can find..
2. I set Authentication in MSSQL Server to be 'SQL Server and Windows'
already
+ + + + [ but the problem still happen ] + +

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




Re: [PHP] SESSION variables losing data on WinXP?

2003-09-17 Thread Larry_Li
I believe all pages in your site are protected by session variables. Try 
to login first, then go where you want to go. Or try to remark codes which 
check your login status. 






Jami [EMAIL PROTECTED]
09/17/2003 03:52 PM
Please respond to listmail
 
To: PHP General [EMAIL PROTECTED]
cc: 
Subject:[PHP] SESSION variables losing data on WinXP?
 


I'm working on a project, and up until recently was using my hosting
account to do projects, but decided to update PHP on my comp to be able
to work on projects locally. I'm running WindowsXP, PHP 4.3.2, Apache
1.3, and MySQL 3.23.53. The validation page is called on each page, but
if I go to a page other than the entry page (which the validation page
takes you to when you first log in), it throws me back to the login
page. Has anyone run into this and have you solved it? Anyone have a
suggestion? Code is rather lengthy, if you want it I can send it off
list.
 

Jami Moore
LightSpark Digital Designs
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 http://www.lightsparkdigital.com/ http://www.lightsparkdigital.com/

 



Re: [PHP] SESSION variables losing data on WinXP?

2003-09-17 Thread Larry_Li
Did you open register_globals = On in php.ini?







Larry Li/CNTR/APPLIED [EMAIL PROTECTED]
09/17/2003 04:04 PM
 
To: [EMAIL PROTECTED]
cc: PHP General [EMAIL PROTECTED]
Subject:Re: [PHP] SESSION variables losing data on WinXP?
 


I believe all pages in your site are protected by session variables. Try 
to login first, then go where you want to go. Or try to remark codes which 

check your login status. 






Jami [EMAIL PROTECTED]
09/17/2003 03:52 PM
Please respond to listmail
 
To: PHP General [EMAIL PROTECTED]
cc: 
Subject:[PHP] SESSION variables losing data on WinXP?
 


I'm working on a project, and up until recently was using my hosting
account to do projects, but decided to update PHP on my comp to be able
to work on projects locally. I'm running WindowsXP, PHP 4.3.2, Apache
1.3, and MySQL 3.23.53. The validation page is called on each page, but
if I go to a page other than the entry page (which the validation page
takes you to when you first log in), it throws me back to the login
page. Has anyone run into this and have you solved it? Anyone have a
suggestion? Code is rather lengthy, if you want it I can send it off
list.
 

Jami Moore
LightSpark Digital Designs
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
 http://www.lightsparkdigital.com/ http://www.lightsparkdigital.com/

 




[PHP] SQL Query request is just hanging.

2003-08-27 Thread Larry_Li
I'm using IIS5.0 on W2k. I have upgraded w2k to sp4 and ms sql server to 
sp3. I created a new table and just do a simple query in php program. But 
it seems sql server doesn't return any query result. I'm using 
mssql_fetch_array() function, but no any return. PHP program is just 
pending there. I checked process info and found wait type is NETWORKIO. No 
problem for other existing queries. Only this new one. Almost got 
crazy

Any idea, Thanks a lot!

Larry


[PHP] Help! Unable to load DLLs.

2003-08-21 Thread Larry_Li
Got error message: Unable to load dynamic library 
'.\extension\php_mssql.dll' - The specified module could not be found.

I tried change php.ini many times, still got same error. I'm pretty sure 
these DLLs in such directory.

Any ideas, Thanks!



Re: [PHP] datetime

2003-08-21 Thread Larry_Li
Use date() and strtotime() together. strtotime will convert date string 
into integer timestamp. Still have any questions, check these two 
functions online plz.








Dale Hersh [EMAIL PROTECTED]
08/22/2003 10:13 AM
 
To: [EMAIL PROTECTED]
cc: 
Subject:[PHP] datetime
 



I am using a mssql database and I have a question regarding the datetime
type. When I write a date to the database it store the date in the 
following
format:
6/8/03

But when I extract the date from the database it returns the value in the
following format:
Jun 8 2003 12:00AM

Is there a nice function available in php that will format the date based
upon certain specification. I know that date() exists, but I that means I
would have to use mktime() which would require parsing the entire string 
and
breaking the string into the day, the month, the year. Furthermore, I 
would
then need a switch statement to convert the value Jun into the value 6.

I appreciate any help.

Thanks,
Dale



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




[PHP] Got failed while calling strtotime().

2003-08-17 Thread Larry_Li
I moved website from NT to W2K and got problem of date conversion. I'm
using MS SQL Server. In SQL Server, the data looks like 06/09/03. I got
06 9 2003 12:00AM in W2K and Jun 9 2003 12:00AM in NT. strtotime()
works ok on NT, but return -1 on W2K.

Any ideas? Thanks a lot!

Larry




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



Re: [PHP] Got failed while calling strtotime().

2003-08-17 Thread Larry_Li

I knew it's incorrect format. But why string from NT is correct? I don't
want to change source codes on website migration.



   
---
 
   

   To: [EMAIL PROTECTED]   

   cc: 

   Curt Zirzow Subject:  Re: [PHP] Got failed while 
calling strtotime().   
   [EMAIL PROTECTED] 
   
   08/18/03 11:45 AM   

   

   






* Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]):
 I moved website from NT to W2K and got problem of date conversion. I'm
 using MS SQL Server. In SQL Server, the data looks like 06/09/03. I got
 06 9 2003 12:00AM in W2K and Jun 9 2003 12:00AM in NT. strtotime()
 works ok on NT, but return -1 on W2K.

 Any ideas? Thanks a lot!


06 9 2003 12:00AM is not a valid date string.

see:
http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html



Curt
--
I used to think I was indecisive, but now I'm not so sure.

--
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] Using href as a submit for a form

2003-07-18 Thread Larry_Li

Try to use javascript.
a href=javascript:document.form1.submit()submit/a
Change form1 as your actual form name.




   
-
 
   
  
 To: [EMAIL PROTECTED] 
  
 cc:   
  
   Ron Allen   Subject:  [PHP] Using href as 
a submit for a form   
   [EMAIL PROTECTED] 
 
   07/18/03 03:47 PM   
  
   Please respond to Ron Allen   
  
   
  
   
  





I am using a form to submit to mysql.  What I would like to do is to use a
link to submit the form instead of the standard submit button.  Help is
appreicated.



--
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] numberformat

2003-07-14 Thread Larry_Li

printf(%02d, $integer); Use sprintf() if you want to save output.

Larry


   
---
 
   

   To: [EMAIL PROTECTED]   

   cc: 

   Harry.de  Subject:  [PHP] numberformat

   [EMAIL PROTECTED] 

   07/15/03 10:49 AM   

   

   






Is there a way, to define an integer number e.g. 7, to be defined as 07?
(Maybe with numberformat)

Harry



--
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] if ($xxxxx) { function not working?

2003-06-10 Thread Larry_Li

 if (!id  !edit)  - something wrong here.

Normally id0. if so, id=true. !id=false.

(false  anything) is false.

echo blah blah blah will never be executed.





   
---
 
   

   To: [EMAIL PROTECTED]   

   cc: 

   Ben Houlton   Subject:  [PHP] if ($x) { function 
not working? 
   [EMAIL PROTECTED] 

   06/10/03 02:12 PM   

   

   






When I use the if ($xxx) fuction to use the web addresses function to call
up a command it desnt work! All it does is come up with the command line
with:
 }else {
  if (!id  !edit) {
echo blah blah blah;
   }
}
 I'm using PWS and localhost//HPPAV server.
Please help!



--
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] Can't relocate to a specified URL after submit.

2003-03-13 Thread Larry_Li
The code looks like:
if( $actionflag == delete )
{
  //Delete Table ip_enrollment
  $query=delete from ip_enrollment where id='$id';
  $AMC_DB-query($query) or die(database server wasn't available
now.);

  //Delete Table ip_evaluation
  $query=delete from ip_evaluation where enrollmentID='$id';
  $AMC_DB-query($query) or die(database server wasn't available
now.);

  header( ip-list.php?subMenuSelect=m1);
}

It works fine before, but it seems header() doesn't work after I added some
js code for preventing click submit twice.

script language=JavaScript
!-- Copyright 2000 by William and Mari Bontrager.
counter = 0;
function count() {
counter++;
if(counter = 1)
  document.formname.submit();
} // --
/script

a href=javascript:count()
img border=0 src=images/ip_submit.gif/a


Thanks a lot,
Larry



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



Re: [PHP] Making a Loop.

2003-03-12 Thread Larry_Li

Where is $number assignment? Because $number is ZERO, your code will not
run any statements in loop statement.

Larry



   
---
 
   

   To: [EMAIL PROTECTED] 

   cc: 

   Philip J. Newman  Subject:  [PHP] Making a Loop.  

   [EMAIL PROTECTED] 

   03/12/03 04:20 PM   

   

   






I have this code to make this form list $x amount of times.

  for ($i = 1; $i = $number; $i++) {

  echoselect name=\$number\ size=\1\;

   // LIST ALL PRODUCTS IN DATABASE.

   $sql = SELECT * FROM products ORDER BY productCode ASC;
  $sql_result = mysql_query($sql, $connection) or die (Could not
get Query);

  while ($row = mysql_fetch_array($sql_result)) {

   $productCode=$row[productCode];
   echo option value=\$productCode\$productCode/optionbr;

   } // END WHILE.

 echo/select;


  }

and it dose not work any help?

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[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



Re: [PHP] recently I meet a problem as follow ,I want to ask you

2003-03-11 Thread Larry_Li

Sure. Could you paste your html codes  php codes here? I believe there are
a lot of nice guys are willing to help you. BTW, nice to meet you and hope
i could help you someway. I'm chinese too.

Larry



   
---
 
   

   To: [EMAIL PROTECTED]   

   cc: 

   jiahuo xiao Subject:  [PHP] recently I meet a 
problem as follow  ,I want to ask you 
   [EMAIL PROTECTED] 
  
   03/12/03 10:56 AM   

   

   






web master engineer:
recently I encounter a problem as follow  ,I want
to ask you
My system is windows xp sp1, now I set up Apache
server V1.3.27 as localhost server and download
PHP4.3,I have configured PHP as SAPI Module.it can
work correctly as common php file which example for
?phpinfo();?,it show many tables,it means I config
correctly.but why when I post pamameter to an action
page,all the pamaeter which I get is blank that is
.so the action page run incorrectly,how could I do?
thank you for replying me

_
Do You Yahoo!?

http://yahoo.eachnet.com/fu/co/rd.php?http://pages.eachnet.com/st/page/women/women.htm


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