Search found 35 matches

by JeffG
Wed Feb 16, 2011 7:35 am
Forum: PHP - Code
Topic: Spurious character in email sent with mail()
Replies: 2
Views: 131

Re: Spurious character in email sent with mail()

It made no difference. A weird anomaly, but something I can live with. Thanks anyway.
by JeffG
Fri Feb 11, 2011 3:53 pm
Forum: PHP - Code
Topic: Spurious character in email sent with mail()
Replies: 2
Views: 131

Spurious character in email sent with mail()

I have the following code which sends an email to the maintainer (who happens to be me :) ):             // Compose and send the email             $headers = "From: $mail_from_address"."\r\n";             $headers .= "Reply-To: $mail_from_address"."\r\n";     ...
by JeffG
Thu Jul 30, 2009 12:59 pm
Forum: PHP - Code
Topic: How to force multiple sessions?
Replies: 4
Views: 191

Re: How to force multiple sessions?

OK, that explains something, thanks. It's a function of the browser, not the system it's running on. If I run one user in Firefox and the other in Internet Explorer, it works as I want it, but not both in the same browser. So that's all I need for local testing purposes. I was a bit puzzled, because...
by JeffG
Thu Jul 30, 2009 10:56 am
Forum: PHP - Code
Topic: How to force multiple sessions?
Replies: 4
Views: 191

How to force multiple sessions?

I seem to have a fundamental misconception of how sessions work, although I have been coding with them apparently successfully until I found out something today. At the start of each php script, I have the following:   session_cache_limiter("nocache"); session_start();   $self    = $_SERVE...
by JeffG
Fri Jul 10, 2009 4:13 pm
Forum: Databases
Topic: Character set problems
Replies: 2
Views: 385

Re: Character set problems

Thanks. I'll do some more reading around this.
by JeffG
Fri Jul 10, 2009 5:25 am
Forum: Databases
Topic: Character set problems
Replies: 2
Views: 385

Character set problems

I have a WAMP system. If I enter a £ sign in a text box (browser set to Western ISO 8859-1), when I view the MySQL record in a command window, the character is displayed as ú. If I change the character in the record to £, I see an œ character in the text box. If I change the browser to UTF-8, I get ...
by JeffG
Tue Jun 09, 2009 10:10 am
Forum: PHP - Code
Topic: Does anybody here know PHP GD?
Replies: 15
Views: 2027

Re: Does anybody here know PHP GD?

I hesitate to point this out, since that looks really great, but you might want to fix a typo in the text: You have 'Ect' instead of 'Etc.'.
by JeffG
Wed May 27, 2009 5:53 am
Forum: PHP - Code
Topic: $_SERVER[] Command and Page Linking
Replies: 8
Views: 209

Re: $_SERVER[] Command and Page Linking

Just an aside: do Linux systems have Arial and Trebuchet fonts? There is no fallback specified.
by JeffG
Tue May 26, 2009 1:45 pm
Forum: PHP - Code
Topic: if no result problem
Replies: 12
Views: 224

Re: if no result problem

Well, I wouldn't claim to be an expert either! However, when things go wrong there are a few basic things to try to find out what the problem is. I hope I've shared some of them here. Glad it's all working for you now :)
by JeffG
Tue May 26, 2009 8:51 am
Forum: PHP - Code
Topic: if no result problem
Replies: 12
Views: 224

Re: if no result problem

OK. I put in some connection code which worked (ie no sql error): Proof? I don't see any tests on the return from mysql_connect and mysql_select_db. And any reason for using mysql_pconnect instead of mysql_connect? I've not used mysql_pconnect myself, so don't know what additional benefits it bring...
by JeffG
Tue May 26, 2009 4:18 am
Forum: PHP - Code
Topic: if no result problem
Replies: 12
Views: 224

Re: if no result problem

First off, when you used count(*), the query (if it worked) would always return exactly 1 row, containing the value of count(*) which would be the number of records it found. However, the query is not working for some reason which is why the mysql_query is returning false. Try changing your code to ...
by JeffG
Thu May 07, 2009 5:48 am
Forum: PHP - Code
Topic: Using array_diff
Replies: 2
Views: 79

Re: Using array_diff

Many thanks! How simple is that?
by JeffG
Thu May 07, 2009 4:44 am
Forum: PHP - Code
Topic: Using array_diff
Replies: 2
Views: 79

Using array_diff

I find the documentation for array_diff and all its variants pretty confusing. What I want to do is compare two rows in the same table of a MySql database and say whether they are identical or not (apart from the primary key, of course). Is there an easy way to do this using array_diff? Other than t...
by JeffG
Tue Mar 17, 2009 4:07 pm
Forum: PHP - Code
Topic: Insert Into Table...weird error
Replies: 2
Views: 158

Re: Insert Into Table...weird error

Can anyone help? You could probably more easily help yourself by adding the statement   echo "$sql<br>";   before the line with the mysql_query to see what exactly has been generated for your sql statement. I can't guess at what all those $_POSTs are returning. (Or at least output $sql in...
by JeffG
Thu Mar 12, 2009 10:05 am
Forum: PHP - Code
Topic: strchr confusion
Replies: 2
Views: 105

Re: strchr confusion

The documentation is correct in both cases, but you mis-read the first one. strchr and strrchr are two different functions.