[PHP] Re: Image Creation

2005-02-16 Thread James Taylor
Ahh now it becomes clear, you where trying to place the image inline. There is a way with base64 encoding, but it isnt supported by many browsers - you can actually say IMG SRC=data:image/png,base64;[...]; where the [...] is the base64 encoded image, so you would need to wrap an ob start and

[PHP] Re: Many forms in one php file

2005-02-15 Thread James Taylor
Nsk wrote: Hi I want to create a single php file which will be able to display multiple html forms. Like this: Form1 - Form2 - Form3. After the user completes and submits Form1, the script will process it and display a different form. etc... I am new to php, I would need some detailed

[PHP] Re: Image Creation

2005-02-15 Thread James Taylor
Dude - that works fine! can you check your code - make sure you havnt got any white space at all before the php starts in ANY file, and then check that you've got ALL erros being reported (because you might have the error cant send headers, output allready sent at line x) which will prenvent

Re: [PHP] Fatal Error Handling

2005-02-10 Thread James Taylor
snip -bash-2.05b$ php test.php Content-type: text/html X-Powered-By: PHP/4.3.10 Memory Limit: 32K Memory Used: 13432 Error (1024) in /www/l-i-e.com/web/test.php:12 - Test -bash-2.05b$ Note a complete lack of Made it nor an error message trapped by my error handler when the RAM runs out. :-(

[PHP] Fatal Error Handling

2005-02-09 Thread James Taylor
Hi, I have a set of functions which are potentially dangerous in terms of memory hogging, and need to protect from memory overflow - this is I want to detect when the memory overflow occurs. The manual says that eval() will return false on a fatal error, so I thought I could do something like

Re: [PHP] Fatal Error Handling

2005-02-09 Thread James Taylor
Richard Lynch wrote: James Taylor wrote: So finally quit that music thing and got a real job? :-) [Sorry. I'm sure you've heard them all, but I couldn't resist...] /me adds Richard Lynch onto the list of those who must die when the revolution comes... I have a set of functions which

[PHP] Ldap_Add driving me nuts

2003-03-11 Thread James Taylor
I'm having trouble with the ldap_add function in my script. There are 4 possible classes in the ldap schema that would be used - organization, person, qmailUser, inetOrgPerson. The ldap_add script will every time return LDAP-Errno: 65 LDAP-Error: Object class violation UNLESS I include data for

[PHP] Difference between

2003-03-07 Thread James Taylor
Ok, this may have already been posted to the list already, but the archives don't seem to like the and characters. I'm running into some code that looks like this: snip Define('INPUT', 2); snip if($search-level INPUT) $tmp.= $search-input(); Ok, what's the mean? As far as I could tell

RE: [PHP] Re: Difference between

2003-03-07 Thread James Taylor
Where can I read more about this? I'm not sure that I understand why 4 4 == 4. -Original Message- From: Greg Beaver [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 11:04 PM To: [EMAIL PROTECTED]; James Taylor Subject: [PHP] Re: Difference between Hi James, is a bit-wise

[PHP] Payflow Pro

2002-11-10 Thread James Taylor
Has anyone used the PHP functions to integrate with Payflow Pro? Before I fork out the cash to sign up for an account with them, I'd like to know how solid the SDK and integration is. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Restrict file access from web users?

2002-11-10 Thread James Taylor
Ok, I have something like this set up: 1. User logs into site. Authenticates through a mysql table which basically just has username/password columns. Session is set. 2. User goes through site looking for information he'd like to purchase based on specific fields. After the gathering of

RE: [PHP] Restrict file access from web users?

2002-11-10 Thread James Taylor
Thank you sir, problem solved :) -Original Message- From: Justin French [mailto:justin;indent.com.au] Sent: Sunday, November 10, 2002 11:21 PM To: James Taylor; [EMAIL PROTECTED] Subject: Re: [PHP] Restrict file access from web users? You still need to restrict the files from being

[PHP] Please Wait

2002-10-27 Thread James Taylor
Just curious if anyone out there knows how to do a Please wait type screen while the script is running in the background.. Like say PHP is doing a large select from a database, while the user waits for the script I'd like a graphic or something saying to wait... Any ideas? -- PHP General

[PHP] mysql_fetch_row options

2002-10-26 Thread James Taylor
There's got to be a better way to go about this: I am constantly doing mysql queries where I am doing a count(), so a sample query would be like this: select count(*) from database. I'm expecting only ONE value back exactly, and that's the count results. However, to get this data into a

[PHP] session_start... twice?

2002-10-25 Thread James Taylor
I have a single page site I'm working on that displays the contents of your current session. Users can clear the contents by clicking a link that triggers a $PHP_SELF?clear=1 - Before any headers are sent out, the script checks for $_GET['clear'], and if it's set, it does a session_destroy();.

[PHP] processing form checkboxes

