[PHP] Re: [PHP-DB] auto_increment and INSERT INTO

2006-01-21 Thread Ron Piggott (PHP)
That is the function I was looking for. Thanks. Ron On Sat, 2006-01-21 at 23:47 -0500, [EMAIL PROTECTED] wrote: > Try: > >mysql_query("INSERT INTO table VALUES ('$variable_1', '$variable_2');"); > $auto_increment_variable = mysql_insert_id(); > ?> > > > -TG > > > > > = = = Original

[PHP] security of uploaded gif files

2006-01-21 Thread jonathan
what is the best way to prevent malicious code from being uploaded via a .gif file? A friend showed me how php could be embedded within the .gif file. Does this problem also exist for .jpeg's? thanks, jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

[PHP] Re: [PHP-DB] auto_increment and INSERT INTO

2006-01-21 Thread tg-php
Try: -TG = = = Original message = = = I have various tables where a column is set to auto_increment in my table structure. I have been using the following INSERT query format: INSERT INTO table VALUES ('$auto_increment_variable','$variable_1', '$variable_2') and then in applications wh

[PHP] XMPP Gateways

2006-01-21 Thread Jason Parkils
Can PHP interact with GoogleTalk like this bot built in ASP I think: - add the following user to your GTalk: [EMAIL PROTECTED] - send it a msg

[PHP] this is a test

2006-01-21 Thread Jason Parkils
this is a test

[PHP] testing

2006-01-21 Thread Jason Parkils

[PHP] proc_open and buffer limit?

2006-01-21 Thread Mark Krenz
I'm using PHP 5.1.1 on Apache 2.0.54 on Gentoo Linux. I've been trying to write a program to pass information to a program using proc_open, however when I do, it only passes the first 65536 bytes of the stream and then cuts off the rest. To make sure its not the program I'm trying to send to, I

Re: [PHP] what is the session equivalent to setcookie?

2006-01-21 Thread comex
> session_register("cookie[$food]", "$new $name"); $_SESSION['cookie'][$food] = "$new $name"; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Str to Int

2006-01-21 Thread Rick Emery
Quoting [EMAIL PROTECTED]: 3. if ($cardID = '' || is_int($cardID)) As someone mentioned, $cardID = '' makes an assignment, doesn't test for true/false. Change to $cardID == ''. And this statement SHOULD come up "true" as a whole because $cardID = '' should always be true (unless th

[PHP] Re: question about using $this as a method in a function argument

2006-01-21 Thread Bogdan Ribic
> > I have a question about using $this as an argument in a method. > As I understand it, the only issue here is if you are passing $this from constructor of your class from PHP 4. In short, when you do $var = new MyClass(); you are actually storing a copy of what constructor was seeing a

[PHP] Re: using sessions instead of cookie

2006-01-21 Thread James Benson
http://php.net/manual/en/ref.session.php Ross wrote: I have never used sessions before. How do I change the follow from COOKIES to SESSIONS in php (I do not know how to set a session)... At present the script uses an iframe with cookies but I believe if I use sessions I can leave out th

Re: [PHP] using sessions instead of cookie

2006-01-21 Thread tedd
I have never used sessions before. How do I change the follow from COOKIES to SESSIONS in php (I do not know how to set a session)... tedd -- http://sperling.com/ -- PHP General Mailing List (http://www.php.net

[PHP] anyone know a good php proxy

2006-01-21 Thread Geoff
Hi all, Does anyone know of (or have sample code for) a decent PHP proxy? All I need to do fetch webpages from a remote site, replace certain trigger text, then return them to the browser. However, the user's browser must only be aware of my proxy page - it shouldn't know where the pages are c

[PHP] using sessions instead of cookie

2006-01-21 Thread Ross
I have never used sessions before. How do I change the follow from COOKIES to SESSIONS in php (I do not know how to set a session)... At present the script uses an iframe with cookies but I believe if I use sessions I can leave out the iframe. http://www.ecurry.net/menu.phps http://www.ecurr

[PHP] what is the session equivalent to setcookie?

2006-01-21 Thread Ross
I have a cookie setcookie("cookie[$food]", "$new $name"); I want to change to a session.. Is it.. session_register("cookie[$food]", "$new $name"); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Determining number of days in a selected month

2006-01-21 Thread Geoff
Apart from using date("t", $month) you can also determine the last day of a month by getting the 0th day of the following month. Say I wanted to know the last day in Feb 2006: $mnth = 2; echo date("d",mktime(13,0,0,$mnth + 1, 0, 2006)); This is sometimes useful when you are calculating, or your