php-windows Digest 9 Oct 2002 02:28:52 -0000 Issue 1378
Topics (messages 16248 through 16265):
Refreshing page
16248 by: Radovan Radic
Re: odbc_fetch_array function
16249 by: Uttam
16257 by: Pascal
Page has expired
16250 by: Radovan Radic
Re: [PHP] Deleting multiple items from database using checkboxes
16251 by: Davy Obdam
16253 by: 1LT John W. Holmes
ODBC connection parameters
16252 by: Douglas F. Keim
16254 by: Douglas F. Keim
16255 by: Douglas F. Keim
Where can I get php_odbc.dll
16256 by: Douglas F. Keim
How to detect the language of the user?
16258 by: Aitor
16260 by: Dash McElroy
API modules not matching
16259 by: Nino V
postmaster+AEA-bol.net.in
16261 by: Nino V
Creating files with PHP - need help
16262 by: Sviss
Re: [EMAIL PROTECTED]
16263 by: Mikey
Re: +AFs-PHP-WIN+AF0- postmaster+AEA-bol.net.in
16264 by: Nino V
=array within html table=
16265 by: Anthony Ritter
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 ---
Hi
I have a form and buttons insert, update, delete with input boxes.
Method is post , action $PHP_SELF (php 4.0.6+MSSQL)
When user presses insert button then i have
action=$PHP_SELF&operation=insert&name=SomeName&lname=
&SomeLName&...
After submit it all goes well and data are inserted into the table.
But when i am testing this page and click refresh i guess that same date
will be inserted one more time, or updated or deleted depending on the
opeartion.
How can i prevent this ?
Thanks
Radovan
--- End Message ---
--- Begin Message ---
trying different values of cursor type in the connect function may help:
odbc_connect (string dsn, string user, string password [, int cursor_type])
permitted values are:
SQL_CUR_USE_IF_NEEDED
SQL_CUR_USE_ODBC
SQL_CUR_USE_DRIVER
SQL_CUR_DEFAULT
however, i was not able to get the odbc_num_rows() function to work
properly, it will not give correct value until i fetch all the rows using
odbc_fetch_row() function
i am using odbc to access Access database on win98 system.
can someone give me a clue on this?
regds,
regds,
-----Original Message-----
From: Matt Kynaston [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 08, 2002 16:25
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] odbc_fetch_array function
Check out the user notes at:
http://www.php.net/manual/en/function.odbc-fetch-array.php
One includes a workaround if you're using a version where it doesn't
exist.
Matt
> -----Original Message-----
> From: SEGUERRA FRANCIS TED ARANAS
> [mailto:[EMAIL PROTECTED]]
> Sent: 08 October 2002 05:31
> To: Pascal S.
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] odbc_fetch_array function
>
>
> what database are you using? that problem is a database
> connection from
> your php to your db. i have been using the same as your for a
> couple of
> months but i have no problem since my db is placed on my cygwin.its a
> postgresql db.
>
> On Thu, 3 Oct 2002, Pascal S. wrote:
>
> > I have version 4.2.3 of PHP installed on a Windows server.
> >
> > I am new to PHP. I did find the function
> > array odbc_fetch_array ( resource result [, int rownumber])
> > in the documentation, but it doesn't seem implemented in
> the version that I
> > use.
> >
> > Do you know what I did wrong?
> >
> > Thanks,
> >
> > Pascal
> >
> >
> >
> >
>
> --
> ov3rr|d3r
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Thanks for your message. The database on which I ran the query which result I am
trying to fetch with this function is Pervasive 7. However, the PHP parser does not
recognize the function name, so I don't believe the issue is with the db.
Even on the php.net site, the function is not documented
(http://www.php.net/manual/en/function.odbc-fetch-array.php). I still haven't found
out why it doesn't seem to be implemented in the PHP version that I am using.
Pascal
>what database are you using? that problem is a database connection from
>your php to your db. i have been using the same as your for a couple of
>months but i have no problem since my db is placed on my cygwin.its a
>postgresql db.
--- End Message ---
--- Begin Message ---
Hello
When i have javascript code history.go(-1) and i need to go back to the php
page, i get errors page has expired.
What should i do?
Radovan
--- End Message ---
--- Begin Message ---
Hi John,
I have done this now but it gives an error message : Warning: Bad
arguments to implode() in C:\Program Files\Apache
Group\Apache2\htdocs\davy\guestbook2002\functions.php on line 318
It seems like the array $dele is empty to me, but i am not sure. This is
my code
//Make query
$ids = "'" . implode("','",$dele) . "'";
$sql_query ="DELETE FROM guestbook2002 WHERE entryID in ($ids)";
//Send query
$sql_id = mysql_query($sql_query, $link) or die("error in query");
And in my form i have this line:
<input type=\"checkbox\" name=\"dele[]\" value=\"".$sql['entryID']."\">
Do u know why and do u know a solution?
Thanks already for your time.
Best regards,
Davy Obdam,
mailto:[EMAIL PROTECTED]
You wrote:
I think someone already mentioned this, but you can also do this:
if(isset($dele) && count($dele) > 0)
{
$ids = "'" . implode("','",$dele) . "'";
$sql = "delete from gastenboek where entryID IN ($ids)";
$result = mysql_query($sql);
}
might want to add in a is_array() somewhere in there...
---John Holmes...
--- End Message ---
--- Begin Message ---
Yeah, $dele is probably empty. That's why the original code had a
count($dele) in it to make sure there were elements there. You could use
is_array() in combination with that, too.
---John Holmes...
----- Original Message -----
From: "Davy Obdam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Php-Windows Mailing"
<[EMAIL PROTECTED]>
Sent: Tuesday, October 08, 2002 11:07 AM
Subject: RE: [PHP-WIN] RE: [PHP] Deleting multiple items from database using
checkboxes
> Hi John,
>
> I have done this now but it gives an error message : Warning: Bad
> arguments to implode() in C:\Program Files\Apache
> Group\Apache2\htdocs\davy\guestbook2002\functions.php on line 318
>
> It seems like the array $dele is empty to me, but i am not sure. This is
> my code
>
> //Make query
> $ids = "'" . implode("','",$dele) . "'";
> $sql_query ="DELETE FROM guestbook2002 WHERE entryID in ($ids)";
> //Send query
> $sql_id = mysql_query($sql_query, $link) or die("error in query");
>
> And in my form i have this line:
>
> <input type=\"checkbox\" name=\"dele[]\" value=\"".$sql['entryID']."\">
>
> Do u know why and do u know a solution?
>
> Thanks already for your time.
>
> Best regards,
>
> Davy Obdam,
> mailto:[EMAIL PROTECTED]
>
>
> You wrote:
> I think someone already mentioned this, but you can also do this:
>
> if(isset($dele) && count($dele) > 0)
> {
> $ids = "'" . implode("','",$dele) . "'";
> $sql = "delete from gastenboek where entryID IN ($ids)";
> $result = mysql_query($sql);
> }
>
> might want to add in a is_array() somewhere in there...
>
> ---John Holmes...
>
>
>
--- End Message ---
--- Begin Message ---
I am trying to connect to an ODBC database that is not Access nor MSSQL. I
have the ODBC entry done and have tested the connections within the ODBC
manager.
I noticed that a connection within PHP begins with $Link, but I can't seem
to find the values for the rest of the statement.
for Mysql it goes something like this -- $Link = mysql_connect.
I need to figure out what mysql_connect should be replaced with. The only
reference that I found was mssql_odbc.
I also know that Mysql and ODBC support is built into PHP, so maybe this is
easier that I think.
Anyone help me?
--- End Message ---
--- Begin Message ---
OK - found it. odbc_connect.
But now I am looking for a db_query and there is none for odbc.
I can do the $Query ok but can't seem to find.
"Douglas F. Keim" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am trying to connect to an ODBC database that is not Access nor MSSQL.
I
> have the ODBC entry done and have tested the connections within the ODBC
> manager.
>
> I noticed that a connection within PHP begins with $Link, but I can't seem
> to find the values for the rest of the statement.
>
> for Mysql it goes something like this -- $Link = mysql_connect.
>
> I need to figure out what mysql_connect should be replaced with. The only
> reference that I found was mssql_odbc.
>
> I also know that Mysql and ODBC support is built into PHP, so maybe this
is
> easier that I think.
>
> Anyone help me?
>
>
--- End Message ---
--- Begin Message ---
I was trying to just run the connect statement and see if it would just
connect and got this message.
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified, SQL state IM002 in SQLConnect in
c:\inetpub\wwwroot\dbconnect.php on line 16
"Douglas F. Keim" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am trying to connect to an ODBC database that is not Access nor MSSQL.
I
> have the ODBC entry done and have tested the connections within the ODBC
> manager.
>
> I noticed that a connection within PHP begins with $Link, but I can't seem
> to find the values for the rest of the statement.
>
> for Mysql it goes something like this -- $Link = mysql_connect.
>
> I need to figure out what mysql_connect should be replaced with. The only
> reference that I found was mssql_odbc.
>
> I also know that Mysql and ODBC support is built into PHP, so maybe this
is
> easier that I think.
>
> Anyone help me?
>
>
--- End Message ---
--- Begin Message ---
I can't find it anywhere.
--- End Message ---
--- Begin Message ---
How can I detect the language of the users that visit my web so I can redirect them?
--- End Message ---
--- Begin Message ---
Use the variable: $_SERVER["HTTP_ACCEPT_LANGUAGE"] and redirect from
there. Look at a phpinfo() screen and it will tell you what language
your browser is. I'm not sure what codes you'll need to know about but
my english language'd mozilla returns "en-us, en;q=0.50".
-Dash
On Tue, 8 Oct 2002, Aitor wrote:
> How can I detect the language of the users that visit my web so I can redirect them?
--- End Message ---
--- Begin Message ---
Hi,
I've installed php4 on Win2k, then I've installed EasyPhp.
Now at starting of EasyPhp I receive the following message:
----------------------
PHP Warning: cybercash: Unable to initialize module
Module compiled with module API=20010901, debug=0, thread-safety=1
PHP compiled with module API=20020429, debug=0, thread-safety=1
These options need to match
in Unknown on line 0
---------------------------------
All seems to work fine, but how could I fixe this problem?
Thanks very much,
Nino
=================================
http://www.vessella.it (italiano, esperanto, kiswahili, english)
http://www.changamano.org (Iniziative di solidarietà per la Tanzania)
Corso di lingua swahili: http://corsoswahili.vessella.net
Corso di lingua esperanto: http://esperanto.vessella.net
Jifunze lugha ya Kiesperanto: http://kiesperanto.vessella.net
Kamusi/Vortaro: http://kamusi.vessella.net
Vocabolario esperanto-italiano: http://vortaro.vessella.net
--- End Message ---
--- Begin Message ---
Hi,
who knows why everytime I send a message to the list I receive the following
message?
----- Original Message -----
From: +ADw-postmaster+AEA-bol.net.in+AD4-
To: +ADw-nino+AEA-vessella.it+AD4-
Sent: Tuesday, October 08, 2002 9:54 PM
Subject: Re: +AFs-PHP-WIN+AF0- API modules not matching
+AD4- Mail not delivered to subroto+AEA-bol.net.in. The mailbox of the user has
exceeded the allotted limit.
+AD4-Try sending later.
Thanks,
Nino
--- End Message ---
--- Begin Message ---
Hi NG.
I'm having problems creating files at a certain location.
If I attemt to create a file it gets created in the rootdir (htdocs) even
though I add a path infront of the file name. I've tried severel ways of
adding a path but nothing works.
eksample: "/nef/articles/54.txt"
File 54.txt gets created but not at the intented location, instead it gets
created in htdocs.
Can anyone help me by telling me how I'm suppose to do this?
I'm running PHP on Win98 with Apache.
~ Sviss
--- End Message ---
--- Begin Message ---
Just one of those things you'll have to live with I'm afraid - I have tried mailing
the postmaster as I am sure others have but have as yet received no reply :(
regards,
Mikey
+AD4- -----Original Message-----
+AD4- From: Nino V +AFs-mailto:nino+AEA-vessella.it+AF0-
+AD4- Sent: 08 October 2002 21:10
+AD4- To: php-windows+AEA-lists.php.net
+AD4- Cc: php-windows-owner+AEA-lists.php.net
+AD4- Subject: +AFs-PHP-WIN+AF0- postmaster+AEA-bol.net.in
+AD4-
+AD4-
+AD4- Hi,
+AD4- who knows why everytime I send a message to the list I receive
+AD4- the following
+AD4- message?
+AD4-
+AD4- ----- Original Message -----
+AD4- From: +ADw-postmaster+AEA-bol.net.in+AD4-
+AD4- To: +ADw-nino+AEA-vessella.it+AD4-
+AD4- Sent: Tuesday, October 08, 2002 9:54 PM
+AD4- Subject: Re: +AFs-PHP-WIN+AF0- API modules not matching
+AD4-
+AD4-
+AD4- +AD4- Mail not delivered to subroto+AEA-bol.net.in. The mailbox of the user has
+AD4- exceeded the allotted limit.
+AD4- +AD4-Try sending later.
+AD4-
+AD4- Thanks,
+AD4- Nino
+AD4-
+AD4-
+AD4- --
+AD4- PHP Windows Mailing List (http://www.php.net/)
+AD4- To unsubscribe, visit: http://www.php.net/unsub.php
+AD4-
+AD4-
+AD4-
+AD4-
--- End Message ---
--- Begin Message ---
Thanks, Mikey.
I've tried to write to php-windows-owner+AEA-list.php.net, but the confirmation
was refused+ACE-
Well, I'll add that to those things I have to live with....
Bye,
Nino
----- Original Message -----
From: +ACI-Mikey+ACI- +ADw-mikey+AEA-splatted.net+AD4-
To: +ACI-Nino V+ACI- +ADw-nino+AEA-vessella.it+AD4AOw-
+ADw-php-windows+AEA-lists.php.net+AD4-
Cc: +ADw-php-windows-owner+AEA-lists.php.net+AD4-
Sent: Tuesday, October 08, 2002 11:02 PM
Subject: RE: +AFs-PHP-WIN+AF0- postmaster+AEA-bol.net.in
Just one of those things you'll have to live with I'm afraid - I have tried
mailing the postmaster as I am sure others have but have as yet received no
reply :(
regards,
Mikey
+AD4- -----Original Message-----
+AD4- From: Nino V +AFs-mailto:nino+AEA-vessella.it+AF0-
+AD4- Sent: 08 October 2002 21:10
+AD4- To: php-windows+AEA-lists.php.net
+AD4- Cc: php-windows-owner+AEA-lists.php.net
+AD4- Subject: +AFs-PHP-WIN+AF0- postmaster+AEA-bol.net.in
+AD4-
+AD4-
+AD4- Hi,
+AD4- who knows why everytime I send a message to the list I receive
+AD4- the following
+AD4- message?
+AD4-
+AD4- ----- Original Message -----
+AD4- From: +ADw-postmaster+AEA-bol.net.in+AD4-
+AD4- To: +ADw-nino+AEA-vessella.it+AD4-
+AD4- Sent: Tuesday, October 08, 2002 9:54 PM
+AD4- Subject: Re: +AFs-PHP-WIN+AF0- API modules not matching
+AD4-
+AD4-
+AD4- +AD4- Mail not delivered to subroto+AEA-bol.net.in. The mailbox of the user has
+AD4- exceeded the allotted limit.
+AD4- +AD4-Try sending later.
+AD4-
+AD4- Thanks,
+AD4- Nino
+AD4-
+AD4-
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I'd like to have the record data - $current - *within* the html table but if
I run this script it is on a line outside of the table:
....................................
<?
$content =
file("http://waterdata.usgs.gov/ny/nwis/uv?format=rdb&period=1&site_no=01427
510");
array_pop($content);
$current = array_pop($content);
print("<table border=1>");
print("<tr><td>USGS</td><td>Station</td><td>Date</td><td>Time</td><td>Height
</td><td>CFS</td><td>Temperature</td>");
print("</table>");
print($current);
?>
...............................
...and if I run this script, the record - $current - is outside above the
table - not within it.
<?
$content =
file("http://waterdata.usgs.gov/ny/nwis/uv?format=rdb&period=1&site_no=01427
510");
array_pop($content);
$current = array_pop($content);
print("<table border=1>");
print("<tr><td>USGS</td><td>Station</td><td>Date</td><td>Time</td><td>Height
</td><td>CFS</td><td>Temperature</td>");
print($current);
print("</table>");
?>
.................................
Any help would be greatly appreciated.
Tony Ritter
--- End Message ---