2002-10-24 Thread James Taylor
Heya folks, not sure if this is more of a php question or an html question, though I'm right now leaning towards a 50% php, 50% html, so I think this is on topic still. I have a form filled with checkboxes, each representing one of the 50 states. A user can check as many states as they want,

[PHP] Regex

2002-04-22 Thread James Taylor
I'm trying to come up with a regular expression that will match the TL and Second Level domain names in someone's email address ONLY. So, say someone's address is [EMAIL PROTECTED], I need to match ONLY pacbell.net. It shouldn't matter what the address looks like, I'm looking for any number

[PHP] Connecting to multiple DB's

2002-04-01 Thread James Taylor
I host a few sites, and on usually each site will have it's own MySQL database in the background. I've decided that I want to link one site to another, and need to connect to more than one database at a time. I've found that when I try to connect to 2 or more, even if I assign the other

Re: [PHP] Getting user name in text area

2002-03-28 Thread James Taylor
Well, let's see here.. $query = mysql_query(select name from users where uid = {$_SESSION['uid']}, $db); while ($name = mysql_fetch_row($query) { echo BR /BR /BR /$name[0]\n; } hope that helps Jennifer Downey wrote: Hi all, Here is what I have and what I am trying to do. I would like

[PHP] Regex Form Filter Help

2002-03-27 Thread James Taylor
I have a site where users can type whatever they want in and it posts it to a database. I'm trying to eliminate whatever types of abuse I can think of, and, since I'm using nl2br on the posts, I'm afraid a user might just hold down enter for a couple of seconds and scroll everything off the

[PHP] preg_replace - regex for replace string

2002-03-27 Thread James Taylor
I'm trying to do something to the effect of this for a preg_replace statement: $string = Hello\n\n\n\n\n\n\nHow are you?\n\n\n\n\n\n\n\nHi; $string = preg_replace(/\n\n/, /\n/, $string); But, it appears the 'replace' portion of the function doesn't allow for regex. How can I do this so that

Re: [PHP] preg_replace - regex for replace string

2002-03-27 Thread James Taylor
This is just an example. There are some cases where I need the second option to be a regular expression, the same way that you can do in Perl regex... On Wednesday 27 March 2002 02:49 pm, you wrote: On Wed, 27 Mar 2002, James Taylor wrote: I'm trying to do something to the effect

Re: [PHP] preg_replace - regex for replace string

2002-03-27 Thread James Taylor
27 March 2002 02:53 pm, you wrote: This is just an example. There are some cases where I need the second option to be a regular expression, the same way that you can do in Perl regex... On Wednesday 27 March 2002 02:49 pm, you wrote: On Wed, 27 Mar 2002, James Taylor wrote: I'm trying

Re: [PHP] preg_replace - regex for replace string

2002-03-27 Thread James Taylor
Hm, nevermind my question :) I'm not thinking straight, not enough sleep. On Wednesday 27 March 2002 02:53 pm, you wrote: On Wed, 27 Mar 2002, James Taylor wrote: On Wednesday 27 March 2002 02:49 pm, you wrote: On Wed, 27 Mar 2002, James Taylor wrote: I'm trying to do something

[PHP] FAQ

2002-03-22 Thread James Taylor
Has anyone given any thought to possibly maintaining a FAQ containing the answers to the most commonly asked PHP questions on this list? I notice duplicates roll through every couple of days, and it would probably be a really nice PHP resource. Or, does one already exist? Ha. -- PHP General

Re: [PHP] FAQ

2002-03-22 Thread James Taylor
said, I think that you are saying a PHP Mailing List faq based on the q's that the mailing list gets, not the general PHP faq. Scott -Original Message- From: James Taylor [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 2:30 PM To: [EMAIL PROTECTED] Subject: [PHP] FAQ Has

Re: [PHP] IMAGE Manipulation

2002-03-22 Thread James Taylor
Hey, I'm not sure if anyone ever answered your question, but here's a little function I wrote for something similar to what you want to do and it doesn't require GD be installed. You need to modify the top portion, I just threw that in there to show you how it would work. $pic is the name of

Re: [PHP] FAQ

2002-03-22 Thread James Taylor
basis would be more helpful. On Friday 22 March 2002 12:05 pm, you wrote: I just don't see what the difference is. This is a PHP mailing list which supposedly gets questions about PHP. Why would the PHP FAQ not be the right place for this? -Rasmus On Fri, 22 Mar 2002, James Taylor wrote

[PHP] Guestbook previous 10/next 10

2002-03-21 Thread James Taylor
I have this sort of guest book that only will display 10 entries on the page at a time, after that you have the option of previous 10, and if you're not on the front page you also have next 10. I'm getting the ID of the VERY LAST POST listed on the page. So it's doing something like while

[PHP] More fun with sessions

2002-03-21 Thread James Taylor
How can I get a listing of all currently active sessions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Multiple Time Stamps

2002-03-06 Thread James Taylor
I'm working on a project for a friend of mine that is basically a web log. When he makes a post, it inserts the data into a MySQL database, and also inserts a timestamp which is data(g:ia) (shows hh:mm am/pm). It then just displays all of the posts with the timestamps underneath them. Well,

