php-windows Digest 22 Aug 2002 02:00:46 -0000 Issue 1301
Topics (messages 15405 through 15436):
Apache...
15405 by: Brian McGarvie
15406 by: Rich Gray
15414 by: Seairth Jacobs
15415 by: Seairth Jacobs
15420 by: Brian McGarvie
First Timer
15407 by: Greg Luce
15423 by: David Hollister
Re: Comunications Port Accsess
15408 by: Piotr Pluciennik
15409 by: Svensson, B.A.T. (HKG)
Re: ADO & ODBC , for experts only
15410 by: Saci
15411 by: Svensson, B.A.T. (HKG)
15412 by: Saci
15424 by: Saci
Checkbox problem
15413 by: Kit Kerbel
15417 by: Ross Fleming
15419 by: Rich Gray
15421 by: Ignatius Reilly
Newbie: Setting content type
15416 by: Baz Langton
15418 by: Ross Fleming
15422 by: Baz Langton
15429 by: Ross Fleming
php.net down?
15425 by: Svensson, B.A.T. (HKG)
15426 by: Sandeep Murphy
15427 by: Ross Fleming
15428 by: Svensson, B.A.T. (HKG)
15430 by: Ross Fleming
15431 by: Svensson, B.A.T. (HKG)
15432 by: Svensson, B.A.T. (HKG)
15433 by: Ross Fleming
Javascript/PHP
15434 by: Kit Kerbel
text/string parsing question
15435 by: php.l1te.net
Cannot create dynamic images in PHP 4.2.2... :(
15436 by: Naveed Ahmad
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
What version of Apache is reccomened at present with PHP (cgi or isapi) to
run on a production webserver on windows?
--- End Message ---
--- Begin Message ---
Brian
FWIW I had major problems getting PHP to run with Apache 2.x on NT4.0 - I
had to revert back to v1.3.x ...
Rich
-----Original Message-----
From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2002 13:25
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Apache...
What version of Apache is reccomened at present with PHP (cgi or isapi) to
run on a production webserver on windows?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I agree. I have seen several mentions that PHP 4.3 should have greatly
improved support for Apache2. However, I would stick with 1.3.x until it
has been released and shown to be stable. :)
---
Seairth Jacobs
[EMAIL PROTECTED]
"Rich Gray" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Brian
>
> FWIW I had major problems getting PHP to run with Apache 2.x on NT4.0 - I
> had to revert back to v1.3.x ...
>
> Rich
> -----Original Message-----
> From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
> Sent: 21 August 2002 13:25
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Apache...
>
>
> What version of Apache is reccomened at present with PHP (cgi or isapi) to
> run on a production webserver on windows?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Oh. And use the SAPI (Apache module) version if you can. This provides
better performance over the CGI version and allows you to do some things
that the CGI version cannot (such as adding relative paths after the script
itself).
---
Seairth Jacobs
[EMAIL PROTECTED]
"Seairth Jacobs" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I agree. I have seen several mentions that PHP 4.3 should have greatly
> improved support for Apache2. However, I would stick with 1.3.x until it
> has been released and shown to be stable. :)
>
> ---
> Seairth Jacobs
> [EMAIL PROTECTED]
>
>
> "Rich Gray" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Brian
> >
> > FWIW I had major problems getting PHP to run with Apache 2.x on NT4.0 -
I
> > had to revert back to v1.3.x ...
> >
> > Rich
> > -----Original Message-----
> > From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
> > Sent: 21 August 2002 13:25
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Apache...
> >
> >
> > What version of Apache is reccomened at present with PHP (cgi or isapi)
to
> > run on a production webserver on windows?
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
--- End Message ---
--- Begin Message ---
when's php4.3 likley to appear?
"Seairth Jacobs" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I agree. I have seen several mentions that PHP 4.3 should have greatly
> improved support for Apache2. However, I would stick with 1.3.x until it
> has been released and shown to be stable. :)
>
> ---
> Seairth Jacobs
> [EMAIL PROTECTED]
>
>
> "Rich Gray" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Brian
> >
> > FWIW I had major problems getting PHP to run with Apache 2.x on NT4.0 -
I
> > had to revert back to v1.3.x ...
> >
> > Rich
> > -----Original Message-----
> > From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
> > Sent: 21 August 2002 13:25
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Apache...
> >
> >
> > What version of Apache is reccomened at present with PHP (cgi or isapi)
to
> > run on a production webserver on windows?
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
--- End Message ---
--- Begin Message ---
Can someone give me a short rundown of what I need to do to get started
running php on my windows server? I'm a CF'er by trade, but I have a
working set of code that I need to set up on a development server for
migration to CF.
--- End Message ---
--- Begin Message ---
1) Have a configured web server (e.g. IIS, Apache)
2) Get the PHP engine (download from php.net)
3) Setup and configure PHP with specific web server requirements according
to the documentation included with PHP download
-----Original Message-----
From: Greg Luce [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 21, 2002 7:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] First Timer
Can someone give me a short rundown of what I need to do to get started
running php on my windows server? I'm a CF'er by trade, but I have a
working set of code that I need to set up on a development server for
migration to CF.
--- End Message ---
--- Begin Message ---
Hi,
you've developed the electronic output board, so
probably you've got also software to control it and
probably it is also your own :-)
I've never used serial ports in my php apps, so what I
can suggest is: try to make a COM object to control
your serial port and access this COM object from php.
To know more about COM in php see the manual - chapter
VIII, "COM support functions for Windows".
HTH
Piotr
--- Adam Horden <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> I devloped a general purpose output board from the
> serial port. This will
> allow me to do anything I wanted to do. My idea was
> If i could code it in a
> website based languages I could control the
> interface any where!
>
> I am unning a 2k advance server running on wundows
> with apache 2 and php
> latest. I am running mySQL also. There is 20gigs of
> space 128mB of memory.
> Just fought giveing you the specs might help.
>
> I wanted to know if there was any way I can control
> the serial port from
> php?
>
> I have looked at a few sites and looked in all my
> books but there dosent
> seem to be anything documented.
>
> Thanks,
> Adam
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
--- End Message ---
--- Begin Message ---
> I wanted to know if there was any way I can control the serial port from
> php?
If php supports the CreateFile() function found in the Win32 API
[does it?], then you should be able to read and write to the
serial port.
--- End Message ---
--- Begin Message ---
Yes that's the idea I try to show , And I need to discover how to surpass
the 254 chars limit
I guess that the solution is to use append chunk, but I'm triyng to use
that methode without sucess
Look for the 2 folowing codes one in asp and another in php, I tried to
make both codes as identical as possible, the asp one work perfect , the
php does not give any error but don't append the new record.
I'm very near to be crazy, I'm figthing with a simple memo updated for more
than a week, and nobody helped on this matter until now, I hope you can give
some tips.
The asp code
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
</HEAD>
<BODY>
Pagina de teste
<%
Set oConn = Server.CreateObject("ADODB.connection")
oConn.Open "Driver=Microsoft Visual FoxPro Driver;
SourceType=DBf;SourceDB=c:\;BackgroundFetch=No;"
set Rs = server.CREATEOBJECT("ADOR.Recordset")
Rs.cursortype = 1 'adOpenKeyset
Rs.cursorlocation = 2 'adUseServer
Rs.locktype = 3 'adLockOptimistic
Rs.OPEN "select * from memotest",oConn
part1 = string(254,"A")
part2 = string(254,"B")
part3 = string(254,"C")
Rs.AddNew
rs.Fields("ID")="0001"
Rs.Fields("Memo1").AppendChunk(part1)
Rs.Fields("Memo1").AppendChunk(part2)
Rs.Fields("Memo1").AppendChunk(part3)
Rs.UPDATE
RS.Requery
Do While Not RS.EOF
Response.Write cstr(RS(0))
Response.Write cstr(RS(1))
RS.MoveNext
Loop
rs.Close
oconn.Close
set oconn = nothing
set rs = nothing
%>
</BODY>
</HTML>
The php Code
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
</HEAD>
<BODY>
Pagina de teste
<?php
$oConn = new COM("ADODB.Connection") or die ("connection create fail");;
$oConn->Open("Driver=Microsoft Visual FoxPro Driver;
SourceType=DBf;SourceDB=c:\;BackgroundFetch=No;") ;
$Rs = new COM("ADOR.Recordset");
$Rs->cursortype = 1 ;//'adOpenKeyset
$Rs->cursorlocation = 2; //'adUseServer
$Rs->locktype = 3 ;//'adLockOptimistic
$Rs->Open('select * from memotest',$oConn);
$part1 = str_repeat('A',254);
$part2 = str_repeat('B',254);
$part3 = str_repeat('C',254);
$Rs->AddNew;
$Rs->fields["ID"]->value = '0001';
$Rs->fields["Memo1"]->AppendChunk($part1);
$Rs->fields["Memo1"]->AppendChunk($part2);
$Rs->fields["Memo1"]->AppendChunk($part3);
$Rs->update;
$Rs->Requery;
while (!$Rs->EOF){
echo $Rs->fields["ID"]->value.' ' ;
echo $Rs->fields["MEMO1"]->value ;
$Rs->movenext(); }
$Rs->Close;
$oConn->Close;
$oConn = null;
$Rs = null;
?>
</BODY>
</HTML>
And the Table structure
Structure for table: C:\MEMOTEST.DBF
Number of data records: 8
Date of last update: 08/21/02
Memo file block size: 64
Code Page: 1252
Field Field Name Type Width Dec Index Collate
Nulls
1 ID Character 5
No
2 MEMO1 Memo 4
No
** Total ** 10
Subject: RE: [PHP-WIN] ADO & ODBC , for experts only
> A long shot:
>
> The only essential different I can see at a fast glance is the
> length of the string repeat.
>
> It might be that the string becomes truncated in the third statement.
> Try to execute a string that is 200 bytes in total length, and then
> expand it to 300, if you gets and error if you execute the second
> statement then you know what the fault depends on.
>
--- End Message ---
--- Begin Message ---
> Yes that's the idea I try to show , And I need to discover how to surpass
> the 254 chars limit
Why didn't you say so in the first place then?
> I guess that the solution is to use append chunk, but I'm triyng to use
> that methode without sucess
I have no problem executing "appended" chunks of ~128kb over ODBC in C++.
> Look for the 2 folowing codes one in asp and another in php, I tried to
> make both codes as identical as possible, the asp one work perfect , the
> php does not give any error but don't append the new record.
Is this another problem you have, induced by the first one?
> I'm very near to be crazy, I'm figthing with a simple memo updated for more
> than a week, and nobody helped on this matter until now, I hope you can give
> some tips.
Have you check the local settings such that a string
length limitation does not interfere with your script?
--- End Message ---
--- Begin Message ---
To void any matter regarding string size I changed the str_repeat to 2 (
also the asp similar one),.
And the problem still the same even with small strings. Asp runs perfectly ,
php runs and don't show any error but does not include the new record with
the new data.
I'm thinking about some kind of PHP bug, because I can use this logic in asp
/ C /VB only with php does not work
Have you , any code in php who use AppendChunk ?
Do you see any error on my php code ?
> Have you check the local settings such that a string
> length limitation does not interfere with your script?
--- End Message ---
--- Begin Message ---
I used sqllog to trace the problem , I don't know why but the line
$Rs->AddNew; do nothing on php.
While insert a record on ASP.
Mistery ?
--- End Message ---
--- Begin Message ---
I have a page that lists entries made by users in the database. There are
three types of entries. Each type of entry is stored in their own table.
My problem is this: I want people to be able to click a checkbox next to
any of the entries and press a delete button and delete those entries. The
only hang up is that the delete button works as a submit button and sends
the checkbox arrays as post variables to the next page and I'm trying to
figure out a way to send another post variable when you click delete.
something like my_listings?delete=true.
not sure how, or if you can even do this with a submit button. I also have
three other buttons on this page that do different things when pressed to
the boxes checked. I tried using
onclick="<?$_SESSION["delete"]="true";?>" in the delete(submit) button but
for some reason, this session variable is also set when I click the other
buttons as well, I guess because they are submit buttons too? If you can
make sense of any of this, maybe you can help.
Thanx in advance,
Kit
//this is what I do if the variable is set
// **Marking Listings as Deleted
if($_SESSION["delete"]=="true")
{
if(isset($_REQUEST["horse"]))
{
foreach($_REQUEST["horse"] as $value)
{
odbc_exec($connection, "UPDATE tblHorse SET dDeleted = 1 where
dHorseID =
'".$value."'");
}
}
if(isset($_REQUEST["trailer"]))
{
foreach($_REQUEST["trailer"] as $value)
{
odbc_exec($connection, "UPDATE tblTrailer SET dDeleted = 1
where
dTrailerID = '".$value."'");
}
}
if(isset($_REQUEST["tack"]))
{
foreach($_REQUEST["tack"] as $value)
{
odbc_exec($connection, "UPDATE tblTack SET dDeleted = 1 where
dTackID =
'".$value."'");
}
}
}
unset($_SESSION["method"]);
//This is how i'm trying to set the variable
<input type="image" src="images/button_activate.gif" width="114" height="19"
border="0" >
<input type="image" src="images/button_sold.gif" width="114" height="19"
border="0" >
<input type="image" src="images/button_renew.gif" width="114" height="19"
border="0" >
<input type="image" src="images/button_delete.gif" width="114" height="19"
border="0" onclick="<?$_SESSION["delete"]="true";?>"></td>
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--- End Message ---
--- Begin Message ---
You sound a little confused as to how php works... Specifically the line
onclick="<?$_SESSION["delete"]="true";?>"
This is ALWAYS going to be executed, and before the user even clicks this
button. When the user visits the page, php will set this session variable
to "true" (incidently as a rule of thumb, use =1 instead of ="true", it's
quicker to evaluate later) and THEN generate the html page, which will only
show:
onclick=""
since the php code gets evaluated but no output is given. Since this
variable is now set, it makes no difference which button is pressed.
Fault picking over! :) The solution:
You can give each submit button a different name, uniquely identifying which
button is pressed, like so:
<FORM METHOD=POST ACTION="handle_input.php">
<INPUT of various types>....
....
...
<!-- Here's the important bit -->
<INPUT TYPE=SUBMIT NAME=delete value="Delete Selected">
<INPUT TYPE=SUBMIT NAME=add value="Add items">
<INPUT TYPE=SUBMIT NAME=submit value="Submit Form">
</FORM>
As you can see, each will produce a unique value in the $_POST array. If
they click the "Delete Selected" button, then the variable $_POST['delete']
will now contain "Delete Selected", but it is only necessary to test that
this variable is set and not empty. ie
<?
if (!empty($_POST['delete']) {
// the code that deletes stuff
exit();
}
if (!empty($_POST['add']) {
// I think you get it now ;)
}
?>
Ross
> -----Original Message-----
> From: Kit Kerbel [mailto:[EMAIL PROTECTED]]
> Sent: 21 August 2002 15:41
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Checkbox problem
>
>
> I have a page that lists entries made by users in the database.
> There are
> three types of entries. Each type of entry is stored in their
> own table.
> My problem is this: I want people to be able to click a checkbox next to
> any of the entries and press a delete button and delete those
> entries. The
> only hang up is that the delete button works as a submit button and sends
> the checkbox arrays as post variables to the next page and I'm trying to
> figure out a way to send another post variable when you click delete.
> something like my_listings?delete=true.
> not sure how, or if you can even do this with a submit button. I
> also have
> three other buttons on this page that do different things when pressed to
> the boxes checked. I tried using
> onclick="<?$_SESSION["delete"]="true";?>" in the delete(submit)
> button but
> for some reason, this session variable is also set when I click the other
> buttons as well, I guess because they are submit buttons too?
> If you can
> make sense of any of this, maybe you can help.
>
> Thanx in advance,
> Kit
>
>
> //this is what I do if the variable is set
> // **Marking Listings as Deleted
> if($_SESSION["delete"]=="true")
> {
> if(isset($_REQUEST["horse"]))
> {
> foreach($_REQUEST["horse"] as $value)
> {
> odbc_exec($connection, "UPDATE tblHorse SET
> dDeleted = 1 where dHorseID =
> '".$value."'");
> }
> }
> if(isset($_REQUEST["trailer"]))
> {
> foreach($_REQUEST["trailer"] as $value)
> {
> odbc_exec($connection, "UPDATE tblTrailer
> SET dDeleted = 1 where
> dTrailerID = '".$value."'");
> }
> }
> if(isset($_REQUEST["tack"]))
> {
> foreach($_REQUEST["tack"] as $value)
> {
> odbc_exec($connection, "UPDATE tblTack SET
> dDeleted = 1 where dTackID =
> '".$value."'");
> }
> }
>
> }
> unset($_SESSION["method"]);
>
>
> //This is how i'm trying to set the variable
> <input type="image" src="images/button_activate.gif" width="114"
> height="19"
> border="0" >
> <input type="image" src="images/button_sold.gif" width="114" height="19"
> border="0" >
> <input type="image" src="images/button_renew.gif" width="114" height="19"
> border="0" >
> <input type="image" src="images/button_delete.gif" width="114"
> height="19"
> border="0" onclick="<?$_SESSION["delete"]="true";?>"></td>
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
Can you not give the buttons different names and test $_POST['buttonname']
in the next script?
e.g.
1.php
===
<input type="submit" name="delete" value="Delete!" title="Click to delete">
<input type="submit" name="amend" value="Amend!" title="Click to amend">
2.php
====
if (isset($_POST['delete'])) {
// Do deletes
}
if (isset($_POST['amend'])) {
// Do amends
}
etc etc
-----Original Message-----
From: Kit Kerbel [mailto:[EMAIL PROTECTED]]
Sent: 21 August 2002 15:41
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Checkbox problem
I have a page that lists entries made by users in the database. There are
three types of entries. Each type of entry is stored in their own table.
My problem is this: I want people to be able to click a checkbox next to
any of the entries and press a delete button and delete those entries. The
only hang up is that the delete button works as a submit button and sends
the checkbox arrays as post variables to the next page and I'm trying to
figure out a way to send another post variable when you click delete.
something like my_listings?delete=true.
not sure how, or if you can even do this with a submit button. I also have
three other buttons on this page that do different things when pressed to
the boxes checked. I tried using
onclick="<?$_SESSION["delete"]="true";?>" in the delete(submit) button but
for some reason, this session variable is also set when I click the other
buttons as well, I guess because they are submit buttons too? If you can
make sense of any of this, maybe you can help.
Thanx in advance,
Kit
//this is what I do if the variable is set
// **Marking Listings as Deleted
if($_SESSION["delete"]=="true")
{
if(isset($_REQUEST["horse"]))
{
foreach($_REQUEST["horse"] as $value)
{
odbc_exec($connection, "UPDATE tblHorse SET dDeleted = 1 where
dHorseID =
'".$value."'");
}
}
if(isset($_REQUEST["trailer"]))
{
foreach($_REQUEST["trailer"] as $value)
{
odbc_exec($connection, "UPDATE tblTrailer SET dDeleted = 1
where
dTrailerID = '".$value."'");
}
}
if(isset($_REQUEST["tack"]))
{
foreach($_REQUEST["tack"] as $value)
{
odbc_exec($connection, "UPDATE tblTack SET dDeleted = 1 where
dTackID =
'".$value."'");
}
}
}
unset($_SESSION["method"]);
//This is how i'm trying to set the variable
<input type="image" src="images/button_activate.gif" width="114" height="19"
border="0" >
<input type="image" src="images/button_sold.gif" width="114" height="19"
border="0" >
<input type="image" src="images/button_renew.gif" width="114" height="19"
border="0" >
<input type="image" src="images/button_delete.gif" width="114" height="19"
border="0" onclick="<?$_SESSION["delete"]="true";?>"></td>
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
One form will always post the same set of POST variables (sometimes a partial set, as
when a checkbox is not checked, the variable is not passed)
So the best way is to add hidden fields to your form, and manipulate then in
javascript, like in this example (several submit buttons, corresponding to different
actions: "save under current name", "save under other name", etc.)
<INPUT type="hidden" name="selector" value="">
<INPUT type="submit" name="submit" value="Save changes" onClick="javascript:save()">
<SCRIPT language="JavaScript">
function save() {
document.update_form.selector.value = "update" ;
document.update_form.selector.submit() ;
}
function save_as() {
document.update_form.selector.value = "save_as" ;
document.update_form.selector.submit() ;
}
...
And your script at the end of the action="" will take different actions depending on
the value of $_POST['selector']
HTH
Ignatius Reilly
--------------------------------------------------------------------------------
----- Original Message -----
From: Kit Kerbel
To: [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 4:40 PM
Subject: [PHP-WIN] Checkbox problem
I have a page that lists entries made by users in the database. There are
three types of entries. Each type of entry is stored in their own table.
My problem is this: I want people to be able to click a checkbox next to
any of the entries and press a delete button and delete those entries. The
only hang up is that the delete button works as a submit button and sends
the checkbox arrays as post variables to the next page and I'm trying to
figure out a way to send another post variable when you click delete.
something like my_listings?delete=true.
not sure how, or if you can even do this with a submit button. I also have
three other buttons on this page that do different things when pressed to
the boxes checked. I tried using
onclick="<?$_SESSION["delete"]="true";?>" in the delete(submit) button but
for some reason, this session variable is also set when I click the other
buttons as well, I guess because they are submit buttons too? If you can
make sense of any of this, maybe you can help.
Thanx in advance,
Kit
//this is what I do if the variable is set
// **Marking Listings as Deleted
if($_SESSION["delete"]=="true")
{
if(isset($_REQUEST["horse"]))
{
foreach($_REQUEST["horse"] as $value)
{
odbc_exec($connection, "UPDATE tblHorse SET dDeleted = 1 where dHorseID =
'".$value."'");
}
}
if(isset($_REQUEST["trailer"]))
{
foreach($_REQUEST["trailer"] as $value)
{
odbc_exec($connection, "UPDATE tblTrailer SET dDeleted = 1 where
dTrailerID = '".$value."'");
}
}
if(isset($_REQUEST["tack"]))
{
foreach($_REQUEST["tack"] as $value)
{
odbc_exec($connection, "UPDATE tblTack SET dDeleted = 1 where dTackID =
'".$value."'");
}
}
}
unset($_SESSION["method"]);
//This is how i'm trying to set the variable
<input type="image" src="images/button_activate.gif" width="114" height="19"
border="0" >
<input type="image" src="images/button_sold.gif" width="114" height="19"
border="0" >
<input type="image" src="images/button_renew.gif" width="114" height="19"
border="0" >
<input type="image" src="images/button_delete.gif" width="114" height="19"
border="0" onclick="<?$_SESSION["delete"]="true";?>"></td>
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
How do I set the content type to text/xml?? I have a small php script which
queries a database and returns the results as an xml document. However the
flash application is not parsing the xml correctly and I believe it is
because the response is in text/html.
I've tired the following:-
<?php header("Content-type: text/xml ");
phpinfo();
?>
But this gives me the following error:-
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then
click the Refresh button, or try again later.
----------------------------------------------------------------------------
--
Required white space was missing. Error processing resource
'http://localhost/php%20test/info.php'. Line 1, Position 63
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Any help wouild be appreicated as I'm completely new to php.
Cheers,
Baz
--- End Message ---
--- Begin Message ---
There must be a problem in your xml code that you are generating then.
header("Content-type: text/xml"); is indeed how you set the content type to
an xml page, as your test shows. The problem being is that phpinfo()
generates an html document, not an xml one. The error you got was explorer
telling you that it expected an xml doc but didn't receive one
Ross
> -----Original Message-----
> From: Baz Langton [mailto:[EMAIL PROTECTED]]
> Sent: 21 August 2002 16:13
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Newbie: Setting content type
>
>
> How do I set the content type to text/xml?? I have a small php
> script which
> queries a database and returns the results as an xml document. However the
> flash application is not parsing the xml correctly and I believe it is
> because the response is in text/html.
>
> I've tired the following:-
>
> <?php header("Content-type: text/xml ");
> phpinfo();
> ?>
>
> But this gives me the following error:-
>
> The XML page cannot be displayed
> Cannot view XML input using style sheet. Please correct the
> error and then
> click the Refresh button, or try again later.
>
>
> ------------------------------------------------------------------
> ----------
> --
>
> Required white space was missing. Error processing resource
> 'http://localhost/php%20test/info.php'. Line 1, Position 63
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>
>
>
>
>
> Any help wouild be appreicated as I'm completely new to php.
>
> Cheers,
>
> Baz
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
So why does the following code:-
<?php
header("Content-type: text/xml ");
$doc = domxml_new_doc("1.0");
$rootNode = $doc -> create_element("TEST");
$NewNode = $doc -> append_child($rootNode);
?>
OR
<?php
header("Content-type: text/xml ");
$doc = domxml_new_doc("1.0");
$root = $doc->add_root("QUIZ");
$NewNode = $doc -> append_child($rootNode);
?>
produce the following error:-
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then
click the Refresh button, or try again later.
----------------------------------------------------------------------------
--
XML document must have a top level element. Error processing resource
'http://localhost/php%20test/info.php'.
"Ross Fleming" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> There must be a problem in your xml code that you are generating then.
>
> header("Content-type: text/xml"); is indeed how you set the content type
to
> an xml page, as your test shows. The problem being is that phpinfo()
> generates an html document, not an xml one. The error you got was
explorer
> telling you that it expected an xml doc but didn't receive one
>
> Ross
>
> > -----Original Message-----
> > From: Baz Langton [mailto:[EMAIL PROTECTED]]
> > Sent: 21 August 2002 16:13
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Newbie: Setting content type
> >
> >
> > How do I set the content type to text/xml?? I have a small php
> > script which
> > queries a database and returns the results as an xml document. However
the
> > flash application is not parsing the xml correctly and I believe it is
> > because the response is in text/html.
> >
> > I've tired the following:-
> >
> > <?php header("Content-type: text/xml ");
> > phpinfo();
> > ?>
> >
> > But this gives me the following error:-
> >
> > The XML page cannot be displayed
> > Cannot view XML input using style sheet. Please correct the
> > error and then
> > click the Refresh button, or try again later.
> >
> >
> > ------------------------------------------------------------------
> > ----------
> > --
> >
> > Required white space was missing. Error processing resource
> > 'http://localhost/php%20test/info.php'. Line 1, Position 63
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> >
> >
> >
> >
> >
> > Any help wouild be appreicated as I'm completely new to php.
> >
> > Cheers,
> >
> > Baz
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
--- End Message ---
--- Begin Message ---
Because that's not an xml document. By defining content-type: text/xml, you
are telling any webbrowser to expect an xml document, and then not
delivering one.
The sample code you've sent doesn't generate any output whatsoever, try it
from the command line and see.
Ross
> -----Original Message-----
> From: Baz Langton [mailto:[EMAIL PROTECTED]]
> Sent: 21 August 2002 16:30
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Newbie: Setting content type
>
>
> So why does the following code:-
>
> <?php
> header("Content-type: text/xml ");
> $doc = domxml_new_doc("1.0");
> $rootNode = $doc -> create_element("TEST");
> $NewNode = $doc -> append_child($rootNode);
> ?>
>
> OR
>
> <?php
> header("Content-type: text/xml ");
> $doc = domxml_new_doc("1.0");
> $root = $doc->add_root("QUIZ");
> $NewNode = $doc -> append_child($rootNode);
> ?>
>
> produce the following error:-
>
> The XML page cannot be displayed
> Cannot view XML input using style sheet. Please correct the
> error and then
> click the Refresh button, or try again later.
>
>
> ------------------------------------------------------------------
> ----------
> --
>
> XML document must have a top level element. Error processing resource
> 'http://localhost/php%20test/info.php'.
>
>
>
>
>
>
>
>
> "Ross Fleming" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > There must be a problem in your xml code that you are generating then.
> >
> > header("Content-type: text/xml"); is indeed how you set the
> content type
> to
> > an xml page, as your test shows. The problem being is that phpinfo()
> > generates an html document, not an xml one. The error you got was
> explorer
> > telling you that it expected an xml doc but didn't receive one
> >
> > Ross
> >
> > > -----Original Message-----
> > > From: Baz Langton [mailto:[EMAIL PROTECTED]]
> > > Sent: 21 August 2002 16:13
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-WIN] Newbie: Setting content type
> > >
> > >
> > > How do I set the content type to text/xml?? I have a small php
> > > script which
> > > queries a database and returns the results as an xml document. However
> the
> > > flash application is not parsing the xml correctly and I believe it is
> > > because the response is in text/html.
> > >
> > > I've tired the following:-
> > >
> > > <?php header("Content-type: text/xml ");
> > > phpinfo();
> > > ?>
> > >
> > > But this gives me the following error:-
> > >
> > > The XML page cannot be displayed
> > > Cannot view XML input using style sheet. Please correct the
> > > error and then
> > > click the Refresh button, or try again later.
> > >
> > >
> > > ------------------------------------------------------------------
> > > ----------
> > > --
> > >
> > > Required white space was missing. Error processing resource
> > > 'http://localhost/php%20test/info.php'. Line 1, Position 63
> > >
> > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> > >
> > >
> > >
> > >
> > >
> > > Any help wouild be appreicated as I'm completely new to php.
> > >
> > > Cheers,
> > >
> > > Baz
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
Is it my network or the php.net network?
[c:\sysapps\4nt302]ping www.php.net
Pinging php.net [64.246.30.37] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
[c:\sysapps\4nt302]
???
--- End Message ---
--- Begin Message ---
not ur network.. php.net is down...
sands
portugal
-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
Sent: quarta-feira, 21 de Agosto de 2002 17:37
To: Php Win32 list
Subject: [PHP-WIN] php.net down?
Is it my network or the php.net network?
[c:\sysapps\4nt302]ping www.php.net
Pinging php.net [64.246.30.37] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
[c:\sysapps\4nt302]
???
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Logic dictates that the entire network isn't down, since this mail is
getting through ;) however the website does appear to be down.
Ross
> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
> Sent: 21 August 2002 17:37
> To: Php Win32 list
> Subject: [PHP-WIN] php.net down?
>
>
> Is it my network or the php.net network?
>
> [c:\sysapps\4nt302]ping www.php.net
>
> Pinging php.net [64.246.30.37] with 32 bytes of data:
>
> Request timed out.
> Request timed out.
> Request timed out.
> Request timed out.
>
> [c:\sysapps\4nt302]
>
> ???
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
Logic does not dictate anything here, since a natural language
can't be mapped in a 1-1 fashion onto a formal language.
> -----Original Message-----
> From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 21, 2002 6:39 PM
> To: Svensson, B.A.T. (HKG); Php Win32 list
> Subject: RE: [PHP-WIN] php.net down?
>
>
> Logic dictates that the entire network isn't down, since this mail is
> getting through ;) however the website does appear to be down.
>
> Ross
>
> > -----Original Message-----
> > From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
> > Sent: 21 August 2002 17:37
> > To: Php Win32 list
> > Subject: [PHP-WIN] php.net down?
> >
> >
> > Is it my network or the php.net network?
> >
> > [c:\sysapps\4nt302]ping www.php.net
> >
> > Pinging php.net [64.246.30.37] with 32 bytes of data:
> >
> > Request timed out.
> > Request timed out.
> > Request timed out.
> > Request timed out.
> >
> > [c:\sysapps\4nt302]
> >
> > ???
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Ah well, depends on your definition of "the php.net network"... ;) I would
happily assume that this would be both www.php.net and lists.php.net. If it
is safe to assume that by php.net, you included www.php.net as a subset of
php.net, it is also safe to assume that lists.php.net is a subset of
php.net. Since we know that lists.php.net works, we can say that php.net is
not broken. However we can say that www.php.net IS broken. :D
However, it is never safe to assume, since when we do so, we make an "ass"
out of "u" and "me" ;)
Cheers
Ross
> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
> Sent: 21 August 2002 17:45
> To: Ross Fleming; Php Win32 list
> Subject: RE: [PHP-WIN] php.net down?
>
>
> Logic does not dictate anything here, since a natural language
> can't be mapped in a 1-1 fashion onto a formal language.
>
> > -----Original Message-----
> > From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 21, 2002 6:39 PM
> > To: Svensson, B.A.T. (HKG); Php Win32 list
> > Subject: RE: [PHP-WIN] php.net down?
> >
> >
> > Logic dictates that the entire network isn't down, since this mail is
> > getting through ;) however the website does appear to be down.
> >
> > Ross
> >
> > > -----Original Message-----
> > > From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
> > > Sent: 21 August 2002 17:37
> > > To: Php Win32 list
> > > Subject: [PHP-WIN] php.net down?
> > >
> > >
> > > Is it my network or the php.net network?
> > >
> > > [c:\sysapps\4nt302]ping www.php.net
> > >
> > > Pinging php.net [64.246.30.37] with 32 bytes of data:
> > >
> > > Request timed out.
> > > Request timed out.
> > > Request timed out.
> > > Request timed out.
> > >
> > > [c:\sysapps\4nt302]
> > >
> > > ???
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
> Ah well, depends on your definition of "the php.net network"... ;) I would
> happily assume that this would be both www.php.net and lists.php.net. If it
> is safe to assume that by php.net, you included www.php.net as a subset of
> php.net, it is also safe to assume that lists.php.net is a subset of
> php.net.
> Since we know that lists.php.net works, we can say that php.net is
> not broken.
No, you can't say that
You are still basing all your conclusion on an assumption (even two maybe
but I can't bother to do the analysis right now), hand have still not yet
proven the conclusion from the assumption being true. That is: it is only
true under the assumption, but not elsewhere: until proven to be true.
> However we can say that www.php.net IS broken. :D
Well, according to my ping, all we can say is that ICMP request does not get
an answer back. Weather no answer was sent or an answer was sent but didn't
reach me, we cant say anything about: according to logic. ;)
> However, it is never safe to assume, since when we do so, we make an "ass"
> out of "u" and "me" ;)
That's a point to. ;)
--- End Message ---
--- Begin Message ---
Definitely!!!!!!!!! (Hehehe)
> -----Original Message-----
> From: [CENSURE]
> Sent: Wednesday, August 21, 2002 6:58 PM
> To: Svensson, B.A.T. (HKG)>
>
> Is Ross retarded?
>
> -----Original Message-----
> From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 21, 2002 11:55 AM
> To: Svensson, B.A.T. (HKG); Php Win32 list
> Subject: RE: [PHP-WIN] php.net down?
>
> Ah well, depends on your definition of "the php.net network"... ;) I would
> happily assume that this would be both www.php.net and lists.php.net. If it
> is safe to assume that by php.net, you included www.php.net as a subset of
> php.net, it is also safe to assume that lists.php.net is a subset of
> php.net. Since we know that lists.php.net works, we can say that php.net is
> not broken. However we can say that www.php.net IS broken. :D
>
> However, it is never safe to assume, since when we do so, we make an "ass"
> out of "u" and "me" ;)
>
--- End Message ---
--- Begin Message ---
Cheeky gits. Especially the cowardly person who had to be censored... ;)
Ross
> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
> Sent: 21 August 2002 18:08
> To: Php Win32 list
> Cc: Ross Fleming
> Subject: RE: [PHP-WIN] php.net down?
>
>
> Definitely!!!!!!!!! (Hehehe)
>
> > -----Original Message-----
> > From: [CENSURE]
> > Sent: Wednesday, August 21, 2002 6:58 PM
> > To: Svensson, B.A.T. (HKG)>
> >
> > Is Ross retarded?
> >
> > -----Original Message-----
> > From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 21, 2002 11:55 AM
> > To: Svensson, B.A.T. (HKG); Php Win32 list
> > Subject: RE: [PHP-WIN] php.net down?
> >
> > Ah well, depends on your definition of "the php.net network"...
> ;) I would
> > happily assume that this would be both www.php.net and
> lists.php.net. If it
> > is safe to assume that by php.net, you included www.php.net as
> a subset of
> > php.net, it is also safe to assume that lists.php.net is a subset of
> > php.net. Since we know that lists.php.net works, we can say
> that php.net is
> > not broken. However we can say that www.php.net IS broken. :D
> >
> > However, it is never safe to assume, since when we do so, we
> make an "ass"
> > out of "u" and "me" ;)
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
I have a javascript function that I am passing a group of checkboxes to.
The purpose of the js is to check/uncheck all of the boxes for various
operations to be performed on all of them at the same time. That said, the
function used to work perfectly when the name of the checkbox group was as
simple as:
<input type="checkbox" name="somename"...
now I am using the php method of:
<input type="checkbox" name="somename[]"...
the js does not like "somename[]" being passed in as a parameter. Any ideas
as to how to pass that to the js correctly?
Thanx,
Kit
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--- End Message ---
--- Begin Message ---
Hello,
I'm writing a program that parses out data contained in one large text
file, each page separated by a control char. I explode() the data by the
control char into an array, then I'm inserting them in MySQL by a client
number and a page number. As of now, I've just been counting down
characters by substr ($page, startchar, length to grab) and it seems to
work for most of the pages.
The problem is that it the data I index by does not always occur the same
number of characters down the $page variable. I.e., the name line2 on the
right is not always filled out or is a different length:
-=-=-=-
yada yada yada yada yada yada name line 1
blankline name line 2
blankline
blankline
my name client number page no
my address
my address
my city my state my zip
and so forth...
-=-=-=-
I'd like to be able to do something more like this:
in $page, on line 5 chars 40-95 is $indexme
I tried explode()ing the $page by "\n" and it wouldn't work.
Any suggestions?
Thanks in advance.
-shad
"You are old," said the youth, "as I mentioned before,
And make errors few people could bear;
You complain about everyone's English but yours --
Do you really think this is quite fair?"
"I make lots of mistakes," Father William declared,
"But my stature these days is so great
That no critic can hurt me -- I've got them all scared,
And to stop me it's now far too late."
--- End Message ---
--- Begin Message ---
Ive installed PHP 4.2.2 on IIS 5 on win2k server...
Problem is I cannot make the gd liberary 2 work, When I create an image script, I get
garbage values, not error[Ive alrady enabled the gd liberary in php.ini]. Plz tell me
whats wrong, should I replace php_gd.dll. If so where can I replace it??? I tried
http://www.boutell.com/gd but there is gd for PHP 4.0.4 & its not compatable with my
PHP 4.2.2 & there4 get the error "Cannot load the dll..."
Plz help me solve this problem..
Thanx
Naveed Ahmad
--- End Message ---