ltwCalendar
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
  #1  
Old June 11th, 2003, 04:50 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: 3
Send a message via Yahoo to crash3909
Calendar needs stripslashes

Hi,

I just got the calendar that I downloaded from this site to work, but the variable *$eName* needs stripslashes. I entered something in there that had an apostrophe, but those evil slashes appeared.

I tried *$eName = stripslashes($eName);* in a bunch of places in the *ltw_classes.php* and it just laughed at me. Where can I put this code?

Thanks

Reply With Quote
  #2  
Old June 16th, 2003, 04:58 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: 3
Send a message via Yahoo to crash3909
RE: Calendar needs stripslashes

Hi,

Just curious if anyone has a way to get rid of the slashes that I described in the above posting. Thanks for your help.

Reply With Quote
  #3  
Old June 16th, 2003, 04:12 PM
Hatcher Hatcher is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Yarm, Cleveland, England
Posts: 395 Hatcher User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via AIM to Hatcher Send a message via Yahoo to Hatcher
RE: Calendar needs stripslashes

pssst dont let anyone know i told you ...

COUGH

$ename = $_POST['ename'];
$ename = stripslashes($ename);


Just put them at the top

END OF COUGH

Reply With Quote
  #4  
Old June 16th, 2003, 04:29 PM
jorgen jorgen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hardenberg, Holland<marquee>
Posts: 284 jorgen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Calendar needs stripslashes

I always use this function so I never have to stripslashes.
First of all you have to ensure magic_quotes_gpc is turned of.
you can use the ini_set() function for that task

php Code:
Original - php Code
  1.  
  2. /**
  3. *  Apply magic quotes
  4. *
  5. *  @access public
  6. *  @param  array|string  The input variable
  7. *  @return void
  8. */
  9. function apply_magic_quotes(&$arr)
  10. {
  11.   if (!ini_get('magic_quotes_gpc')) {
  12.     if (is_array($arr)) {
  13.       $c = sizeOf($arr);
  14.       $a = array_keys($arr);
  15.       for ($i = 0; $i < $c; $i++) {
  16.         if (is_array($arr[$a[$i]])) {
  17.           apply_magic_quotes($arr[$a[$i]]);
  18.         } else {
  19.           $arr[$a[$i]] = str_replace(""", """, ($arr[$a[$i]]));
  20.           $arr[$a[$i]] = str_replace("'", "'", ($arr[$a[$i]]));
  21.         }
  22.       }
  23.     } elseif (!is_string($arr)) {
  24.       $arr = str_replace(""", """, $arr);
  25.       $arr = str_replace("'", "'", $arr);
  26.     }
  27.   }
  28. }

Reply With Quote
  #5  
Old June 16th, 2003, 05:14 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: 3
Send a message via Yahoo to crash3909
RE: Calendar needs stripslashes

Hey Hatcher,

I tried what you said not to tell anyone you told me, but it came up empty. The slashes are still there. Any other ideas? I promise not to tell anyone. Thanks again.

Reply With Quote
  #6  
Old June 16th, 2003, 07:21 PM
Hatcher Hatcher is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Yarm, Cleveland, England
Posts: 395 Hatcher User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via AIM to Hatcher Send a message via Yahoo to Hatcher
RE: Calendar needs stripslashes

this would be easier with the whole code, hmmmcontact me on aim or email me(hatcher@hatcher.depot-network.com) and send me the whole code, ill see what i can do!

Reply With Quote
Reply

Viewing: Codewalkers ForumsProjectsltwCalendar > Calendar needs stripslashes


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




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek