ltwCalendar
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Click Here
Go Back   Codewalkers ForumsProjectsltwCalendar

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old June 17th, 2003, 09:53 PM
crash3909 crash3909 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 crash3909 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to crash3909
Why won't this code work in calendar?

I have been trying to get the code below to work in the calendar. It's supposed to validate an email and then tell the user that email addresses are not permitted. When I use it on a simple demo page, it works fine. But in the calendar I can't find a place to put it to make it work, or to not get an error. One of the errors is telling me that *eName* is an undefined index. In the demo page I get no such error. Any help here is appreciated. Thanks.

php Code:
Original - php Code
  1.  
  2.     function is_valid_email($email_address) {
  3.    if(ereg("([[:alnum:].-]+)(@[[:alnum:].-]+.+)", $email_address)) {
  4.         return 1;
  5.     } else {
  6.         return 0;
  7.     }
  8. }
  9. if (is_valid_email($_POST['eName'])) {
  10. echo "Sorry! Email addresses are not permitted";
  11. }

Reply With Quote
  #2  
Old June 18th, 2003, 08:38 PM
crash3909 crash3909 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 crash3909 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to crash3909
RE: Why won't this code work in calendar?

Hi,

Anybody have any ideas on why this code won't work in the calendar's *ltw_classes.php* file? Any and all suggestions are welcome. Thanks.

Reply With Quote
  #3  
Old June 18th, 2003, 09:15 PM
drevele drevele is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Medina, Ohio
Posts: 233 drevele User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to drevele Send a message via Yahoo to drevele
RE: Why won't this code work in calendar?

-- top of file:
php Code:
Original - php Code
  1.  
  2. function is_valid_email($email_address) {
  3.    if(ereg("([[:alnum:].-]+)(@[[:alnum:].-]+.+)", $email_address)) {
  4.         return 1;
  5.     } else {
  6.         return 0;
  7.     }
  8. }

--cut--
--where u need validation--
php Code:
Original - php Code
  1.  
  2. if (is_valid_email($_POST['eName'])) {
  3. echo "Sorry! Email addresses are not permitted";
  4. }

Reply With Quote
  #4  
Old June 18th, 2003, 09:36 PM
crash3909 crash3909 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 crash3909 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to crash3909
RE: Why won't this code work in calendar?

Sorry. Did not work. I got the same error in the "Add Event" popup ...

Warning: Undefined index: eName in /path/path/ltw_classes.php on line 819

which is where the if statement is. The function is at the very top of ltw_classes.php.

Any other ideas are more than welcome.

Thanks

Reply With Quote
  #5  
Old June 18th, 2003, 09:41 PM
drevele drevele is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Medina, Ohio
Posts: 233 drevele User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to drevele Send a message via Yahoo to drevele
RE: Why won't this code work in calendar?

php Code:
Original - php Code
  1.  
  2. if (is_set($_POST['eName']) {
  3. if (is_valid_email($_POST['eName'])) {
  4. echo "Sorry! Email addresses are not permitted";
  5. }
  6. }

Reply With Quote
  #6  
Old June 18th, 2003, 09:54 PM
crash3909 crash3909 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 crash3909 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to crash3909
RE: Why won't this code work in calendar?

Sorry again. 2 errors this time.

Parse error: parse error in /path/path/ltw_classes.php on line 819
-- which is *if (is_set($_POST['eName']) {*

Fatal error: Cannot instantiate non-existent class: ltwcalendar in /path/path/calendar.php on line 145

Once again, any further help is appreciated. Thanks

Reply With Quote
  #7  
Old June 18th, 2003, 10:01 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Why won't this code work in calendar?

crash,

there is an error in the if statement try this
php Code:
Original - php Code
  1.  
  2. if (is_set($_POST['eName']))


that should fix it...

Reply With Quote
  #8  
Old June 18th, 2003, 10:11 PM
crash3909 crash3909 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 crash3909 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to crash3909
RE: Why won't this code work in calendar?

Eddie,

Thanks again... but ... it fixed the fatal error on the web page itself, now the Add Event popup, where the form is, has a fatal error. At least it's closer, I think. The error says:

Fatal error: Call to undefined function: is_set() in /path/path/ltw_classes.php on line 820

line 820 is...
if (is_set($_POST['eName'])) {

Reply With Quote
  #9  
Old June 18th, 2003, 10:13 PM
drevele drevele is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Medina, Ohio
Posts: 233 drevele User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to drevele Send a message via Yahoo to drevele
RE: Why won't this code work in calendar?

Is safe mode enabled? because i know that can screw things up

Reply With Quote
  #10  
Old June 18th, 2003, 10:26 PM
crash3909 crash3909 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 crash3909 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to crash3909
RE: Why won't this code work in calendar?

Drevele,

My web host has the control over that one. Also not sure if I ask them to make that change will mess anything else up that works. But this script works perfectly fine on a demo page (same site and server), without the calendar files, so I am not sure if that would do the trick. I appreciate your help and suggestions. If you have any other ideas, please feel free.

Thanks

Reply With Quote
  #11  
Old June 19th, 2003, 12:37 AM
crash3909 crash3909 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 crash3909 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to crash3909
RE: Why won't this code work in calendar?

Found the solution guys. Check out the thread in suggestions entitled "slashes" by crash3909. This problem was done at bottom of thread. Thanks again for all of your time, patience, and help.

Reply With Quote
Reply

Viewing: Codewalkers ForumsProjectsltwCalendar > Why won't this code work in calendar?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |