[PHP] Code check

2006-05-29 Thread Paul Goepfert
Hi all, I wrote a php script that creates options for select boxes. What this script does is selects tomorrows date. However I have tested the code when the day is the last day of the month and the script blows up. Instead of displaying June it displays January and repeats the months 12 times I

Re: [PHP] Code check

2006-05-29 Thread D. Dante Lorenso
Paul Goepfert wrote: ... What this script does is selects tomorrows date... Here is a one-line way to find the month and day of tomorrow: ?php list($tomorrow_month, $tomorrow_day) = split(':', date('m:d', time()+86400)); ? Test that ... I just wrote it off the top of my head. Maybe that

Re: [PHP] Code Check fixed

2005-05-31 Thread janbro
Ok, thx, I've got it done. Dumb mistake, the user didn't have rights to delete, it's as simple as that. My trials thru the command line where as root thx guys janbro Richard Lynch schrieb: What you are doing wrong is ignoring the error messages MySQL is storing for you... On Mon, May

Re: [PHP] Code Check

2005-05-31 Thread Dotan Cohen
On 5/30/05, janbro [EMAIL PROTECTED] wrote: Hi List, I don't know where else to look. I've got PHP 5.0.0 and MySQL 4.1.3. (on Windwows XP with Apache 2.0.50) Here is my Code: the Query with the delete is not executed and I don't know why. If I copy it into the MySQL Command line like it is

[PHP] Code Check

2005-05-30 Thread janbro
Hi List, I don't know where else to look. I've got PHP 5.0.0 and MySQL 4.1.3. (on Windwows XP with Apache 2.0.50) Here is my Code: the Query with the delete is not executed and I don't know why. If I copy it into the MySQL Command line like it is here, everything works fine. I have another

Re: [PHP] Code Check

2005-05-30 Thread Mikey
janbro wrote: Hi List, I don't know where else to look. I've got PHP 5.0.0 and MySQL 4.1.3. (on Windwows XP with Apache 2.0.50) Here is my Code: the Query with the delete is not executed and I don't know why. If I copy it into the MySQL Command line like it is here, everything works fine. I

Re: [PHP] Code Check

2005-05-30 Thread Richard Lynch
What you are doing wrong is ignoring the error messages MySQL is storing for you... On Mon, May 30, 2005 12:37 pm, janbro said: Hi List, I don't know where else to look. I've got PHP 5.0.0 and MySQL 4.1.3. (on Windwows XP with Apache 2.0.50) Here is my Code: the Query with the delete is not

[PHP] Code check please

2003-09-17 Thread James Johnson
Hi, Can anyone see why this code isn't working $SID = $_SESSION['svUserID']; $AdID = $_GET['AdID']; // get the campuses assigned $qCampusID = SELECT inst_id FROM ads_campuses WHERE ad_id = $AdID; $CampusIDList = mysql_query($qCampusID, $CCB) or die(mysql_error()); $row_CampusIDList =

RE: [PHP] Code check please

2003-09-17 Thread James Johnson
Hmm, ok I took out the $row_CampusIDList = mysql_fetch_assoc($CampusIDList); and it works But how come? J -Original Message- From: James Johnson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 9:17 AM To: [EMAIL PROTECTED] Subject: [PHP] Code check please

Re: [PHP] Code check please

2003-09-17 Thread CPT John W. Holmes
From: James Johnson [EMAIL PROTECTED] Can anyone see why this code isn't working $SID = $_SESSION['svUserID']; $AdID = $_GET['AdID']; // get the campuses assigned $qCampusID = SELECT inst_id FROM ads_campuses WHERE ad_id = $AdID; You say down below that this query only selects one

[PHP] code check

2001-08-23 Thread Tom Malone
Sorry to bother you all with this, but I have no way to test this, as I have no access to a Mac. Could you tell me if this little piece of code looks as if it would work (detect whether someone's using the Mac OS)? if (preg_match(/mac/i, $HTTP_USER_AGENT) || preg_match(/macintosh/i,

Re: [PHP] code check

2001-08-23 Thread mike cullerton
on 8/23/01 11:51 AM, Tom Malone at [EMAIL PROTECTED] wrote: Sorry to bother you all with this, but I have no way to test this, as I have no access to a Mac. Could you tell me if this little piece of code looks as if it would work (detect whether someone's using the Mac OS)? ie 5.0 macos 9,

Re: [PHP] Code check please

2001-06-21 Thread Philip Olson
You want mysql_error(), call it somewhere after your query. echo mysql_error(); Regarding the query, the following should work just fine : $sql = INSERT INTO tablefoo (a,b,c) VALUES ('$a','$b','$c'); Be sure to add slashes sometime to your values beforehand. Anyway, mysql_error() is what

RE: [PHP] Code check please

2001-06-21 Thread Warren Vail
and execute the preceding text as a query and after executing that query, continue on from the next character. hope you got it working, Warren Vail -Original Message- From: Andreas Skarin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 9:00 AM To: PHP General Subject: [PHP] Code check

RE: [PHP] Code check please

2001-06-21 Thread Warren Vail
, 2001 3:46 PM To: PHP General Subject: Re: [PHP] Code check please I'm sorry guys, neither of the snippets work. I must have screwed something else up too. Is there any way I can provoke an error message from your code examples below? If anyone manages to find out what's wrong, please tell me. I'm

Re: [PHP] Code check please

2001-06-21 Thread Robert Vetter
Andreas Skarin wrote: I've tried to get this working for over an hour now, and it still won't. I don't even get an error message to help me find the problem so I was hoping that someone could check my code for me. I'm fooling around with a basic form that is supposed to send one's

[PHP] Code check please

2001-06-20 Thread Andreas Skarin
I've tried to get this working for over an hour now, and it still won't. I don't even get an error message to help me find the problem so I was hoping that someone could check my code for me. I'm fooling around with a basic form that is supposed to send one's name, surname and e-mail address to

Re: [PHP] Code check please

2001-06-20 Thread J Smith
Your code is [mostly] fine, except for two things: 1. Although you connected to your database with mysql_connect() and mysql_select_db(), you didn't do anything with connection. Try using mysql_query() to send a query to the db, i.e. mysql_query($sql). 2. Your SQL is a bit out of

RE: [PHP] Code check please

2001-06-20 Thread Rich Cavanaugh
General Subject: [PHP] Code check please I've tried to get this working for over an hour now, and it still won't. I don't even get an error message to help me find the problem so I was hoping that someone could check my code for me. I'm fooling around with a basic form that is supposed to send

Re: [PHP] Code check please

2001-06-20 Thread Sebastian Wenleder
At 18:00 Uhr +0200 20.06.2001, Andreas Skarin wrote: I've tried to get this working for over an hour now, and it still won't. I don't even get an error message to help me find the problem so I was hoping that someone could check my code for me. [snip] $sql = INSERT INTO tabell SET .

Re: [PHP] Code check please

2001-06-20 Thread Lenar Lõhmus
ROTECTED]] Sent: Wednesday, June 20, 2001 12:00 PM To: PHP General Subject: [PHP] Code check please I've tried to get this working for over an hour now, and it still won't. I don't even get an error message to help me find the problem so I was hoping that someone could check my code for m

Re: [PHP] Code check please

2001-06-20 Thread Andreas Skarin
I'm sorry guys, neither of the snippets work. I must have screwed something else up too. Is there any way I can provoke an error message from your code examples below? If anyone manages to find out what's wrong, please tell me. I'm not giving up until I smash this bug :-) // Andreas Rich

RE: [PHP] Code check please

2001-06-20 Thread Jason Murray
2. Your SQL is a bit out of whack. The SET clause is used for UPDATEs, not INSERTs. Instead, try: $sql = INSERT INTO tabell (fornamn, efternamn, email) VALUES ( . '$fornamn', '$efternamn', '$email');; MySQL actually lets you use SET for INSERTS, though. Jason --