[PHP] Value of $_* variables

2002-03-05 Thread James Taylor
I'm sure this has been asked before, but at least not within the last 600 messages (i checked): I have the session variable $_SESSION['id'] set Well, I want to actually check the value of this variable, not just to check if it's set I would be doing this in a mysql query mainly Something

Re: [PHP] Re: Value of $_* variables

2002-03-05 Thread James Taylor
:) On Tuesday 05 March 2002 06:04 pm, you wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (James Taylor) wrote: $result = mysql_query(select user from users where id = $_SESSION['id], $db); That just doesn't work, so I have to first go: $sid = $_SESSION['id']; $result = mysql_query

[PHP] Re-Compiling PHP HELP

2002-03-04 Thread James Taylor
I'm trying to compile 412, and it just isn't happening I originally had 406 installed, I go to compile 412 and it just doesn't seem to be 'taking' the compile This is what I'm doing step by step: /configure --with-apache=/apache_1322 --with-mysql=/mysql/ --enable-track-vars

[PHP] Variables that can't be set by query string

2002-03-01 Thread James Taylor
I have a weblog type script I'm building for a friend where there are main posts then comments - Registered users can post comments, unregistered don't even have the option I was thinking of making a page where a user logs on, then it registers a session with a few variables like $sid,

[PHP] Form Annoyances

2002-02-27 Thread James Taylor
I'm having this one issue that's really bugging me - I have a textarea where you can type in something - After typing it in, it goes to another page asking you to verify, if it's correct, it inserts it into a database. The page that asks you to verify holds the value of the textbox in a hidden

[PHP] Guestbook question

2002-02-22 Thread James Taylor
I have a really simple guestbook that allows someone to post to the book, then it displays all the entries. Well, there are too many entries now for just one page and it looks kinda wacky, so I wanted to do something where it only displays 10 entries per page, then there are links for pages

Re: [PHP] Sendmail, I've had enough of it!

2002-02-22 Thread James Taylor
Ha, I shouldn't even bother posting this as it's pretty irrelevant for this list but... forget qmail, go with Postfix :) Qmail doesn't have one centralized config file, and it gets annoying having to edit this one, then this one, then make this file, etc. Plus, I usually try to avoid Dan

Re: [PHP] Reading the value in a cookie

2002-02-20 Thread James Taylor
http://www.php.net/manual/en/function.setcookie.php Also, read up on any other cookie related functions linked from that page. On Wednesday 20 February 2002 10:04 am, you wrote: Hello, I know how to set a cookie. How do I read the value of that cookie the next time that person returns to

Re: [PHP] preg_replace(/^\//.. doesnt work?

2002-02-20 Thread James Taylor
try: $a = preg_replace(/^\//, , $a); On Wednesday 20 February 2002 12:25 pm, you wrote: Im having a weird regexp problem in PHP that I think is correct but it doesnt appear to work. The code is this: $a = /test/; preg_replace(/^\//, , $a); echo $a; I want

Re: [PHP] Re: preg_replace(/^\//.. doesnt work?

2002-02-20 Thread James Taylor
Err, that's what he wanted On Wednesday 20 February 2002 12:13 pm, you wrote: Also note: ^ matches the beginning of the string, so ^\/ will only match a / at the beginning of the string (not the first occurence of /) -Original Message- From: Philip Hallstrom [mailto:[EMAIL

[PHP] INT function?

2002-02-20 Thread James Taylor
Just curious what the function is to convert x into an integer if it's a float Say for example I have something like this $x = 7; $y = 3; $z = $x / $y; I want $z to equal 2. In perl it would be $z = int($x / $y); I'm just not sure how to do this in PHP, as int apparently doesn't work

Re: [PHP] INT function?

2002-02-20 Thread James Taylor
Heh, that's interesting.. Only difference is you have to put parenthesis around int. Weird On Wednesday 20 February 2002 05:10 pm, you wrote: $z = (int)($x / $y); // should work or $z = $x / $y; settype($z, integer); -Original Message- From: James Taylor [mailto:[EMAIL

[PHP] Sessions

2002-02-14 Thread James Taylor
Speaking of sessions, I was wondering if something like this is even possible: Users log on, each has their own unique session.. Is it possible to do some sort of instant messaging deal with this? Like, on the main page is displays everyone that's logged on, then you maybe choose their name

[PHP] good practice

2002-02-14 Thread James Taylor
Can someone recommend a better method for doing something like the following? All of my programs are written like this, but it's really poor form considering I'm not predeclaring my variables, etc. Only thing I can really think of is to assign a value in the form a number like 1 or

Re: [PHP] Sessions

2002-02-14 Thread James Taylor
is sent(from the peer1 to server) is stored in db (or file) but have to stored somewhere till it is sent to the end user. Best regards, Andrey Hristov - Original Message - From: James Taylor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 9:02 PM Subject: [PHP